--- 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)