[PATCH] log: prefer 'wctx' over 'pctx' for working context
Durham Goode
durham at fb.com
Thu Mar 19 11:33:41 CDT 2015
On 3/19/15 9:24 AM, Martin von Zweigbergk wrote:
>
>
> On Thu, Mar 19, 2015 at 9:19 AM Martin von Zweigbergk
> <martinvonz at google.com <mailto:martinvonz at google.com>> wrote:
>
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com
> <mailto:martinvonz at google.com>>
> # Date 1426740265 25200
> # Wed Mar 18 21:44:25 2015 -0700
> # Node ID ef0698d6c3bb363ec4d7face69409f6555d0e7c2
> # Parent 5cb459dc32d209653a3e5d77749cf989ab9a51e4
> log: prefer 'wctx' over 'pctx' for working context
>
> diff -r 5cb459dc32d2 -r ef0698d6c3bb mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py Tue Oct 28 22:32:18 2014 -0700
> +++ b/mercurial/cmdutil.py Wed Mar 18 21:44:25 2015 -0700
> @@ -1924,12 +1924,12 @@
> # _matchfiles() revset but walkchangerevs() builds its
> matcher with
> # scmutil.match(). The difference is input pats are globbed on
> # platforms without shell expansion (windows).
> - pctx = repo[None]
> - match, pats = scmutil.matchandpats(pctx, pats, opts)
> + wctx = repo[None]
> + match, pats = scmutil.matchandpats(wctx, pats, opts)
> slowpath = match.anypats() or (match.files() and
> opts.get('removed'))
> if not slowpath:
> for f in match.files():
> - if follow and f not in pctx:
> + if follow and f not in wctx:
>
>
> Hmm... perhaps this was meant to be repo['.']? The error message soon
> after says "cannot follow file not in parent revision". Durham, you
> touched this code a while back (July 2014), do you have any idea?
>
Yea, the message seems a bit wrong (but it's the message from prior to
my change too). Functionality wise I could see this going either way
(repo['.'] or repo[None]). Probably not a big deal though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150319/4fe9de06/attachment.html>
More information about the Mercurial-devel
mailing list