Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Augie Fackler
- Tue, 18 Dec 2018 15:21:25
Show More
mercurial/pure/osutil.py
0
+2
-1
@@
-267,7
+267,8
b' else:'
267
267
return self . _file . __setattr__ ( name , value )
268
268
269
269
def __enter__ ( self ):
270
return self . _file . __enter__ ()
270
self . _file . __enter__ ()
271
return self
271
272
272
273
def __exit__ ( self , exc_type , exc_value , exc_tb ):
273
274
return self . _file . __exit__ ( exc_type , exc_value , exc_tb )
mercurial/vfs.py
0
+2
-1
@@
-525,7
+525,8
b' class closewrapbase(object):'
525
525
return delattr ( self . _origfh , attr )
526
526
527
527
def __enter__ ( self ):
528
return self . _origfh . __enter__ ()
528
self . _origfh . __enter__ ()
529
return self
529
530
530
531
def __exit__ ( self , exc_type , exc_value , exc_tb ):
531
532
raise NotImplementedError ( 'attempted instantiating ' + str ( type ( self )))
mercurial/windows.py
0
+6
-2
@@
-70,7
+70,8
b' class mixedfilemodewrapper(object):'
70
70
object . __setattr__ ( self , r '_lastop' , 0 )
71
71
72
72
def __enter__ ( self ):
73
return self . _fp . __enter__ ()
73
self . _fp . __enter__ ()
74
return self
74
75
75
76
def __exit__ ( self , exc_type , exc_val , exc_tb ):
76
77
self . _fp . __exit__ ( exc_type , exc_val , exc_tb )
@@
-132,7
+133,10
b' class fdproxy(object):'
132
133
self . _fp = fp
133
134
134
135
def __enter__ ( self ):
135
return self . _fp . __enter__ ()
136
self . _fp . __enter__ ()
137
# Return this wrapper for the context manager so that the name is
138
# still available.
139
return self
136
140
137
141
def __exit__ ( self , exc_type , exc_value , traceback ):
138
142
self . _fp . __exit__ ( exc_type , exc_value , traceback )
mercurial/worker.py
0
+6
-6
@@
-213,11
+213,7
b' def _posixworker(ui, func, staticargs, a'
213
213
waitforworkers ()
214
214
signal . signal ( signal . SIGCHLD , oldchldhandler )
215
215
selector . close ()
216
status = problem [ 0 ]
217
if status :
218
if status < 0 :
219
os . kill ( os . getpid (), - status )
220
sys . exit ( status )
216
return problem [ 0 ]
221
217
try :
222
218
openpipes = len ( pipes )
223
219
while openpipes > 0 :
@@
-236,7
+232,11
b' def _posixworker(ui, func, staticargs, a'
236
232
killworkers ()
237
233
cleanup ()
238
234
raise
239
cleanup ()
235
status = cleanup ()
236
if status :
237
if status < 0 :
238
os . kill ( os . getpid (), - status )
239
sys . exit ( status )
240
240
241
241
def _posixexitstatus ( code ):
242
242
'''convert a posix exit status into the same form returned by
tests/run-tests.py
0
+18
-1
@@
-587,6
+587,17
b' def rename(src, dst):'
587
587
shutil . copy ( src , dst )
588
588
os . remove ( src )
589
589
590
def makecleanable ( path ):
591
"""Try to fix directory permission recursively so that the entire tree
592
can be deleted"""
593
for dirpath , dirnames , _filenames in os . walk ( path , topdown = True ):
594
for d in dirnames :
595
p = os . path . join ( dirpath , d )
596
try :
597
os . chmod ( p , os . stat ( p ) . st_mode & 0o777 | 0o700 ) # chmod u+rwx
598
except OSError :
599
pass
600
590
601
_unified_diff = difflib . unified_diff
591
602
if PYTHON3 :
592
603
import functools
@@
-953,7
+964,13
b' class Test(unittest.TestCase):'
953
964
( self . _testtmp . decode ( 'utf-8' ),
954
965
self . _threadtmp . decode ( 'utf-8' )))
955
966
else :
956
shutil . rmtree ( self . _testtmp , True )
967
try :
968
shutil . rmtree ( self . _testtmp )
969
except OSError :
970
# unreadable directory may be left in $TESTTMP; fix permission
971
# and try again
972
makecleanable ( self . _testtmp )
973
shutil . rmtree ( self . _testtmp , True )
957
974
shutil . rmtree ( self . _threadtmp , True )
958
975
959
976
if self . _usechg :
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