Merge lp:~bialix/bzr-explorer/bug-907708 into lp:bzr-explorer

Proposed by Alexander Belchenko
Status: Merged
Merged at revision: 560
Proposed branch: lp:~bialix/bzr-explorer/bug-907708
Merge into: lp:bzr-explorer
Diff against target: 127 lines (+41/-8)
5 files modified
NEWS (+16/-0)
lib/checkout_dialog.py (+10/-6)
lib/commands.py (+1/-1)
lib/explorer.py (+8/-1)
lib/explorer_preferences.py (+6/-0)
To merge this branch: bzr merge lp:~bialix/bzr-explorer/bug-907708
Reviewer Review Type Date Requested Status
methane Pending
Bazaar Explorer Developers Pending
Review via email: mp+112682@code.launchpad.net

Description of the change

UI Changes: heavy-weight checkout by default, user can select light-weight option.

To post a comment you must log in.
lp:~bialix/bzr-explorer/bug-907708 updated
558. By Alexander Belchenko

configurable default for light-weight checkout, cherrypicked from lp:~martin-guillon/bzr-explorer/custom-made

559. By Alexander Belchenko

update NEWS

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2012-05-03 08:34:32 +0000
3+++ NEWS 2012-06-29 03:09:23 +0000
4@@ -7,6 +7,22 @@
5 1.3.0 dd-mmm-yyyy
6 -----------------
7
8+UI Changes:
9+
10+* Checkout dialog provides access to light-weight checkout option
11+ and by default creates heavy-weight checkout.
12+ (Alexander Belchenko, Bug #907708)
13+
14+New features:
15+
16+Improvements:
17+
18+* New option in Tools-Options-Behavior-Default Values in Dialogs:
19+ Lightweight checkout by default. (Martin Guillon)
20+
21+* Use current tab location as default branch source for checkout dialog.
22+ (Martin Guillon)
23+
24 Bug Fixes:
25
26 * Prefer language settings in bazaar.conf configuration file
27
28=== modified file 'lib/checkout_dialog.py'
29--- lib/checkout_dialog.py 2011-09-21 10:35:17 +0000
30+++ lib/checkout_dialog.py 2012-06-29 03:09:23 +0000
31@@ -29,7 +29,7 @@
32 """
33
34 def __init__(self, branch_location=None, to_location=None, revision=None,
35- dialog=True, ui_mode=True, parent=None):
36+ dialog=True, ui_mode=True, parent=None, lightweight=False):
37 config = get_qbzr_config()
38 checkout_basedir = config.get_option("checkout_basedir")
39 branchsource_basedir = config.get_option("branchsource_basedir")
40@@ -38,11 +38,15 @@
41 super(QCheckoutExplorerStyleDialog, self).__init__(
42 to_location, ui_mode=ui_mode, parent=parent)
43
44- # Hide the options group box - checkouts are always lightweight in
45- # explorer. If users want a heavyweight checkout, they need to use
46- # the Branch dialog and bind the branch instead.
47- self.ui.groupBox_3.setVisible(False)
48- self.ui.but_lightweight.setChecked(True)
49+ # Hide branch controls but show lightweigt checkout option
50+ # see bug https://bugs.launchpad.net/bzr-explorer/+bug/907708
51+ # [ugly] UNfortunately there is spacer item that I unable to hide
52+ # therefore there is extra blank line below lightweight option
53+ self.ui.but_branch.setVisible(False)
54+ self.ui.but_stacked.setVisible(False)
55+ self.ui.link_help.setVisible(False)
56+ # configurable default for lightweight option
57+ self.ui.but_lightweight.setChecked(lightweight)
58
59 # Init the controls
60 if branch_location:
61
62=== modified file 'lib/commands.py'
63--- lib/commands.py 2011-08-02 12:55:40 +0000
64+++ lib/commands.py 2012-06-29 03:09:23 +0000
65@@ -240,7 +240,7 @@
66
67
68 class cmd_qcheckout_ala_explorer(Command):
69- """Checkout a branch. The checkout is always lightweight."""
70+ """Checkout a branch."""
71 # TODO: add ui_mode option
72 takes_options = [simple_revision_option]
73 if bzrlib.api.get_minimum_api_version(bzrlib) >= (1,14):
74
75=== modified file 'lib/explorer.py'
76--- lib/explorer.py 2012-03-23 11:14:57 +0000
77+++ lib/explorer.py 2012-06-29 03:09:23 +0000
78@@ -1610,7 +1610,14 @@
79 self.open_location(new_location)
80
81 def _start_checkout(self, context=None):
82- return custom_dialog_registry.get('checkout')(parent=self)
83+ from_location = None
84+ if context:
85+ from_location = context.get('branch_root')
86+ if from_location and from_location.startswith("file://"):
87+ from_location = urlutils.local_path_from_url(from_location)
88+ dialog = custom_dialog_registry.get('checkout')
89+ lightweight = self._preferences.get('lightweight-checkout-by-default')
90+ return dialog(from_location, parent=self, lightweight=lightweight)
91
92 def _finish_checkout(self):
93 dialog = self._custom_modeless_dialogs['checkout']
94
95=== modified file 'lib/explorer_preferences.py'
96--- lib/explorer_preferences.py 2011-08-02 12:55:40 +0000
97+++ lib/explorer_preferences.py 2012-06-29 03:09:23 +0000
98@@ -47,6 +47,7 @@
99 "workingtree-style": "qbrowse",
100 "workspace-model": "feature-branches",
101 "bind-branches-by-default": False,
102+ "lightweight-checkout-by-default": False,
103 "location-selector-style": "tabs",
104 "clothes-to-wear": [
105 "Bazaar support",
106@@ -68,6 +69,7 @@
107 "custom-dialog-switch",
108 "advanced-commands-terminal",
109 "bind-branches-by-default",
110+ "lightweight-checkout-by-default",
111 "toolbox-on-status-view",
112 "toolbox-on-repository-view",
113 "toolbox-on-welcome-view",
114@@ -342,9 +344,13 @@
115 bind_branches_cb = self._build_checkbox_field(
116 "bind-branches-by-default",
117 gettext("Bind branches by default"))
118+ checkout_branches_cb = self._build_checkbox_field(
119+ "lightweight-checkout-by-default",
120+ gettext("Lightweight checkout by default"))
121 defaults_layout = QtGui.QFormLayout()
122 defaults_layout.addRow(gettext("Workspace Model"), ws_model_combo)
123 defaults_layout.addRow(bind_branches_cb)
124+ defaults_layout.addRow(checkout_branches_cb)
125 defaults_group = QtGui.QGroupBox(gettext(
126 "Default Values in Dialogs"))
127 defaults_group.setLayout(defaults_layout)

Subscribers

People subscribed via source and target branches