# HG changeset patch # User Kevin Bullock # Date 2012-10-18 02:32:19 # Node ID ec892050f3c7a1bf96e6642c9a75d2edd3c93f7c # Parent 5023027240a191abab849e6941a7cc8c11816432 dirstate: use scmutil.checknewlabel to check new branch name diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -260,8 +260,8 @@ class dirstate(object): 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: