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