[PATCH 03 of 10] histedit: use cg?unpacker.apply() instead of changegroup.addchangegroup()

Augie Fackler raf at durin42.com
Wed Oct 14 12:34:28 CDT 2015


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1444770861 14400
#      Tue Oct 13 17:14:21 2015 -0400
# Node ID a2cf25ebbe3d6eaa5e2dcddd355ff8384dc35028
# Parent  2c2ad8c31a6d64c9186a7260d82aef79c61c75ac
histedit: use cg?unpacker.apply() instead of changegroup.addchangegroup()

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -163,7 +163,6 @@ import sys
 from mercurial import cmdutil
 from mercurial import discovery
 from mercurial import error
-from mercurial import changegroup
 from mercurial import copies
 from mercurial import context
 from mercurial import exchange
@@ -823,8 +822,7 @@ def _histedit(ui, repo, state, *freeargs
                 backupfile = repo.join(state.backupfile)
                 f = hg.openpath(ui, backupfile)
                 gen = exchange.readbundle(ui, f, backupfile)
-                changegroup.addchangegroup(repo, gen, 'histedit',
-                                        'bundle:' + backupfile)
+                gen.apply(repo, 'histedit', 'bundle:' + backupfile)
                 os.remove(backupfile)
 
             # check whether we should update away


More information about the Mercurial-devel mailing list