changeset 17819:ec892050f3c7

dirstate: use scmutil.checknewlabel to check new branch name
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 17 Oct 2012 21:32:19 -0500
parents 5023027240a1
children c547e1acc37c
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Wed Oct 17 17:23:39 2012 -0500
+++ b/mercurial/dirstate.py	Wed Oct 17 21:32:19 2012 -0500
@@ -260,8 +260,8 @@
         return copies
 
     def setbranch(self, branch):
-        if branch in ['tip', '.', 'null']:
-            raise util.Abort(_('the name \'%s\' is reserved') % branch)
+        # no repo object here, just check for reserved names
+        scmutil.checknewlabel(None, branch)
         self._branch = encoding.fromlocal(branch)
         f = self._opener('branch', 'w', atomictemp=True)
         try: