From: Eric S. Raymond Date: Mon, 24 Nov 2014 08:54:14 +0000 (-0500) Subject: Resiolution must die gracefully on a file with no revisions. X-Git-Tag: 0.13~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=e47ce2e877a942adf539b87b9aa8900ef68d9493;p=src.git Resiolution must die gracefully on a file with no revisions. --- diff --git a/src b/src index aa1cb53..a05ee9b 100755 --- a/src +++ b/src @@ -943,7 +943,10 @@ class CommandContext: if type(part) == type(0): return part if token == '': # User specified @ - return metadata.current().revno + current = metadata.current() + if current is None: + croak("in {0}, no current revision".format(metadata.name)) + return current.revno if part not in metadata.symbols: croak("in {0}, can't resolve symbol {1}".format(metadata.name,token)) else: