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

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/uncommit-url
Merge into: lp:brz/3.0
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
Martin Packman Approve
Review via email: mp+363698@code.launchpad.net

Commit message

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

Description of the change

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

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/builtins.py'
2--- breezy/builtins.py 2019-02-09 03:23:20 +0000
3+++ breezy/builtins.py 2019-02-27 01:45:01 +0000
4@@ -5420,10 +5420,10 @@
5 else:
6 self.add_cleanup(b.lock_write().unlock)
7 return self._run(b, tree, dry_run, verbose, revision, force,
8- local, keep_tags)
9+ local, keep_tags, location)
10
11 def _run(self, b, tree, dry_run, verbose, revision, force, local,
12- keep_tags):
13+ keep_tags, location):
14 from .log import log_formatter, show_log
15 from .uncommit import uncommit
16
17@@ -5477,10 +5477,16 @@
18 last_rev_id, rev_id)
19 uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,
20 revno=revno, local=local, keep_tags=keep_tags)
21- self.outf.write(
22- gettext('You can restore the old tip by running:\n'
23- ' brz pull . -r revid:%s\n')
24- % last_rev_id.decode('utf-8'))
25+ if location != '.':
26+ self.outf.write(
27+ gettext('You can restore the old tip by running:\n'
28+ ' brz pull -d %s %s -r revid:%s\n')
29+ % (location, location, last_rev_id.decode('utf-8')))
30+ else:
31+ self.outf.write(
32+ gettext('You can restore the old tip by running:\n'
33+ ' brz pull . -r revid:%s\n')
34+ % last_rev_id.decode('utf-8'))
35
36
37 class cmd_break_lock(Command):
38
39=== modified file 'breezy/tests/blackbox/test_uncommit.py'
40--- breezy/tests/blackbox/test_uncommit.py 2018-11-18 19:48:57 +0000
41+++ breezy/tests/blackbox/test_uncommit.py 2019-02-27 01:45:01 +0000
42@@ -246,6 +246,20 @@
43 brz pull . -r revid:a2
44 """)
45
46+ def test_uncommit_shows_pull_with_location(self):
47+ wt = self.create_simple_tree()
48+
49+ script = ScriptRunner()
50+ script.run_script(self, """
51+$ brz uncommit --force tree
52+ 2 ...
53+ second commit
54+...
55+The above revision(s) will be removed.
56+You can restore the old tip by running:
57+ brz pull -d tree tree -r revid:a2
58+""")
59+
60 def test_uncommit_octopus_merge(self):
61 # Check that uncommit keeps the pending merges in the same order
62 # though it will also filter out ones in the ancestry
63
64=== modified file 'doc/en/release-notes/brz-3.0.txt'
65--- doc/en/release-notes/brz-3.0.txt 2019-02-14 06:21:45 +0000
66+++ doc/en/release-notes/brz-3.0.txt 2019-02-27 01:45:01 +0000
67@@ -230,6 +230,10 @@
68 * Don't report .git files as unknown files.
69 (Jelmer Vernooij, Debian Bug #921240)
70
71+* Display correct pull location argument in
72+ output of ``brz uncommit``.
73+ (Jelmer Vernooij, #386577)
74+
75 Documentation
76 *************
77

Subscribers

People subscribed via source and target branches