Patchwork [1,of,2,remotenames-ext] remotenames: get rid of useless lookup

login
register
mail settings
Submitter Stanislau Hlebik
Date Feb. 21, 2017, 3:23 p.m.
Message ID <cf04161615a48d42a2bb.1487690603@devvm1840.lla2.facebook.com>
Download mbox | patch
Permalink /patch/18689/
State Accepted
Headers show

Comments

Stanislau Hlebik - Feb. 21, 2017, 3:23 p.m.
# HG changeset patch
# User Stanislau Hlebik <stash@fb.com>
# Date 1487690067 28800
#      Tue Feb 21 07:14:27 2017 -0800
# Node ID cf04161615a48d42a2bb6181060ae9be8ceaa467
# Parent  4f17d4ae821e7654b3c134002537155b28f7e146
remotenames: get rid of useless lookup

Lookup is useless since `bookmarks` dict already contains nodes for remote
bookmarks

Patch

diff --git a/remotenames.py b/remotenames.py
--- a/remotenames.py
+++ b/remotenames.py
@@ -158,8 +158,8 @@ 
                 if args[0]:
                     heads = args[0]
                 args = args[1:]
-            for bookmark in bookmarks:
-                heads.append(remote.lookup(remotebookmarks[bookmark]))
+            for node in bookmarks.values():
+                heads.append(bin(node))
             kwargs['bookmarks'] = bookmarks
             kwargs['heads'] = heads
     else: