Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
10367:b8801b58bbd8 | 10417:58e040c51231 |
---|---|
200 def setparents(self, p1, p2=nullid): | 200 def setparents(self, p1, p2=nullid): |
201 self._dirty = self._dirtypl = True | 201 self._dirty = self._dirtypl = True |
202 self._pl = p1, p2 | 202 self._pl = p1, p2 |
203 | 203 |
204 def setbranch(self, branch): | 204 def setbranch(self, branch): |
205 if branch in ['tip', '.', 'null']: | |
206 raise util.Abort(_('the name \'%s\' is reserved') % branch) | |
205 self._branch = branch | 207 self._branch = branch |
206 self._opener("branch", "w").write(branch + '\n') | 208 self._opener("branch", "w").write(branch + '\n') |
207 | 209 |
208 def _read(self): | 210 def _read(self): |
209 self._map = {} | 211 self._map = {} |