Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Matt Mackall
- Tue, 08 May 2012 17:05:45
Show More
hgext/largefiles/proto.py
0
+4
-2
@@
-20,8
+20,10
b' def putlfile(repo, proto, sha):'
20
user cache.'''
20
user cache.'''
21
proto . redirect ()
21
proto . redirect ()
22
22
23
tmpfp = util.atomictempfile(lfutil . storepath ( repo , sha ),
23
path = lfutil . storepath ( repo , sha )
24
createmode = repo . store . createmode )
24
util . makedirs ( os . path . dirname ( path ))
25
tmpfp = util . atomictempfile ( path , createmode = repo . store . createmode )
26
25
try :
27
try :
26
try :
28
try :
27
proto . getfile ( tmpfp )
29
proto . getfile ( tmpfp )
mercurial/commands.py
0
+1
0
@@
-647,6
+647,7
b' def bisect(ui, repo, rev=None, extra=Non'
647
try :
647
try :
648
while changesets :
648
while changesets :
649
# update state
649
# update state
650
hbisect . save_state ( repo , state )
650
status = util . system ( command , out = ui . fout )
651
status = util . system ( command , out = ui . fout )
651
if status == 125 :
652
if status == 125 :
652
transition = "skip"
653
transition = "skip"
mercurial/parsers.c
0
+1
-1
@@
-983,6
+983,7
b' static int index_init(indexObject *self,'
983
self -> ntdepth = self -> ntsplits = 0 ;
983
self -> ntdepth = self -> ntsplits = 0 ;
984
self -> ntlookups = self -> ntmisses = 0 ;
984
self -> ntlookups = self -> ntmisses = 0 ;
985
self -> ntrev = -1 ;
985
self -> ntrev = -1 ;
986
Py_INCREF ( self -> data );
986
987
987
if ( self -> inlined ) {
988
if ( self -> inlined ) {
988
long len = inline_scan ( self , NULL );
989
long len = inline_scan ( self , NULL );
@@
-998,7
+999,6
b' static int index_init(indexObject *self,'
998
self -> raw_length = size / 64 ;
999
self -> raw_length = size / 64 ;
999
self -> length = self -> raw_length + 1 ;
1000
self -> length = self -> raw_length + 1 ;
1000
}
1001
}
1001
Py_INCREF ( self -> data );
1002
1002
1003
return 0 ;
1003
return 0 ;
1004
bail :
1004
bail :
mercurial/pure/base85.py
0
+3
-2
@@
-54,9
+54,10
b' def b85decode(text):'
54
try :
54
try :
55
acc = acc * 85 + _b85dec [ c ]
55
acc = acc * 85 + _b85dec [ c ]
56
except KeyError :
56
except KeyError :
57
raise TypeError( 'Bad base85 character at byte %d ' % (i + j))
57
raise Valu eError( 'b ad base85 character at position %d '
58
% ( i + j ))
58
if acc > 4294967295 :
59
if acc > 4294967295 :
59
raise OverflowError( 'Base85 overflow in hunk starting at byte %d ' % i )
60
raise Value Error( 'Base85 overflow in hunk starting at byte %d ' % i )
60
out . append ( acc )
61
out . append ( acc )
61
62
62
# Pad final chunk if necessary
63
# Pad final chunk if necessary
mercurial/subrepo.py
0
+10
-2
@@
-43,8
+43,16
b' def state(ctx, ui):'
43
rev = {}
43
rev = {}
44
if '.hgsubstate' in ctx :
44
if '.hgsubstate' in ctx :
45
try :
45
try :
46
for l in ctx [ '.hgsubstate' ] . data () . splitlines ():
46
for i , l in enumerate ( ctx [ '.hgsubstate' ] . data () . splitlines ()) :
47
revision, path = l . split ( " ", 1)
47
l = l . l stri p()
48
if not l :
49
continue
50
try :
51
revision , path = l . split ( " " , 1 )
52
except ValueError :
53
raise util . Abort ( _ ( "invalid subrepository revision "
54
"specifier in .hgsubstate line %d " )
55
% ( i + 1 ))
48
rev [ path ] = revision
56
rev [ path ] = revision
49
except IOError , err :
57
except IOError , err :
50
if err . errno != errno . ENOENT :
58
if err . errno != errno . ENOENT :
tests/test-check-code-hg.t
0
0
-3
@@
-496,9
+496,6
b''
496
mercurial/patch.py:0:
496
mercurial/patch.py:0:
497
> except:
497
> except:
498
warning: naked except clause
498
warning: naked except clause
499
mercurial/pure/base85.py:0:
500
> raise OverflowError('Base85 overflow in hunk starting at byte %d' % i)
501
warning: line over 80 characters
502
mercurial/pure/mpatch.py:0:
499
mercurial/pure/mpatch.py:0:
503
> frags.extend(reversed(new)) # what was left at the end
500
> frags.extend(reversed(new)) # what was left at the end
504
warning: line over 80 characters
501
warning: line over 80 characters
tests/test-largefiles.t
0
+25
0
@@
-952,6
+952,31
b' Corrupt the cached largefile in r7'
952
[ 255 ]
952
[ 255 ]
953
$ rm - rf empty
953
$ rm - rf empty
954
954
955
Push a largefiles repository to a served empty repository
956
$ hg init r8
957
$ echo c3 > r8 / f1
958
$ hg add -- large r8 / f1 - R r8
959
$ hg commit - m "m1" - R r8
960
Invoking status precommit hook
961
A f1
962
$ hg init empty
963
$ hg serve - R empty - d - p $ HGPORT2 -- pid - file hg . pid \
964
> -- config 'web.allow_push=*' -- config web . push_ssl = False
965
$ cat hg . pid >> $ DAEMON_PIDS
966
$ rm ${ USERCACHE } /*
967
$ hg push - R r8 http : //localhost:$HGPORT2
968
pushing to http : //localhost:$HGPORT2/
969
searching for changes
970
searching for changes
971
remote : adding changesets
972
remote : adding manifests
973
remote : adding file changes
974
remote : added 1 changesets with 1 changes to 1 files
975
$ rm - rf empty
976
977
used all HGPORTs , kill all daemons
978
$ "$TESTDIR/killdaemons.py"
979
955
Clone a local repository owned by another user
980
Clone a local repository owned by another user
956
We have to simulate that here by setting $ HOME and removing write permissions
981
We have to simulate that here by setting $ HOME and removing write permissions
957
$ ORIGHOME = "$HOME"
982
$ ORIGHOME = "$HOME"
tests/test-subrepo-missing.t
0
+16
0
@@
-12,6
+12,22
b''
12
adding b
12
adding b
13
$ hg ci - m updatedsub
13
$ hg ci - m updatedsub
14
14
15
ignore blanklines in . hgsubstate
16
17
>>> file ( '.hgsubstate' , 'wb' ) . write ( ' \n\n \t \n \n ' )
18
$ hg st -- subrepos
19
M . hgsubstate
20
$ hg revert - qC . hgsubstate
21
22
abort more gracefully on . hgsubstate parsing error
23
24
$ cp . hgsubstate . hgsubstate . old
25
>>> file ( '.hgsubstate' , 'wb' ) . write ( ' \n invalid' )
26
$ hg st -- subrepos
27
abort : invalid subrepository revision specifier in . hgsubstate line 2
28
[ 255 ]
29
$ mv . hgsubstate . old . hgsubstate
30
15
delete . hgsub and revert it
31
delete . hgsub and revert it
16
32
17
$ rm . hgsub
33
$ rm . hgsub
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