mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Merge with stable
This commit is contained in:
commit
f938c786bf
@ -722,10 +722,7 @@ def checknlink(testfile):
|
||||
|
||||
try:
|
||||
os_link(testfile, f)
|
||||
except OSError, inst:
|
||||
if inst.errno == errno.EINVAL:
|
||||
# FS doesn't support creating hardlinks
|
||||
return True
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
try:
|
||||
@ -1026,6 +1023,9 @@ def datestr(date=None, format='%a %b %d %H:%M:%S %Y %1%2'):
|
||||
number of seconds away from UTC. if timezone is false, do not
|
||||
append time zone to string."""
|
||||
t, tz = date or makedate()
|
||||
if t < 0:
|
||||
t = 0 # time.gmtime(lt) fails on Windows for lt < -43200
|
||||
tz = 0
|
||||
if "%1" in format or "%2" in format:
|
||||
sign = (tz > 0) and "-" or "+"
|
||||
minutes = abs(tz) // 60
|
||||
|
Loading…
Reference in New Issue
Block a user