hgext/transplant.py
changeset 4049 863465381028
parent 4035 c8f26bd24e86
child 4072 e916bc0dfdd6
equal deleted inserted replaced
4048:5d6b3fa62736 4049:863465381028
     5 # This software may be used and distributed according to the terms
     5 # This software may be used and distributed according to the terms
     6 # of the GNU General Public License, incorporated herein by reference.
     6 # of the GNU General Public License, incorporated herein by reference.
     7 
     7 
     8 from mercurial.i18n import _
     8 from mercurial.i18n import _
     9 import os, tempfile
     9 import os, tempfile
    10 from mercurial import bundlerepo, cmdutil, commands, hg, merge, patch, revlog
    10 from mercurial import bundlerepo, changegroup, cmdutil, commands, hg, merge
    11 from mercurial import util
    11 from mercurial import patch, revlog, util
    12 
    12 
    13 '''patch transplanting tool
    13 '''patch transplanting tool
    14 
    14 
    15 This extension allows you to transplant patches from another branch.
    15 This extension allows you to transplant patches from another branch.
    16 
    16 
   471             return (source, None, None)
   471             return (source, None, None)
   472 
   472 
   473         bundle = None
   473         bundle = None
   474         if not source.local():
   474         if not source.local():
   475             cg = source.changegroup(incoming, 'incoming')
   475             cg = source.changegroup(incoming, 'incoming')
   476             bundle = commands.write_bundle(cg, compress=False)
   476             bundle = changegroup.writebundle(cg, None, 'HG10UN')
   477             source = bundlerepo.bundlerepository(ui, repo.root, bundle)
   477             source = bundlerepo.bundlerepository(ui, repo.root, bundle)
   478 
   478 
   479         return (source, incoming, bundle)
   479         return (source, incoming, bundle)
   480 
   480 
   481     def incwalk(repo, incoming, branches, match=util.always):
   481     def incwalk(repo, incoming, branches, match=util.always):