Patchwork [09,of,10] localrepo: use cg?unpacker.apply() instead of changegroup.addchangegroup()

login
register
mail settings
Submitter Augie Fackler
Date Oct. 14, 2015, 5:34 p.m.
Message ID <166d8cee14236633f130.1444844074@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/11061/
State Accepted
Headers show

Comments

Augie Fackler - Oct. 14, 2015, 5:34 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1444770847 14400
#      Tue Oct 13 17:14:07 2015 -0400
# Node ID 166d8cee14236633f130cb2ef91d91251243f665
# Parent  7c28bf6a7317b0643ddabfb4746fee3f5e951d4b
localrepo: use cg?unpacker.apply() instead of changegroup.addchangegroup()

This is in localpeer, so it lives. Had it been in localrepo instead, I
would have tried to exterminate it.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -159,7 +159,7 @@  class localpeer(peer.peerrepository):
         return self._repo.lock()
 
     def addchangegroup(self, cg, source, url):
-        return changegroup.addchangegroup(self._repo, cg, source, url)
+        return cg.apply(self._repo, source, url)
 
     def pushkey(self, namespace, key, old, new):
         return self._repo.pushkey(namespace, key, old, new)