Merge lp:~jelmer/brz/more-git-errors into lp:brz

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/more-git-errors
Merge into: lp:brz
Diff against target: 28 lines (+6/-1)
2 files modified
breezy/git/remote.py (+2/-1)
breezy/git/tests/test_remote.py (+4/-0)
To merge this branch: bzr merge lp:~jelmer/brz/more-git-errors
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+354801@code.launchpad.net

Commit message

Handle the Launchpad way of saying "Repository not found".

Description of the change

Handle another way of formatting "Repository not found".

This is the format used by Launchpad.

To post a comment you must log in.
lp:~jelmer/brz/more-git-errors updated
7106. By Jelmer Vernooij

Fix HTTP redirects for Git repositories.

Merged from https://code.launchpad.net/~jelmer/brz/fix-git-reidrecits/+merge/354534

Revision history for this message
Martin Packman (gz) wrote :

Looks good, though see comment.

review: Approve
lp:~jelmer/brz/more-git-errors updated
7107. By Jelmer Vernooij

Fix remaining deprecated function name test.

Merged from https://code.launchpad.net/~jelmer/brz/remaining-test/+merge/354803

7108. By Jelmer Vernooij

Handle the Launchpad way of saying "Repository not found".

Merged from https://code.launchpad.net/~jelmer/brz/more-git-errors/+merge/354801

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/remote.py'
2--- breezy/git/remote.py 2018-09-11 19:38:39 +0000
3+++ breezy/git/remote.py 2018-09-12 17:23:34 +0000
4@@ -194,7 +194,8 @@
5 """
6 message = str(message).strip()
7 if (message.startswith("Could not find Repository ") or
8- message == 'Repository not found.'):
9+ message == 'Repository not found.' or
10+ (message.startswith('Repository ') and message.endswith(' not found.'))):
11 return NotBranchError(url, message)
12 if message == "HEAD failed to update":
13 base_url, _ = urlutils.split_segment_parameters(url)
14
15=== modified file 'breezy/git/tests/test_remote.py'
16--- breezy/git/tests/test_remote.py 2018-09-11 19:36:00 +0000
17+++ breezy/git/tests/test_remote.py 2018-09-12 17:23:34 +0000
18@@ -88,6 +88,10 @@
19 e = parse_git_error("url", "\n Could not find Repository foo/bar")
20 self.assertIsInstance(e, NotBranchError)
21
22+ def test_notbrancherror_launchpad(self):
23+ e = parse_git_error("url", "Repository 'foo/bar' not found.")
24+ self.assertIsInstance(e, NotBranchError)
25+
26 def test_notbrancherror_github(self):
27 e = parse_git_error("url", "Repository not found.\n")
28 self.assertIsInstance(e, NotBranchError)

Subscribers

People subscribed via source and target branches