Patchwork D690: changegroup: avoid creating empty changegroup part

login
register
mail settings
Submitter phabricator
Date Sept. 12, 2017, 11:42 p.m.
Message ID <4c355ab4accc9b10fdbdf39ae4c14d3c@localhost.localdomain>
Download mbox | patch
Permalink /patch/23821/
State Not Applicable
Headers show

Comments

phabricator - Sept. 12, 2017, 11:42 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG709b44f38ab9: changegroup: avoid creating empty changegroup part (authored by durham, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D690?vs=1762&id=1774

REVISION DETAIL
  https://phab.mercurial-scm.org/D690

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS




To: durham, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1632,8 +1632,9 @@ 
                 raise ValueError(_('no common changegroup version'))
             version = max(cgversions)
         outgoing = _computeoutgoing(repo, heads, common)
-        cgstream = changegroup.makestream(repo, outgoing, version, source,
-                                          bundlecaps=bundlecaps)
+        if outgoing.missing:
+            cgstream = changegroup.makestream(repo, outgoing, version, source,
+                                              bundlecaps=bundlecaps)
 
     if cgstream:
         part = bundler.newpart('changegroup', data=cgstream)