Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Matt Mackall
- Thu, 11 Feb 2010 23:44:01
Show More
mercurial/changelog.py
0
+7
-2
@@
-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 )
mercurial/dirstate.py
0
+2
0
@@
-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
tests/test-branches
0
+4
0
@@
-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'
tests/test-branches.out
0
+3
0
@@
-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
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages