##// 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 lfdirstate.normal(lfile)
510 lfdirstate.normal(lfile)
511 update1 = 1
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 # dirstate to its state in the lfdirstate.
514 # dirstate to its state in the lfdirstate.
515 rellfile = lfile
515 rellfile = lfile
516 relstandin = lfutil.standin(lfile)
516 relstandin = lfutil.standin(lfile)
517 if wvfs.exists(relstandin):
517 if wvfs.exists(relstandin):
518 # exec is decided by the users permissions using mask 0o100
518 standinexec = wvfs.stat(relstandin).st_mode & 0o100
519 standinexec = wvfs.stat(relstandin).st_mode & 0o100
519 st = wvfs.stat(rellfile).st_mode
520 st = wvfs.stat(rellfile)
520 if standinexec != st & 0o100:
521 mode = st.st_mode
521 st &= ~0o111
522 if standinexec != mode & 0o100:
523 # first remove all X bits, then shift all R bits to X
524 mode &= ~0o111
522 if standinexec:
525 if standinexec:
523 st |= (st >> 2) & 0o111 & ~util.umask
526 mode |= (mode >> 2) & 0o111 & ~util.umask
524 wvfs.chmod(rellfile, st)
527 wvfs.chmod(rellfile, mode)
525 update1 = 1
528 update1 = 1
526
529
527 updated += update1
530 updated += update1
General Comments 0
You need to be logged in to leave comments. Login now