Show More
@@ -540,7 +540,7 b' def updatelfiles(' | |||
|
540 | 540 | expecthash = lfutil.readasstandin(wctx[standin]) |
|
541 | 541 | if expecthash != b'': |
|
542 | 542 | if lfile not in wctx: # not switched to normal file |
|
543 |
if repo.dirstate |
|
|
543 | if repo.dirstate.get_entry(standin).any_tracked: | |
|
544 | 544 | wvfs.unlinkpath(lfile, ignoremissing=True) |
|
545 | 545 | else: |
|
546 | 546 | dropped.add(lfile) |
@@ -269,7 +269,7 b' def listlfiles(repo, rev=None, matcher=N' | |||
|
269 | 269 | return [ |
|
270 | 270 | splitstandin(f) |
|
271 | 271 | for f in repo[rev].walk(matcher) |
|
272 |
if rev is not None or repo.dirstate |
|
|
272 | if rev is not None or repo.dirstate.get_entry(f).any_tracked | |
|
273 | 273 | ] |
|
274 | 274 | |
|
275 | 275 | |
@@ -558,7 +558,7 b' def synclfdirstate(repo, lfdirstate, lfi' | |||
|
558 | 558 | if lfstandin not in repo.dirstate: |
|
559 | 559 | lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=False) |
|
560 | 560 | else: |
|
561 |
stat = repo.dirstate. |
|
|
561 | stat = repo.dirstate.get_entry(lfstandin) | |
|
562 | 562 | state, mtime = stat.state, stat.mtime |
|
563 | 563 | if state == b'n': |
|
564 | 564 | if normallookup or mtime < 0 or not repo.wvfs.exists(lfile): |
@@ -713,7 +713,7 b' def updatestandinsbymatch(repo, match):' | |||
|
713 | 713 | lfdirstate = openlfdirstate(ui, repo) |
|
714 | 714 | for fstandin in standins: |
|
715 | 715 | lfile = splitstandin(fstandin) |
|
716 |
if lfdirstate |
|
|
716 | if lfdirstate.get_entry(lfile).tracked: | |
|
717 | 717 | updatestandin(repo, lfile, fstandin) |
|
718 | 718 | |
|
719 | 719 | # Cook up a new matcher that only matches regular files or |
@@ -737,10 +737,10 b' def updatestandinsbymatch(repo, match):' | |||
|
737 | 737 | # standin removal, drop the normal file if it is unknown to dirstate. |
|
738 | 738 | # Thus, skip plain largefile names but keep the standin. |
|
739 | 739 | if f in lfiles or fstandin in standins: |
|
740 |
if repo.dirstate |
|
|
741 |
if repo.dirstate |
|
|
740 | if not repo.dirstate.get_entry(fstandin).removed: | |
|
741 | if not repo.dirstate.get_entry(f).removed: | |
|
742 | 742 | continue |
|
743 |
elif repo.dirstate |
|
|
743 | elif not repo.dirstate.get_entry(f).any_tracked: | |
|
744 | 744 | continue |
|
745 | 745 | |
|
746 | 746 | actualfiles.append(f) |
@@ -934,7 +934,7 b' def overriderevert(orig, ui, repo, ctx, ' | |||
|
934 | 934 | standin = lfutil.standin(f) |
|
935 | 935 | if standin in ctx or standin in mctx: |
|
936 | 936 | matchfiles.append(standin) |
|
937 |
elif standin in wctx or lfdirstate |
|
|
937 | elif standin in wctx or lfdirstate.get_entry(f).removed: | |
|
938 | 938 | continue |
|
939 | 939 | else: |
|
940 | 940 | matchfiles.append(f) |
@@ -1591,8 +1591,12 b' def overridepurge(orig, ui, repo, *dirs,' | |||
|
1591 | 1591 | node1, node2, match, ignored, clean, unknown, listsubrepos |
|
1592 | 1592 | ) |
|
1593 | 1593 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1594 | unknown = [f for f in r.unknown if lfdirstate[f] == b'?'] | |
|
1595 | ignored = [f for f in r.ignored if lfdirstate[f] == b'?'] | |
|
1594 | unknown = [ | |
|
1595 | f for f in r.unknown if not lfdirstate.get_entry(f).any_tracked | |
|
1596 | ] | |
|
1597 | ignored = [ | |
|
1598 | f for f in r.ignored if not lfdirstate.get_entry(f).any_tracked | |
|
1599 | ] | |
|
1596 | 1600 | return scmutil.status( |
|
1597 | 1601 | r.modified, r.added, r.removed, r.deleted, unknown, ignored, r.clean |
|
1598 | 1602 | ) |
@@ -1609,7 +1613,7 b' def overriderollback(orig, ui, repo, **o' | |||
|
1609 | 1613 | orphans = { |
|
1610 | 1614 | f |
|
1611 | 1615 | for f in repo.dirstate |
|
1612 |
if lfutil.isstandin(f) and repo.dirstate |
|
|
1616 | if lfutil.isstandin(f) and not repo.dirstate.get_entry(f).removed | |
|
1613 | 1617 | } |
|
1614 | 1618 | result = orig(ui, repo, **opts) |
|
1615 | 1619 | after = repo.dirstate.parents() |
@@ -1620,7 +1624,7 b' def overriderollback(orig, ui, repo, **o' | |||
|
1620 | 1624 | for f in repo.dirstate: |
|
1621 | 1625 | if lfutil.isstandin(f): |
|
1622 | 1626 | orphans.discard(f) |
|
1623 |
if repo.dirstate |
|
|
1627 | if repo.dirstate.get_entry(f).removed: | |
|
1624 | 1628 | repo.wvfs.unlinkpath(f, ignoremissing=True) |
|
1625 | 1629 | elif f in pctx: |
|
1626 | 1630 | fctx = pctx[f] |
General Comments 0
You need to be logged in to leave comments.
Login now