[PATCH 3 of 5] largefiles: only update changed largefiles when transplanting
Na'Tosha Bard
natosha at unity3d.com
Fri Mar 9 10:13:10 CST 2012
# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1331303173 -3600
# Node ID a536632a5fc5ad897efa840fe4f78dc4025a4ce7
# Parent 20ec6609b1fbf1b578f05ba3f75d4f90c50086ef
largefiles: only update changed largefiles when transplanting
diff -r 20ec6609b1fb -r a536632a5fc5 hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py Fri Mar 09 14:42:55 2012 +0100
+++ b/hgext/largefiles/overrides.py Fri Mar 09 15:26:13 2012 +0100
@@ -960,10 +960,13 @@
def override_transplant(orig, ui, repo, *revs, **opts):
try:
+ oldstandins = lfutil.getstandinsstate(repo)
repo._istransplanting = True
result = orig(ui, repo, *revs, **opts)
- lfcommands.updatelfiles(ui, repo, filelist=None,
- printmessage=False)
+ newstandins = lfutil.getstandinsstate(repo)
+ filelist = lfutil.getlfilestoupdate(oldstandins, newstandins)
+ lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
+ printmessage=True)
finally:
repo._istransplanting = False
return result
diff -r 20ec6609b1fb -r a536632a5fc5 tests/test-largefiles.t
--- a/tests/test-largefiles.t Fri Mar 09 14:42:55 2012 +0100
+++ b/tests/test-largefiles.t Fri Mar 09 15:26:13 2012 +0100
@@ -728,6 +728,8 @@
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files
+ getting changed largefiles
+ 1 largefiles updated, 0 removed
$ hg log --template '{rev}:{node|short} {desc|firstline}\n'
9:598410d3eb9a modify normal file largefile in repo d
8:a381d2c8c80e modify normal file and largefile in repo b
More information about the Mercurial-devel
mailing list