[PATCH] push: only says we are trying to push obsmarkers when we actually try to
Augie Fackler
raf at durin42.com
Fri Jun 12 17:08:17 CDT 2015
On Thu, Jun 11, 2015 at 01:05:17PM -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1434052941 25200
> # Thu Jun 11 13:02:21 2015 -0700
> # Node ID 09f0ba262437f02dd3054f477f9c3a4713b85c02
> # Parent e8075329c5fbb651508777c15cb6bc9ae33b5dff
> push: only says we are trying to push obsmarkers when we actually try to
This is queued, thanks.
>
> The message was issue unconditionally, we moves it inside the if that actually
> try to push something.
>
> diff --git a/mercurial/exchange.py b/mercurial/exchange.py
> --- a/mercurial/exchange.py
> +++ b/mercurial/exchange.py
> @@ -787,15 +787,15 @@ def _localphasemove(pushop, nodes, phase
>
> 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 pushop.outobsmarkers:
> + pushop.ui.debug('try to push obsolete markers to remote\n')
> rslts = []
> remotedata = obsolete._pushkeyescape(sorted(pushop.outobsmarkers))
> for key in sorted(remotedata, reverse=True):
> # reverse sort to ensure we end with dump0
> data = remotedata[key]
> diff --git a/tests/test-acl.t b/tests/test-acl.t
> --- a/tests/test-acl.t
> +++ b/tests/test-acl.t
> @@ -130,11 +130,10 @@ Extension disabled for lack of a hook
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> $ echo '[hooks]' >> $config
> @@ -196,11 +195,10 @@ Extension disabled for lack of acl.sourc
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> No [acl.allow]/[acl.deny]
> @@ -273,11 +271,10 @@ No [acl.allow]/[acl.deny]
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> Empty [acl.allow]
> @@ -764,11 +761,10 @@ barney is allowed everywhere
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> wilma can change files with a .txt extension
> @@ -1083,11 +1079,10 @@ acl.config can set only [acl.allow]/[acl
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> asterisk
> @@ -1170,11 +1165,10 @@ fred is always allowed
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> $ echo '[acl.deny]' >> $config
> @@ -1330,11 +1324,10 @@ OS-level groups
> bundle2-input-bundle: with-transaction
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 1 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 0 (undo push)
> 0:6675d58eff77
>
>
> $ echo '[acl.deny]' >> $config
> @@ -1537,11 +1530,10 @@ No branch acls specified
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 2 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 2 (undo push)
> 2:fb35475503ef
>
>
> Branch acl deny test
> @@ -1834,11 +1826,10 @@ Branch acl allow other
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 2 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 2 (undo push)
> 2:fb35475503ef
>
>
> Branch acl conflicting allow
> @@ -1928,11 +1919,10 @@ push foobar into the remote
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 2 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 2 (undo push)
> 2:fb35475503ef
>
> Branch acl conflicting deny
>
> @@ -2090,11 +2080,10 @@ User 'astro' must not be denied
> bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
> bundle2-input-bundle: 2 parts total
> listing keys for "phases"
> - try to push obsolete markers to remote
> repository tip rolled back to revision 2 (undo push)
> 2:fb35475503ef
>
>
> Non-astro users must be denied
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list