Mercurial > hg
comparison hgext/largefiles/overrides.py @ 47650:1e5a9783bba8
largefile: use `set_tracked` in the `hg copy` overwrite
This is the new shiny API.
Differential Revision: https://phab.mercurial-scm.org/D11106
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Jul 2021 01:24:29 +0200 |
parents | 4b17971f0181 |
children | 12300ee6840b |
comparison
equal
deleted
inserted
replaced
47649:4b17971f0181 | 47650:1e5a9783bba8 |
---|---|
861 repo.wvfs.unlinkpath(srclfile, ignoremissing=True) | 861 repo.wvfs.unlinkpath(srclfile, ignoremissing=True) |
862 lfdirstate.remove(srclfile) | 862 lfdirstate.remove(srclfile) |
863 else: | 863 else: |
864 util.copyfile(repo.wjoin(srclfile), repo.wjoin(destlfile)) | 864 util.copyfile(repo.wjoin(srclfile), repo.wjoin(destlfile)) |
865 | 865 |
866 lfdirstate.add(destlfile) | 866 lfdirstate.set_tracked(destlfile) |
867 lfdirstate.write() | 867 lfdirstate.write() |
868 except error.Abort as e: | 868 except error.Abort as e: |
869 if e.message != _(b'no files to copy'): | 869 if e.message != _(b'no files to copy'): |
870 raise e | 870 raise e |
871 else: | 871 else: |