Show More
@@ -579,43 +579,42 def updatelfiles( | |||||
579 | statuswriter(_(b'getting changed largefiles\n')) |
|
579 | statuswriter(_(b'getting changed largefiles\n')) | |
580 | cachelfiles(ui, repo, None, lfiles) |
|
580 | cachelfiles(ui, repo, None, lfiles) | |
581 |
|
581 | |||
582 | with lfdirstate.changing_parents(repo): |
|
582 | for lfile in lfiles: | |
583 | for lfile in lfiles: |
|
583 | update1 = 0 | |
584 | update1 = 0 |
|
|||
585 |
|
584 | |||
586 |
|
|
585 | expecthash = update.get(lfile) | |
587 |
|
|
586 | if expecthash: | |
588 |
|
|
587 | if not lfutil.copyfromcache(repo, expecthash, lfile): | |
589 |
|
|
588 | # failed ... but already removed and set to normallookup | |
590 |
|
|
589 | continue | |
591 |
|
|
590 | # Synchronize largefile dirstate to the last modified | |
592 |
|
|
591 | # time of the file | |
593 |
|
|
592 | lfdirstate.hacky_extension_update_file( | |
594 |
|
|
593 | lfile, | |
595 |
|
|
594 | p1_tracked=True, | |
596 |
|
|
595 | wc_tracked=True, | |
597 |
|
|
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 | update1 = 1 |
|
613 | update1 = 1 | |
599 |
|
614 | |||
600 | # copy the exec mode of largefile standin from the repository's |
|
615 | updated += update1 | |
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 |
|
616 | |||
616 | updated += update1 |
|
617 | lfutil.synclfdirstate(repo, lfdirstate, lfile, normallookup) | |
617 |
|
||||
618 | lfutil.synclfdirstate(repo, lfdirstate, lfile, normallookup) |
|
|||
619 |
|
618 | |||
620 | lfdirstate.write(repo.currenttransaction()) |
|
619 | lfdirstate.write(repo.currenttransaction()) | |
621 | if lfiles: |
|
620 | if lfiles: |
General Comments 0
You need to be logged in to leave comments.
Login now