Merge lp:~kvilhaugsvik/qbzr/qshelve_all into lp:qbzr

Proposed by Sveinung Kvilhaugsvik
Status: Merged
Approved by: Alexander Belchenko
Approved revision: 1517
Merged at revision: 1514
Proposed branch: lp:~kvilhaugsvik/qbzr/qshelve_all
Merge into: lp:qbzr
Diff against target: 113 lines (+24/-5)
4 files modified
NEWS.txt (+6/-0)
lib/commands.py (+6/-2)
lib/shelvewindow.py (+4/-2)
lib/widgets/shelve.py (+8/-1)
To merge this branch: bzr merge lp:~kvilhaugsvik/qbzr/qshelve_all
Reviewer Review Type Date Requested Status
Alexander Belchenko Approve
Review via email: mp+186682@code.launchpad.net

Description of the change

Add the option --all to qshelve so it acts a bit more like shelve.

To post a comment you must log in.
Revision history for this message
Sveinung Kvilhaugsvik (kvilhaugsvik) wrote :

It appears that -m also was missing.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Thank you for your patch.
Mostly looks good, although I'd prefer that you added all new parameters to the end of arguments list in functions (__init__ and other). This is kind of backward compatibility, I try to follow this pattern. If you don't mind to change it I'd be grateful.
Also we need some text about changes in NEWS.txt. Can you provide some?

review: Needs Fixing
Revision history for this message
Sveinung Kvilhaugsvik (kvilhaugsvik) wrote :

Erm... I messed up my history. Sorry for the noise.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Use command
bzr heads --dead
to find your lost revisions. You need revision-id. It has form like <user@host-datestamp-random>. You need this revision id.
Then do
bzr pull . -r <your-lost-revision-id>
And you will restore your history.

Revision history for this message
Alexander Belchenko (bialix) wrote :

I suppose your last revision was
HEAD: revision-id: <email address hidden> (dead)
  committer: Sveinung Kvilhaugsvik <email address hidden>
  branch nick: 1233909
  timestamp: Tue 2013-10-15 15:10:17 +0200
  message:
    Add NEWS entry about "qshelve -m"

Your dead revision id therefore
<email address hidden>
So you can do
bzr pull . -r revid:<email address hidden>
After you restore your branch do `bzr push --overwrite` to launchpad.

Revision history for this message
Sveinung Kvilhaugsvik (kvilhaugsvik) wrote :

Fixed. I didn't loose it. I merged in a way that made it lie. (The previous version had the data from your commit today but didn't list it as a parent)

Revision history for this message
Alexander Belchenko (bialix) wrote :

Many thanks for your changes! I'll merge it.

review: Approve
Revision history for this message
Sveinung Kvilhaugsvik (kvilhaugsvik) wrote :

Great! Thanks for your help!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS.txt'
--- NEWS.txt 2013-10-15 10:11:40 +0000
+++ NEWS.txt 2013-10-15 13:39:11 +0000
@@ -2,6 +2,12 @@
2----------------------------------2----------------------------------
3Maintenance release.3Maintenance release.
44
5 * qshelve:
6 * New command line option --all to start with all changes selected.
7 (Sveinung Kvilhaugsvik, Bug #1227914)
8 * New command line option --m to set the message string.
9 (Sveinung Kvilhaugsvik, Bug #1233909)
10
511
60.23.1 - 2013/07/29120.23.1 - 2013/07/29
7-------------------13-------------------
814
=== modified file 'lib/commands.py'
--- lib/commands.py 2012-09-18 08:22:25 +0000
+++ lib/commands.py 2013-10-15 13:39:11 +0000
@@ -1114,6 +1114,8 @@
1114 ui_mode_option,1114 ui_mode_option,
1115 bzr_option('shelve', 'list'),1115 bzr_option('shelve', 'list'),
1116 bzr_option('shelve', 'directory'),1116 bzr_option('shelve', 'directory'),
1117 bzr_option('shelve', 'message'),
1118 Option('all', help='Select all changes.'),
1117 Option('complete', help='Show complete files.'),1119 Option('complete', help='Show complete files.'),
1118 Option('ignore-whitespace', short_name='w',1120 Option('ignore-whitespace', short_name='w',
1119 help="Ignore whitespace when finding differences.(Only work when --list specified)"),1121 help="Ignore whitespace when finding differences.(Only work when --list specified)"),
@@ -1122,14 +1124,16 @@
1122 ]1124 ]
11231125
1124 def _qbzr_run(self, file_list=None, list=False, directory=None, ui_mode=False, 1126 def _qbzr_run(self, file_list=None, list=False, directory=None, ui_mode=False,
1125 complete=False, ignore_whitespace=False, encoding=None):1127 complete=False, ignore_whitespace=False, encoding=None,
1128 all=False, message=None):
1126 if list:1129 if list:
1127 initial_tab = 11130 initial_tab = 1
1128 else:1131 else:
1129 initial_tab = 01132 initial_tab = 0
1130 self.main_window = ShelveWindow(file_list=file_list, directory=directory, ui_mode=ui_mode,1133 self.main_window = ShelveWindow(file_list=file_list, directory=directory, ui_mode=ui_mode,
1131 initial_tab=initial_tab, complete=complete, 1134 initial_tab=initial_tab, complete=complete,
1132 ignore_whitespace=ignore_whitespace, encoding=encoding)1135 ignore_whitespace=ignore_whitespace, encoding=encoding,
1136 select_all=all, message=message)
1133 self.main_window.show()1137 self.main_window.show()
1134 self._application.exec_()1138 self._application.exec_()
11351139
11361140
=== modified file 'lib/shelvewindow.py'
--- lib/shelvewindow.py 2012-05-14 11:27:11 +0000
+++ lib/shelvewindow.py 2013-10-15 13:39:11 +0000
@@ -59,7 +59,8 @@
59class ShelveWindow(QBzrWindow):59class ShelveWindow(QBzrWindow):
6060
61 def __init__(self, initial_tab=0, directory=None, file_list=None, complete=False,61 def __init__(self, initial_tab=0, directory=None, file_list=None, complete=False,
62 ignore_whitespace=False, encoding=None, parent=None, ui_mode=True):62 ignore_whitespace=False, encoding=None, parent=None, ui_mode=True,
63 select_all=False, message=None):
63 QBzrWindow.__init__(self,64 QBzrWindow.__init__(self,
64 [gettext("Shelve Manager")],65 [gettext("Shelve Manager")],
65 parent, ui_mode=ui_mode)66 parent, ui_mode=ui_mode)
@@ -78,7 +79,8 @@
7879
79 shelve_view = ShelveWidget(file_list=file_list, directory=self.directory,80 shelve_view = ShelveWidget(file_list=file_list, directory=self.directory,
80 complete=complete, encoding=encoding, 81 complete=complete, encoding=encoding,
81 splitters=self.splitters, parent=self)82 splitters=self.splitters, parent=self,
83 select_all=select_all, init_msg=message)
82 shelvelist_view = ShelveListWidget(directory=self.directory,84 shelvelist_view = ShelveListWidget(directory=self.directory,
83 complete=complete, ignore_whitespace=ignore_whitespace,85 complete=complete, ignore_whitespace=ignore_whitespace,
84 encoding=encoding, splitters=self.splitters, parent=self)86 encoding=encoding, splitters=self.splitters, parent=self)
8587
=== modified file 'lib/widgets/shelve.py'
--- lib/widgets/shelve.py 2012-05-14 11:31:32 +0000
+++ lib/widgets/shelve.py 2013-10-15 13:39:11 +0000
@@ -237,7 +237,7 @@
237class ShelveWidget(ToolbarPanel):237class ShelveWidget(ToolbarPanel):
238238
239 def __init__(self, file_list=None, directory=None, complete=False, encoding=None, 239 def __init__(self, file_list=None, directory=None, complete=False, encoding=None,
240 splitters=None, parent=None):240 splitters=None, parent=None, select_all=False, init_msg=None):
241 ToolbarPanel.__init__(self, slender=False, icon_size=22, parent=parent)241 ToolbarPanel.__init__(self, slender=False, icon_size=22, parent=parent)
242242
243 self.revision = None243 self.revision = None
@@ -246,6 +246,7 @@
246 self.message = None246 self.message = None
247247
248 self.initial_encoding = encoding248 self.initial_encoding = encoding
249 self.select_all = select_all
249250
250 self.current_layout = -1251 self.current_layout = -1
251 self.load_settings()252 self.load_settings()
@@ -276,6 +277,8 @@
276 self.completer.setModel(self.completer_model)277 self.completer.setModel(self.completer_model)
277 self.message.setCompleter(self.completer)278 self.message.setCompleter(self.completer)
278 self.message.setAcceptRichText(False)279 self.message.setAcceptRichText(False)
280 if init_msg is not None:
281 self.message.setText(init_msg)
279 SpellCheckHighlighter(self.message.document(), spell_checker)282 SpellCheckHighlighter(self.message.document(), spell_checker)
280283
281 message_layout.addWidget(self.message)284 message_layout.addWidget(self.message)
@@ -485,6 +488,10 @@
485 for func in cleanup:488 for func in cleanup:
486 func()489 func()
487490
491 if self.select_all:
492 self.check_all(True)
493 self.select_all = False
494
488 self.loaded = True495 self.loaded = True
489496
490 def _create_item(self, change, shelver, trees, old_changes):497 def _create_item(self, change, shelver, trees, old_changes):

Subscribers

People subscribed via source and target branches