diff mercurial/changelog.py @ 10420:41d0ed2c79df

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 11 Feb 2010 17:44:01 -0600
parents 08a0f04b56bd 58e040c51231
children 97ed99d1f419 bd23d5f28bbb
line wrap: on
line diff
--- 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)