[PATCH 6 of 9 V2] push: refuse to push unstable changeset without force
Augie Fackler
raf at durin42.com
Fri Jul 6 20:11:56 CDT 2012
On Jul 6, 2012, at 1:54 PM, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1341532508 -7200
> # Node ID 4c9a282e873277ae9d225505bc28a8822da4253f
> # Parent 8373a40bd8d6beb57da7dd560aab872623849246
> push: refuse to push unstable changeset without force
>
> User should resolve unstability locally before pushing the same way we encourage
> user to merge locally instead of pushing a new remote head.
>
> If we are to push obsolete changeset, at least one set of the pushed set will be
> either obsolete or unstable. The check is narrowed to only heads.
>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -1733,14 +1733,20 @@ class localrepository(repo.repository):
> # something to push
> if not force:
> # if self.obsstore == False --> no obsolete
> # then, save the iteration
> if self.obsstore:
> - msg = "push includes an obsolete changeset: %s!"
> - for node in outgoing.missing:
> + msg = "push includes an %s changeset: %%s!"
> + for node in outgoing.missingheads:
> ctx = self[node]
Same nit about _() wrapping the strings inline. Hopefully someone that understands internationalization better than I do can chime in.
More information about the Mercurial-devel
mailing list