]> thyrsus.com Git - src.git/commitdiff
Resiolution must die gracefully on a file with no revisions.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 24 Nov 2014 08:54:14 +0000 (03:54 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 24 Nov 2014 08:54:14 +0000 (03:54 -0500)
src

diff --git a/src b/src
index aa1cb53dbc033d0f7c2e1bcf997d08e270f32623..a05ee9b908d21cc530b3eed82cea7a75f39eed5e 100755 (executable)
--- 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: