Merge lp:~jelmer/brz/tags-suggest-command 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/tags-suggest-command
Merge into: lp:brz/3.0
Diff against target: 49 lines (+14/-1)
3 files modified
breezy/errors.py (+2/-1)
breezy/tests/blackbox/test_tags.py (+9/-0)
doc/en/release-notes/brz-3.0.txt (+3/-0)
To merge this branch: bzr merge lp:~jelmer/brz/tags-suggest-command
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+368869@code.launchpad.net

Commit message

Suggest full command to run when tags are unsupported.

Description of the change

Suggest full command to run when tags are unsupported.

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/errors.py'
2--- breezy/errors.py 2019-02-15 18:57:38 +0000
3+++ breezy/errors.py 2019-06-15 19:07:38 +0000
4@@ -2138,10 +2138,11 @@
5 class TagsNotSupported(BzrError):
6
7 _fmt = ("Tags not supported by %(branch)s;"
8- " you may be able to use brz upgrade.")
9+ " you may be able to use 'brz upgrade %(branch_url)s'.")
10
11 def __init__(self, branch):
12 self.branch = branch
13+ self.branch_url = branch.user_url
14
15
16 class TagAlreadyExists(BzrError):
17
18=== modified file 'breezy/tests/blackbox/test_tags.py'
19--- breezy/tests/blackbox/test_tags.py 2019-01-08 21:29:21 +0000
20+++ breezy/tests/blackbox/test_tags.py 2019-06-15 19:07:38 +0000
21@@ -443,6 +443,15 @@
22 'unknown ?\n')
23 self.assertEqual('', err)
24
25+ def test_tag_unsupported(self):
26+ tree = self.make_branch_and_tree('tree', format='dirstate')
27+ out, err = self.run_bzr('tag -d tree blah', retcode=3)
28+ self.assertEqual(out, '')
29+ self.assertContainsRe(
30+ err,
31+ 'brz: ERROR: Tags not supported by BzrBranch5\\(.*\\/tree\\/\\); '
32+ 'you may be able to use \'brz upgrade file:\\/\\/.*\\/tree\\/\'.')
33+
34
35 class TestSmartServerCat(TestCaseWithTransport):
36
37
38=== modified file 'doc/en/release-notes/brz-3.0.txt'
39--- doc/en/release-notes/brz-3.0.txt 2019-05-29 03:30:03 +0000
40+++ doc/en/release-notes/brz-3.0.txt 2019-06-15 19:07:38 +0000
41@@ -42,6 +42,9 @@
42 ``Repository.get_revid_for_revno`` when the revision
43 number is invalid. (Jelmer Vernooij, #701953)
44
45+* Print full upgrade command to run when complaining about lack of
46+ support for tags. (Jelmer Vernooij, #163908)
47+
48 Documentation
49 *************
50

Subscribers

People subscribed via source and target branches