Merge lp:~jelmer/bzrtools/fix-nick-reference into lp:bzrtools

Proposed by Jelmer Vernooij on 2011-06-28
Status: Merged
Merged at revision: 779
Proposed branch: lp:~jelmer/bzrtools/fix-nick-reference
Merge into: lp:bzrtools
Diff against target: 16 lines (+2/-1)
1 file modified
graph.py (+2/-1)
To merge this branch: bzr merge lp:~jelmer/bzrtools/fix-nick-reference
Reviewer Review Type Date Requested Status
Aaron Bentley 2011-06-28 Approve on 2011-09-25
Review via email: mp+66161@code.launchpad.net

Description of the change

Patch from Andi Albrecht in #263065

This fixes an UnboundLocalError if a revision id contains a committer but is not present in the repository.

To post a comment you must log in.
Aaron Bentley (abentley) wrote :

I prefer branches to have test cases. I've added one and merged. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'graph.py'
--- graph.py 2011-03-13 16:06:41 +0000
+++ graph.py 2011-06-28 15:03:30 +0000
@@ -153,10 +153,11 @@
153 return new_ancestors153 return new_ancestors
154154
155def get_rev_info(rev_id, source):155def get_rev_info(rev_id, source):
156 """Return the committer, message, and date of a revision."""156 """Return the committer, message, nick and date of a revision."""
157 committer = None157 committer = None
158 message = None158 message = None
159 date = None159 date = None
160 nick = None
160 if rev_id == 'null:':161 if rev_id == 'null:':
161 return None, 'Null Revision', None, None162 return None, 'Null Revision', None, None
162 try:163 try:

Subscribers

People subscribed via source and target branches