##// END OF EJS Templates
largefiles: remove the second `changing_parents` in `updatelfiles`...
marmoute -
r50914:eed104af default
parent child Browse files
Show More
@@ -579,43 +579,42 b' def updatelfiles('
579 579 statuswriter(_(b'getting changed largefiles\n'))
580 580 cachelfiles(ui, repo, None, lfiles)
581 581
582 with lfdirstate.changing_parents(repo):
583 for lfile in lfiles:
584 update1 = 0
582 for lfile in lfiles:
583 update1 = 0
585 584
586 expecthash = update.get(lfile)
587 if expecthash:
588 if not lfutil.copyfromcache(repo, expecthash, lfile):
589 # failed ... but already removed and set to normallookup
590 continue
591 # Synchronize largefile dirstate to the last modified
592 # time of the file
593 lfdirstate.hacky_extension_update_file(
594 lfile,
595 p1_tracked=True,
596 wc_tracked=True,
597 )
585 expecthash = update.get(lfile)
586 if expecthash:
587 if not lfutil.copyfromcache(repo, expecthash, lfile):
588 # failed ... but already removed and set to normallookup
589 continue
590 # Synchronize largefile dirstate to the last modified
591 # time of the file
592 lfdirstate.hacky_extension_update_file(
593 lfile,
594 p1_tracked=True,
595 wc_tracked=True,
596 )
597 update1 = 1
598
599 # copy the exec mode of largefile standin from the repository's
600 # dirstate to its state in the lfdirstate.
601 standin = lfutil.standin(lfile)
602 if wvfs.exists(standin):
603 # exec is decided by the users permissions using mask 0o100
604 standinexec = wvfs.stat(standin).st_mode & 0o100
605 st = wvfs.stat(lfile)
606 mode = st.st_mode
607 if standinexec != mode & 0o100:
608 # first remove all X bits, then shift all R bits to X
609 mode &= ~0o111
610 if standinexec:
611 mode |= (mode >> 2) & 0o111 & ~util.umask
612 wvfs.chmod(lfile, mode)
598 613 update1 = 1
599 614
600 # copy the exec mode of largefile standin from the repository's
601 # dirstate to its state in the lfdirstate.
602 standin = lfutil.standin(lfile)
603 if wvfs.exists(standin):
604 # exec is decided by the users permissions using mask 0o100
605 standinexec = wvfs.stat(standin).st_mode & 0o100
606 st = wvfs.stat(lfile)
607 mode = st.st_mode
608 if standinexec != mode & 0o100:
609 # first remove all X bits, then shift all R bits to X
610 mode &= ~0o111
611 if standinexec:
612 mode |= (mode >> 2) & 0o111 & ~util.umask
613 wvfs.chmod(lfile, mode)
614 update1 = 1
615 updated += update1
615 616
616 updated += update1
617
618 lfutil.synclfdirstate(repo, lfdirstate, lfile, normallookup)
617 lfutil.synclfdirstate(repo, lfdirstate, lfile, normallookup)
619 618
620 619 lfdirstate.write(repo.currenttransaction())
621 620 if lfiles:
General Comments 0
You need to be logged in to leave comments. Login now