mercurial/changelog.py
changeset 10420 41d0ed2c79df
parent 10282 08a0f04b56bd
parent 10417 58e040c51231
child 14004 97ed99d1f419
child 14379 bd23d5f28bbb
--- a/mercurial/changelog.py	Thu Feb 11 17:13:22 2010 -0600
+++ b/mercurial/changelog.py	Thu Feb 11 17:44:01 2010 -0600
@@ -218,8 +218,13 @@
             parseddate = "%d %d" % util.parsedate(date)
         else:
             parseddate = "%d %d" % util.makedate()
-        if extra and extra.get("branch") in ("default", ""):
-            del extra["branch"]
+        if extra:
+            branch = extra.get("branch")
+            if branch in ("default", ""):
+                del extra["branch"]
+            elif branch in (".", "null", "tip"):
+                raise error.RevlogError(_('the name \'%s\' is reserved')
+                                        % branch)
         if extra:
             extra = encodeextra(extra)
             parseddate = "%s %s" % (parseddate, extra)