hgext/largefiles/reposetup.py
changeset 28878 a75c9665ef06
parent 28876 79b8f052ee51
child 29314 bde283a1ad1a
--- a/hgext/largefiles/reposetup.py	Wed Apr 13 01:45:45 2016 +0200
+++ b/hgext/largefiles/reposetup.py	Sun Mar 27 13:00:28 2016 -0700
@@ -353,10 +353,14 @@
     repo._lfstatuswriters = [ui.status]
 
     def prepushoutgoinghook(pushop):
-        if pushop.outgoing.missing:
+        """Push largefiles for pushop before pushing revisions."""
+        lfrevs = pushop.lfrevs
+        if lfrevs is None:
+            lfrevs = pushop.outgoing.missing
+        if lfrevs:
             toupload = set()
             addfunc = lambda fn, lfhash: toupload.add(lfhash)
-            lfutil.getlfilestoupload(pushop.repo, pushop.outgoing.missing,
+            lfutil.getlfilestoupload(pushop.repo, lfrevs,
                                      addfunc)
             lfcommands.uploadlfiles(ui, pushop.repo, pushop.remote, toupload)
     repo.prepushoutgoinghooks.add("largefiles", prepushoutgoinghook)