comparison hgext/largefiles/overrides.py @ 48170:941fbaab5aff

largefiles: partially undo 61e526585b20e2ff15f19497d0451d18fea02db8 and child Since the largefiles dirstate is now part of transaction, we get rid of this temporary fix which lived for ~7 years. Differential Revision: https://phab.mercurial-scm.org/D11612
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Jul 2021 04:13:50 +0530
parents df3021c1f093
children 322525db4c98
comparison
equal deleted inserted replaced
48169:1e98f9b5bc71 48170:941fbaab5aff
1634 # 'm' or 'n' (coming from the 2nd parent) cases 1634 # 'm' or 'n' (coming from the 2nd parent) cases
1635 lfutil.writestandin(repo, f, b'', False) 1635 lfutil.writestandin(repo, f, b'', False)
1636 for standin in orphans: 1636 for standin in orphans:
1637 repo.wvfs.unlinkpath(standin, ignoremissing=True) 1637 repo.wvfs.unlinkpath(standin, ignoremissing=True)
1638 1638
1639 lfdirstate = lfutil.openlfdirstate(ui, repo)
1640 with lfdirstate.parentchange():
1641 orphans = set(lfdirstate)
1642 lfiles = lfutil.listlfiles(repo)
1643 for file in lfiles:
1644 lfutil.synclfdirstate(repo, lfdirstate, file, True)
1645 orphans.discard(file)
1646 for lfile in orphans:
1647 lfdirstate.update_file(
1648 lfile, p1_tracked=False, wc_tracked=False
1649 )
1650 lfdirstate.write()
1651 return result 1639 return result
1652 1640
1653 1641
1654 @eh.wrapcommand(b'transplant', extension=b'transplant') 1642 @eh.wrapcommand(b'transplant', extension=b'transplant')
1655 def overridetransplant(orig, ui, repo, *revs, **opts): 1643 def overridetransplant(orig, ui, repo, *revs, **opts):