diff -r b8801b58bbd8 -r 58e040c51231 mercurial/dirstate.py --- a/mercurial/dirstate.py Sun Feb 07 11:38:36 2010 +0100 +++ b/mercurial/dirstate.py Thu Feb 11 12:02:48 2010 -0200 @@ -202,6 +202,8 @@ self._pl = p1, p2 def setbranch(self, branch): + if branch in ['tip', '.', 'null']: + raise util.Abort(_('the name \'%s\' is reserved') % branch) self._branch = branch self._opener("branch", "w").write(branch + '\n')