Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 10417:58e040c51231 stable
branch: avoid using reserved tag names
Reported as Debian bug #552423.
author | Wagner Bruna <wbruna@softwareexpress.com.br> |
---|---|
date | Thu, 11 Feb 2010 12:02:48 -0200 |
parents | 25e572394f5c |
children | 41d0ed2c79df |
line wrap: on
line diff
--- 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')