Patchwork [02,of,21,RFC] changegroup: don't look up unused base node in revchunk

login
register
mail settings
Submitter michaeljedgar@gmail.com
Date Sept. 11, 2014, 12:26 a.m.
Message ID <4ddf6bdba3e218f3809a.1410395163@adgar-macbookpro3.roam.corp.google.com>
Download mbox | patch
Permalink /patch/5778/
State Changes Requested
Headers show

Comments

michaeljedgar@gmail.com - Sept. 11, 2014, 12:26 a.m.
# HG changeset patch
# User Mike Edgar <adgar@google.com>
# Date 1409521853 -7200
#      Sun Aug 31 23:50:53 2014 +0200
# Node ID 4ddf6bdba3e218f3809a1632348167f54498e1e7
# Parent  44e926f8ae03bc1e0822c282a77538a875353ecf
changegroup: don't look up unused base node in revchunk

This value was unused, and the "base" node lookup should always succeed.

Patch

diff -r 44e926f8ae03 -r 4ddf6bdba3e2 mercurial/changegroup.py
--- a/mercurial/changegroup.py	Sun Aug 31 23:46:20 2014 +0200
+++ b/mercurial/changegroup.py	Sun Aug 31 23:50:53 2014 +0200
@@ -422,7 +422,6 @@ 
         else:
             delta = revlog.revdiff(base, rev)
         p1n, p2n = revlog.parents(node)
-        basenode = revlog.node(base)
         meta = struct.pack(self.deltaheader, node, p1n, p2n, linknode)
         meta += prefix
         l = len(meta) + len(delta)