##// END OF EJS Templates
Merge with stable
Matt Mackall -
r10420:41d0ed2c merge default
parent child Browse files
Show More
@@ -218,8 +218,13 b' class changelog(revlog.revlog):'
218 218 parseddate = "%d %d" % util.parsedate(date)
219 219 else:
220 220 parseddate = "%d %d" % util.makedate()
221 if extra and extra.get("branch") in ("default", ""):
222 del extra["branch"]
221 if extra:
222 branch = extra.get("branch")
223 if branch in ("default", ""):
224 del extra["branch"]
225 elif branch in (".", "null", "tip"):
226 raise error.RevlogError(_('the name \'%s\' is reserved')
227 % branch)
223 228 if extra:
224 229 extra = encodeextra(extra)
225 230 parseddate = "%s %s" % (parseddate, extra)
@@ -208,6 +208,8 b' class dirstate(object):'
208 208 self._pl = p1, p2
209 209
210 210 def setbranch(self, branch):
211 if branch in ['tip', '.', 'null']:
212 raise util.Abort(_('the name \'%s\' is reserved') % branch)
211 213 self._branch = branch
212 214 self._opener("branch", "w").write(branch + '\n')
213 215
@@ -36,6 +36,10 b' hg add c'
36 36 hg branch c
37 37 hg commit -d '5 0' -m "Adding c branch"
38 38
39 hg branch tip
40 hg branch null
41 hg branch .
42
39 43 echo 'd' >d
40 44 hg add d
41 45 hg branch 'a branch name much longer than the default justification used by branches'
@@ -6,6 +6,9 b' marked working directory as branch b'
6 6 created new head
7 7 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
8 8 marked working directory as branch c
9 abort: the name 'tip' is reserved
10 abort: the name 'null' is reserved
11 abort: the name '.' is reserved
9 12 marked working directory as branch a branch name much longer than the default justification used by branches
10 13 a branch name much longer than the default justification used by branches 7:10ff5895aa57
11 14 b 4:aee39cd168d0
General Comments 0
You need to be logged in to leave comments. Login now