[PATCH 3 of 4 V2] largefiles: return the list of added files from addlargefiles()

Matt Harbison mharbison72 at gmail.com
Wed Jan 7 20:45:08 CST 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1420068678 18000
#      Wed Dec 31 18:31:18 2014 -0500
# Node ID f843ab9f31087ea4b51f34e13c717abdd21ee5be
# Parent  fe0eea88e103c50524da3699cf03ec1787b49a0f
largefiles: return the list of added files from addlargefiles()

This will be used to exclude largefile candidates from the normal file matcher,
which will allow add and addremove dryruns to not print a file as both a normal
and a large file.

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -154,9 +154,11 @@
             bad += [lfutil.splitstandin(f)
                     for f in repo[None].add(standins)
                     if f in m.files()]
+
+        added = [f for f in lfnames if f not in bad]
     finally:
         wlock.release()
-    return bad
+    return added, bad
 
 def removelargefiles(ui, repo, isaddremove, matcher, **opts):
     after = opts.get('after')
@@ -247,7 +249,7 @@
             raise util.Abort(_('--normal cannot be used with --large'))
         return orig(ui, repo, *pats, **opts)
     matcher = scmutil.match(repo[None], pats, opts)
-    bad = addlargefiles(ui, repo, False, matcher, **opts)
+    added, bad = addlargefiles(ui, repo, False, matcher, **opts)
     installnormalfilesmatchfn(repo[None].manifest())
     result = orig(ui, repo, *pats, **opts)
     restorematchfn()


More information about the Mercurial-devel mailing list