[PATCH STABLE] push: restore old behavior of default-push (issue5000)

Sean Farley sean at farley.io
Sat Dec 26 15:18:42 CST 2015


Yuya Nishihara <yuya at tcha.org> writes:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1451110696 -32400
> #      Sat Dec 26 15:18:16 2015 +0900
> # Branch stable
> # Node ID 11ec0887bf0e7b1cdc13996fab9cbd1fae0b5c52
> # Parent  707cdf2c370093601865bc4a489fbc3e1b167aa0
> push: restore old behavior of default-push (issue5000)
>
> This effectively backs out dceaef70e410 and 10917b062adf.
>
> We can't handle "default-push" just like "default:pushurl" because it is a
> stand-alone named path. Instead, I have two ideas to work around the issue:
>
>  a. two defaults: getpath(dest, default=('default-push', 'default'))
>  b. virtual path: getpath(dest, default=':default')
>
> (a) is conservative approach and will have less trouble, but callers have
> to specify they need "default-push" or "default". (b) generates hidden
> ":default" path from "default" and "default-push", and callers request
> ":default". This will require some tricks and won't work if there are
> conflicting sub-options valid for both "pull" and "push".
>
> I'll take (a) for default branch. This patch should NOT BE MERGED to default
> except for tests because it would break handling of "pushurl" sub-option.

I think you mean 'for stable branch'?


More information about the Mercurial-devel mailing list