Merge lp:~jelmer/brz/uncommit-url into lp:brz

Proposed by Jelmer Vernooij
Status: Superseded
Proposed branch: lp:~jelmer/brz/uncommit-url
Merge into: lp:brz
Diff against target: 76 lines (+30/-6)
3 files modified
breezy/builtins.py (+12/-6)
breezy/tests/blackbox/test_uncommit.py (+14/-0)
doc/en/release-notes/brz-3.0.txt (+4/-0)
To merge this branch: bzr merge lp:~jelmer/brz/uncommit-url
Reviewer Review Type Date Requested Status
Breezy developers Pending
Review via email: mp+363279@code.launchpad.net

Description of the change

Display "-d $LOCATION" in example bzr pull command output by 'brz uncommit'

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'breezy/builtins.py'
--- breezy/builtins.py 2019-02-09 03:23:20 +0000
+++ breezy/builtins.py 2019-02-16 17:54:59 +0000
@@ -5420,10 +5420,10 @@
5420 else:5420 else:
5421 self.add_cleanup(b.lock_write().unlock)5421 self.add_cleanup(b.lock_write().unlock)
5422 return self._run(b, tree, dry_run, verbose, revision, force,5422 return self._run(b, tree, dry_run, verbose, revision, force,
5423 local, keep_tags)5423 local, keep_tags, location)
54245424
5425 def _run(self, b, tree, dry_run, verbose, revision, force, local,5425 def _run(self, b, tree, dry_run, verbose, revision, force, local,
5426 keep_tags):5426 keep_tags, location):
5427 from .log import log_formatter, show_log5427 from .log import log_formatter, show_log
5428 from .uncommit import uncommit5428 from .uncommit import uncommit
54295429
@@ -5477,10 +5477,16 @@
5477 last_rev_id, rev_id)5477 last_rev_id, rev_id)
5478 uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,5478 uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,
5479 revno=revno, local=local, keep_tags=keep_tags)5479 revno=revno, local=local, keep_tags=keep_tags)
5480 self.outf.write(5480 if location != '.':
5481 gettext('You can restore the old tip by running:\n'5481 self.outf.write(
5482 ' brz pull . -r revid:%s\n')5482 gettext('You can restore the old tip by running:\n'
5483 % last_rev_id.decode('utf-8'))5483 ' brz pull -d %s %s -r revid:%s\n')
5484 % (location, location, last_rev_id.decode('utf-8')))
5485 else:
5486 self.outf.write(
5487 gettext('You can restore the old tip by running:\n'
5488 ' brz pull . -r revid:%s\n')
5489 % last_rev_id.decode('utf-8'))
54845490
54855491
5486class cmd_break_lock(Command):5492class cmd_break_lock(Command):
54875493
=== modified file 'breezy/tests/blackbox/test_uncommit.py'
--- breezy/tests/blackbox/test_uncommit.py 2018-11-18 19:48:57 +0000
+++ breezy/tests/blackbox/test_uncommit.py 2019-02-16 17:54:59 +0000
@@ -246,6 +246,20 @@
246 brz pull . -r revid:a2246 brz pull . -r revid:a2
247""")247""")
248248
249 def test_uncommit_shows_pull_with_location(self):
250 wt = self.create_simple_tree()
251
252 script = ScriptRunner()
253 script.run_script(self, """
254$ brz uncommit --force tree
255 2 ...
256 second commit
257...
258The above revision(s) will be removed.
259You can restore the old tip by running:
260 brz pull -d tree tree -r revid:a2
261""")
262
249 def test_uncommit_octopus_merge(self):263 def test_uncommit_octopus_merge(self):
250 # Check that uncommit keeps the pending merges in the same order264 # Check that uncommit keeps the pending merges in the same order
251 # though it will also filter out ones in the ancestry265 # though it will also filter out ones in the ancestry
252266
=== modified file 'doc/en/release-notes/brz-3.0.txt'
--- doc/en/release-notes/brz-3.0.txt 2019-02-14 06:21:45 +0000
+++ doc/en/release-notes/brz-3.0.txt 2019-02-16 17:54:59 +0000
@@ -230,6 +230,10 @@
230* Don't report .git files as unknown files.230* Don't report .git files as unknown files.
231 (Jelmer Vernooij, Debian Bug #921240)231 (Jelmer Vernooij, Debian Bug #921240)
232232
233* Display correct pull location argument in
234 output of ``brz uncommit``.
235 (Jelmer Vernooij, #386577)
236
233Documentation237Documentation
234*************238*************
235239

Subscribers

People subscribed via source and target branches