[PATCH] histedit: improve error msg when run on nodes with children (issue5056)

Kostia Balytskyi ikostia at fb.com
Mon Feb 29 16:23:49 EST 2016


"can only histedit a changeset together with descendants" ?




On 2/29/16, 9:05 PM, "Mercurial-devel on behalf of Augie Fackler" <mercurial-devel-bounces at mercurial-scm.org on behalf of raf at durin42.com> wrote:

>On Mon, Feb 29, 2016 at 11:51:20AM -0800, Sean Farley wrote:
>>
>> liscju <piotr.listkiewicz at gmail.com> writes:
>>
>> > # HG changeset patch
>> > # User liscju <piotr.listkiewicz at gmail.com>
>> > # Date 1456755146 -3600
>> > #      Mon Feb 29 15:12:26 2016 +0100
>> > # Node ID 6fbd67c792b907efa62a7b36832921483f2d8e38
>> > # Parent  41dcd754526612c43b9695df8851557c851828ef
>> > histedit: improve error msg when run on nodes with children (issue5056)
>> >
>> > diff -r 41dcd7545266 -r 6fbd67c792b9 hgext/histedit.py
>> > --- a/hgext/histedit.py	Wed Feb 24 15:55:44 2016 -0600
>> > +++ b/hgext/histedit.py	Mon Feb 29 15:12:26 2016 +0100
>> > @@ -1282,7 +1282,7 @@ def between(repo, old, new, keep):
>> >      if ctxs and not keep:
>> >          if (not obsolete.isenabled(repo, obsolete.allowunstableopt) and
>> >              repo.revs('(%ld::) - (%ld)', ctxs, ctxs)):
>> > -            raise error.Abort(_('cannot edit history that would orphan nodes'))
>> > +            raise error.Abort(_('cannot histedit changeset with children'))
>>
>> To my ear, this doesn't quite sound right. I'm a little at a lost for
>> better wording, though.
>
>I agree. It's missing some slight subtlety, in that you can histedit a
>node with children iff you edit all of the children.
>
>That said, the "orphan nodes" wording definitely needs to go. The
>replacement needs to not be ambiguous in a way that makes it
>half-inaccurate. Sadly, I have no better suggestion at the moment.
>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at mercurial-scm.org
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mercurial-2Dscm.org_mailman_listinfo_mercurial-2Ddevel&d=CwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=Pp-gQYFgs4tKlSFPF5kfCw&m=a4IWsfUHT2RWLhKG31jeM19CsmKYOHxF5_dFBCWgGlc&s=z25GqsTLox015I2yihFXI3fjtpr9lRFng8RtoEE_bQ0&e= 
>_______________________________________________
>Mercurial-devel mailing list
>Mercurial-devel at mercurial-scm.org
>https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mercurial-2Dscm.org_mailman_listinfo_mercurial-2Ddevel&d=CwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=Pp-gQYFgs4tKlSFPF5kfCw&m=a4IWsfUHT2RWLhKG31jeM19CsmKYOHxF5_dFBCWgGlc&s=z25GqsTLox015I2yihFXI3fjtpr9lRFng8RtoEE_bQ0&e= 


More information about the Mercurial-devel mailing list