diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -578,6 +578,15 @@ def overridefilemerge(origfn, repo, myno repo.wwrite(fcd.path(), fco.data(), fco.flags()) return 0 +def copiespathcopies(orig, ctx1, ctx2): + copies = orig(ctx1, ctx2) + updated = {} + + for k, v in copies.iteritems(): + updated[lfutil.splitstandin(k) or k] = lfutil.splitstandin(v) or v + + return updated + # Copy first changes the matchers to match standins instead of # largefiles. Then it overrides util.copyfile in that function it # checks if the destination largefile already exists. It also keeps a diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py --- a/hgext/largefiles/uisetup.py +++ b/hgext/largefiles/uisetup.py @@ -9,7 +9,7 @@ '''setup for largefiles extension: uisetup''' from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \ - httppeer, merge, scmutil, sshpeer, wireproto, revset, subrepo + httppeer, merge, scmutil, sshpeer, wireproto, revset, subrepo, copies from mercurial.i18n import _ from mercurial.hgweb import hgweb_mod, webcommands @@ -37,6 +37,8 @@ def uisetup(ui): extensions.wrapfunction(cmdutil, 'remove', overrides.cmdutilremove) extensions.wrapfunction(cmdutil, 'forget', overrides.cmdutilforget) + extensions.wrapfunction(copies, 'pathcopies', overrides.copiespathcopies) + # Subrepos call status function entry = extensions.wrapcommand(commands.table, 'status', overrides.overridestatus) diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t --- a/tests/test-subrepo-deep-nested-change.t +++ b/tests/test-subrepo-deep-nested-change.t @@ -419,4 +419,24 @@ Test a directory commit with a changed l A a.dat A a.txt + $ hg ci -m "add a.*" + $ hg mv a.dat b.dat + $ hg mv foo/bar/abc foo/bar/def + $ hg status -C + A b.dat + a.dat + A foo/bar/def + foo/bar/abc + R a.dat + R foo/bar/abc + + $ hg ci -m "move large and normal" + $ hg status -C --rev '.^' --rev . + A b.dat + a.dat + A foo/bar/def + foo/bar/abc + R a.dat + R foo/bar/abc + $ cd ..