histedit: use cg?unpacker.apply() instead of changegroup.addchangegroup()
authorAugie Fackler <augie@google.com>
Tue, 13 Oct 2015 17:14:21 -0400
changeset 26696 78aa4392c261
parent 26695 1121fced5b20
child 26697 008761affe3f
histedit: use cg?unpacker.apply() instead of changegroup.addchangegroup()
hgext/histedit.py
--- a/hgext/histedit.py	Tue Oct 13 16:58:51 2015 -0400
+++ b/hgext/histedit.py	Tue Oct 13 17:14:21 2015 -0400
@@ -163,7 +163,6 @@
 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 @@
                 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