Patchwork [4,of,4] push: use stepsdone for obsmarkers push

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 6, 2014, 12:07 a.m.
Message ID <7b85dd4f126a8d1f556e.1407283666@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5281/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 6, 2014, 12:07 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1406839877 25200
#      Thu Jul 31 13:51:17 2014 -0700
# Node ID 7b85dd4f126a8d1f556e101be7cd69ffb941c4f8
# Parent  f4a03fda065a5d97a7660af7de85bd63534c47cf
push: use stepsdone for obsmarkers push

We do not have infrastructure to include obsolescence markers in the bundle2
push from core. But extension may. so we make sure it would not be send twice.
Matt Mackall - Aug. 6, 2014, 12:30 a.m.
On Tue, 2014-08-05 at 17:07 -0700, pierre-yves.david@ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1406839877 25200
> #      Thu Jul 31 13:51:17 2014 -0700
> # Node ID 7b85dd4f126a8d1f556e101be7cd69ffb941c4f8
> # Parent  f4a03fda065a5d97a7660af7de85bd63534c47cf
> push: use stepsdone for obsmarkers push

These are queued for default, thanks.

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -588,13 +588,16 @@  def _localphasemove(pushop, nodes, phase
             pushop.ui.status(_('cannot lock source repo, skipping '
                                'local %s phase update\n') % phasestr)
 
 def _pushobsolete(pushop):
     """utility function to push obsolete markers to a remote"""
+    if 'obsmarkers' in pushop.stepsdone:
+        return
     pushop.ui.debug('try to push obsolete markers to remote\n')
     repo = pushop.repo
     remote = pushop.remote
+    pushop.stepsdone.add('obsmarkers')
     if (obsolete._enabled and repo.obsstore and
         'obsolete' in remote.listkeys('namespaces')):
         rslts = []
         remotedata = obsolete._pushkeyescape(pushop.outobsmarkers)
         for key in sorted(remotedata, reverse=True):