##// END OF EJS Templates
largefiles: clarify variable name holding file mode...
Mads Kiilerich -
r30269:d71db0e3 default
parent child Browse files
Show More
@@ -510,18 +510,21 b' def updatelfiles(ui, repo, filelist=None'
510 510 lfdirstate.normal(lfile)
511 511 update1 = 1
512 512
513 # copy the state of largefile standin from the repository's
513 # copy the exec mode of largefile standin from the repository's
514 514 # dirstate to its state in the lfdirstate.
515 515 rellfile = lfile
516 516 relstandin = lfutil.standin(lfile)
517 517 if wvfs.exists(relstandin):
518 # exec is decided by the users permissions using mask 0o100
518 519 standinexec = wvfs.stat(relstandin).st_mode & 0o100
519 st = wvfs.stat(rellfile).st_mode
520 if standinexec != st & 0o100:
521 st &= ~0o111
520 st = wvfs.stat(rellfile)
521 mode = st.st_mode
522 if standinexec != mode & 0o100:
523 # first remove all X bits, then shift all R bits to X
524 mode &= ~0o111
522 525 if standinexec:
523 st |= (st >> 2) & 0o111 & ~util.umask
524 wvfs.chmod(rellfile, st)
526 mode |= (mode >> 2) & 0o111 & ~util.umask
527 wvfs.chmod(rellfile, mode)
525 528 update1 = 1
526 529
527 530 updated += update1
General Comments 0
You need to be logged in to leave comments. Login now