Patchwork tags: rename "head" to "node" where we don't care

login
register
mail settings
Submitter via Mercurial-devel
Date April 3, 2017, 6:33 p.m.
Message ID <4c62d47c4cf11da5127e.1491244380@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/19935/
State Accepted
Headers show

Comments

via Mercurial-devel - April 3, 2017, 6:33 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1491238898 25200
#      Mon Apr 03 10:01:38 2017 -0700
# Node ID 4c62d47c4cf11da5127e9ded4b060c8723269723
# Parent  ac69675fff1caacf143ab7f0bda668e6e325670a
tags: rename "head" to "node" where we don't care

Followup to 5eb4d206202b (tags: extract fnode retrieval into its own
function, 2017-03-28) in which the "for head in head" became "for head
in nodes".
Augie Fackler - April 3, 2017, 7:14 p.m.
On Mon, Apr 03, 2017 at 11:33:00AM -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1491238898 25200
> #      Mon Apr 03 10:01:38 2017 -0700
> # Node ID 4c62d47c4cf11da5127e9ded4b060c8723269723
> # Parent  ac69675fff1caacf143ab7f0bda668e6e325670a
> tags: rename "head" to "node" where we don't care

queued, thanks

>
> Followup to 5eb4d206202b (tags: extract fnode retrieval into its own
> function, 2017-03-28) in which the "for head in head" became "for head
> in nodes".
>
> diff -r ac69675fff1c -r 4c62d47c4cf1 mercurial/tags.py
> --- a/mercurial/tags.py	Wed Mar 29 21:43:38 2017 +0900
> +++ b/mercurial/tags.py	Mon Apr 03 10:01:38 2017 -0700
> @@ -380,10 +380,10 @@
>      starttime = util.timer()
>      fnodescache = hgtagsfnodescache(repo.unfiltered())
>      cachefnode = {}
> -    for head in reversed(nodes):
> -        fnode = fnodescache.getfnode(head)
> +    for node in reversed(nodes):
> +        fnode = fnodescache.getfnode(node)
>          if fnode != nullid:
> -            cachefnode[head] = fnode
> +            cachefnode[node] = fnode
>
>      fnodescache.write()
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff -r ac69675fff1c -r 4c62d47c4cf1 mercurial/tags.py
--- a/mercurial/tags.py	Wed Mar 29 21:43:38 2017 +0900
+++ b/mercurial/tags.py	Mon Apr 03 10:01:38 2017 -0700
@@ -380,10 +380,10 @@ 
     starttime = util.timer()
     fnodescache = hgtagsfnodescache(repo.unfiltered())
     cachefnode = {}
-    for head in reversed(nodes):
-        fnode = fnodescache.getfnode(head)
+    for node in reversed(nodes):
+        fnode = fnodescache.getfnode(node)
         if fnode != nullid:
-            cachefnode[head] = fnode
+            cachefnode[node] = fnode
 
     fnodescache.write()