Submitter | Manuel Jacob |
---|---|
Date | July 2, 2020, 12:52 a.m. |
Message ID | <06b190a2b1ebcdc18e27.1593651145@tmp.fritz.box> |
Download | mbox | patch |
Permalink | /patch/46611/ |
State | Accepted |
Headers | show |
Comments
This looks good to me. On 7/2/20 2:52 AM, Manuel Jacob wrote: > # HG changeset patch > # User Manuel Jacob <me@manueljacob.de> > # Date 1593651069 -7200 > # Thu Jul 02 02:51:09 2020 +0200 > # Node ID 06b190a2b1ebcdc18e2741561625f366eee0c676 > # Parent 97cae21cfbb7ba5ea6e8046ae45914520873eb97 > # EXP-Topic cmdutil-cleanup > cleanup: use slightly more meaningful name for temporary variable > > Not that it makes a big difference, but using `p` instead of `x` is clearer to > me. > > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py > --- a/mercurial/cmdutil.py > +++ b/mercurial/cmdutil.py > @@ -3438,7 +3438,7 @@ > and bheads > and node not in bheads > and not any( > - x.node() in bheads and x.branch() == branch for x in parents > + p.node() in bheads and p.branch() == branch for p in parents > ) > ): > repo.ui.status(_(b'created new head\n')) > > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel >
On Fri, 3 Jul 2020 11:31:19 +0200, Pierre-Yves David wrote: > This looks good to me. > > On 7/2/20 2:52 AM, Manuel Jacob wrote: > > # HG changeset patch > > # User Manuel Jacob <me@manueljacob.de> > > # Date 1593651069 -7200 > > # Thu Jul 02 02:51:09 2020 +0200 > > # Node ID 06b190a2b1ebcdc18e2741561625f366eee0c676 > > # Parent 97cae21cfbb7ba5ea6e8046ae45914520873eb97 > > # EXP-Topic cmdutil-cleanup > > cleanup: use slightly more meaningful name for temporary variable > > > > Not that it makes a big difference, but using `p` instead of `x` is clearer to > > me. Queued per review, thanks.
Patch
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -3438,7 +3438,7 @@ and bheads and node not in bheads and not any( - x.node() in bheads and x.branch() == branch for x in parents + p.node() in bheads and p.branch() == branch for p in parents ) ): repo.ui.status(_(b'created new head\n'))