<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 10, 2019, 03:37 Pierre-Yves David <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 4/10/19 2:26 AM, Martin von Zweigbergk via Mercurial-devel wrote:<br>
> <br>
> <br>
> On Tue, Apr 9, 2019 at 7:44 AM Pierre-Yves David <br>
> <<a href="mailto:pierre-yves.david@ens-lyon.org" target="_blank" rel="noreferrer">pierre-yves.david@ens-lyon.org</a> <mailto:<a href="mailto:pierre-yves.david@ens-lyon.org" target="_blank" rel="noreferrer">pierre-yves.david@ens-lyon.org</a>>> <br>
> wrote:<br>
> <br>
>     PAtch looks good overall, but has compatibility issue with older<br>
>     version. Can you have a look at my comment below?<br>
> <br>
>     On 4/3/19 4:45 AM, Matt Harbison wrote:<br>
>      > # HG changeset patch<br>
>      > # User Matt Harbison <<a href="mailto:matt_harbison@yahoo.com" target="_blank" rel="noreferrer">matt_harbison@yahoo.com</a><br>
>     <mailto:<a href="mailto:matt_harbison@yahoo.com" target="_blank" rel="noreferrer">matt_harbison@yahoo.com</a>>><br>
>      > # Date 1554259321 14400<br>
>      > #      Tue Apr 02 22:42:01 2019 -0400<br>
>      > # Node ID 272e76e20c3c52fcae8a4c2003f73d8db77e566b<br>
>      > # Parent  e8515ee7a7cc0281d905f762e26e8956ccfd7f74<br>
>      > uncommit: abort if an explicitly given file cannot be uncommitted<br>
>     (BC)<br>
>      ><br>
>      > This corresponds to f4147ca63d39 in the core uncommit extension.<br>
>      ><br>
>      > diff --git a/hgext3rd/evolve/cmdrewrite.py<br>
>     b/hgext3rd/evolve/cmdrewrite.py<br>
>      > --- a/hgext3rd/evolve/cmdrewrite.py<br>
>      > +++ b/hgext3rd/evolve/cmdrewrite.py<br>
>      > @@ -520,17 +520,42 @@<br>
>      >           if disallowunstable and not onahead:<br>
>      >               raise error.Abort(_("cannot uncommit in the middle<br>
>     of a stack"))<br>
>      ><br>
>      > +        match = scmutil.match(old, pats, opts)<br>
>      > +<br>
>      > +        # Check all explicitly given files; abort if there's a<br>
>     problem.<br>
>      > +        if match.files():<br>
>      > +            s = old.status(old.p1(), match, listclean=True)<br>
>      > +            eligible = set(s.added) | set(s.modified) |<br>
>     set(s.removed)<br>
>      > +<br>
>      > +            badfiles = set(match.files()) - eligible<br>
>      > +<br>
>      > +            # Naming a parent directory of an eligible file is<br>
>     OK, even<br>
>      > +            # if not everything tracked in that directory can be<br>
>      > +            # uncommitted.<br>
>      > +            if badfiles:<br>
>      > +                badfiles -= set([f for f in util.dirs(eligible)])<br>
>      > +<br>
>      > +            for f in sorted(badfiles):<br>
>      > +                if f in s.clean:<br>
>      > +                    hint = _(b"file was not changed in working<br>
>     directory "<br>
>      > +                             b"parent")<br>
>      > +                elif repo.wvfs.exists(f):<br>
>      > +                    hint = _(b"file was untracked in working<br>
>     directory parent")<br>
>      > +                else:<br>
>      > +                    hint = _(b"file does not exist")<br>
>      > +<br>
>      > +                raise error.Abort(_(b'cannot uncommit "%s"')<br>
>      > +                                  %<br>
>     scmutil.getuipathfn(repo)(f), hint=hint)<br>
>      > +<br>
> <br>
>     Evolve is compatible with version down to 4.4 and `getuipathfn` seems<br>
>     newer than that. Can you send a V2 compatible with the older version ?<br>
> <br>
> <br>
> Pierre-Yves, it may not be clear to Matt what exactly he's supposed to <br>
> do (it isn't to me anyway).<br>
<br>
It is not to me either. The constraint is that we need a version <br>
compatible with older version. Any approach consistent with the rest of <br>
the evolve code base/behavior will work.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Sure, I was just hoping that you knew the evolve code base better than we do :P I tried to help Matt before I sent my previous email by trying to figure out if uncommit seemed to use absolute paths or relative paths, but I couldn't find an answer. If you also don't know the answer, I suppose it's not very important which solution Matt picks (as I said before).</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Specifically, does `hg uncommit` try to use <br>
> absolute or relative paths? I'm thinking it's probably not a big deal <br>
> for now and an absolute path is okay? If that's the case, you could <br>
> simply replace the "scmutil.getuipathfn(repo)(f)" by "f" in flight if <br>
> that's okay with both of you.<br>
> <br>
> <br>
>     Cheers,<br>
> <br>
>     -- <br>
>     Pierre-Yves David<br>
>     _______________________________________________<br>
>     Mercurial-devel mailing list<br>
>     <a href="mailto:Mercurial-devel@mercurial-scm.org" target="_blank" rel="noreferrer">Mercurial-devel@mercurial-scm.org</a><br>
>     <mailto:<a href="mailto:Mercurial-devel@mercurial-scm.org" target="_blank" rel="noreferrer">Mercurial-devel@mercurial-scm.org</a>><br>
>     <a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer noreferrer" target="_blank">https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel</a><br>
> <br>
> <br>
> _______________________________________________<br>
> Mercurial-devel mailing list<br>
> <a href="mailto:Mercurial-devel@mercurial-scm.org" target="_blank" rel="noreferrer">Mercurial-devel@mercurial-scm.org</a><br>
> <a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer noreferrer" target="_blank">https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel</a><br>
> <br>
<br>
-- <br>
Pierre-Yves David<br>
</blockquote></div></div></div>