hgext/largefiles/overrides.py
changeset 47654 2af9709ea13c
parent 47653 00d70f61d856
child 47655 0ab58b1f228f
equal deleted inserted replaced
47653:00d70f61d856 47654:2af9709ea13c
  1378     # Need to lock because standin files are deleted then removed from the
  1378     # Need to lock because standin files are deleted then removed from the
  1379     # repository and we could race in-between.
  1379     # repository and we could race in-between.
  1380     with repo.wlock():
  1380     with repo.wlock():
  1381         lfdirstate = lfutil.openlfdirstate(ui, repo)
  1381         lfdirstate = lfutil.openlfdirstate(ui, repo)
  1382         for f in forget:
  1382         for f in forget:
  1383             if lfdirstate[f] == b'a':
  1383             lfdirstate.set_untracked(f)
  1384                 lfdirstate.drop(f)
       
  1385             else:
       
  1386                 lfdirstate.remove(f)
       
  1387         lfdirstate.write()
  1384         lfdirstate.write()
  1388         standins = [lfutil.standin(f) for f in forget]
  1385         standins = [lfutil.standin(f) for f in forget]
  1389         for f in standins:
  1386         for f in standins:
  1390             repo.wvfs.unlinkpath(f, ignoremissing=True)
  1387             repo.wvfs.unlinkpath(f, ignoremissing=True)
  1391         rejected = repo[None].forget(standins)
  1388         rejected = repo[None].forget(standins)