Merge lp:~roadmr/isitdeployable/handle-nonexistent-revisions-in-bzr into lp:isitdeployable

Proposed by Daniel Manrique
Status: Merged
Approved by: Daniel Manrique
Approved revision: 297
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~roadmr/isitdeployable/handle-nonexistent-revisions-in-bzr
Merge into: lp:isitdeployable
Diff against target: 19 lines (+7/-1)
1 file modified
revtracker/tasks.py (+7/-1)
To merge this branch: bzr merge lp:~roadmr/isitdeployable/handle-nonexistent-revisions-in-bzr
Reviewer Review Type Date Requested Status
Jonathan Hartley (community) Approve
Maximiliano Bertacchini Approve
Review via email: mp+370522@code.launchpad.net

Commit message

Handle nonexistent revisions properly.

This happens if (that we know of):

1- A branch has been rewritten and a specific commit referenced in the project is gone or nonexistent due to a typo :)

Description of the change

Handle nonexistent revisions properly.

This happens if (that we know of):

1- A branch has been rewritten and a specific commit referenced in the project is gone or nonexistent due to a typo :)

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Explaining myself

Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

Lgtm! (check indentation nitpick)

review: Approve
298. By Daniel Manrique

Fix indentation

Revision history for this message
Jonathan Hartley (tartley) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'revtracker/tasks.py'
--- revtracker/tasks.py 2019-07-23 13:23:37 +0000
+++ revtracker/tasks.py 2019-07-23 20:41:01 +0000
@@ -240,8 +240,14 @@
240 if revspec is None:240 if revspec is None:
241 return None241 return None
242 if self.vcs == VCS.VCS_BAZAAR:242 if self.vcs == VCS.VCS_BAZAAR:
243 revid = RevisionSpec.from_string(revspec).as_revision_id(243 try:
244 revid = RevisionSpec.from_string(revspec).as_revision_id(
244 self.branch)245 self.branch)
246 except brz_errors.InvalidRevisionSpec as err:
247 print("%s - trying to get revspec %s from branch %s. "
248 "Returning None" % (
249 err, revspec, self.branch))
250 return None # Revision not found in the branch
245 else:251 else:
246 try:252 try:
247 revid = self.branch.revparse_single(revspec).id.hex253 revid = self.branch.revparse_single(revspec).id.hex

Subscribers

People subscribed via source and target branches