comparison mercurial/commands.py @ 20933:d3775db748a0

localrepo: move the addchangegroup method in changegroup module This is a gratuitous code move aimed at reducing the localrepo bloatness. The method had few callers, not enough to be kept in local repo.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 01 Apr 2014 15:27:53 -0700
parents 4a987060d97e
children 6ae0c41e4b52
comparison
equal deleted inserted replaced
20932:0ac83e4e4f7c 20933:d3775db748a0
5778 wc = repo['.'] 5778 wc = repo['.']
5779 try: 5779 try:
5780 for fname in fnames: 5780 for fname in fnames:
5781 f = hg.openpath(ui, fname) 5781 f = hg.openpath(ui, fname)
5782 gen = changegroup.readbundle(f, fname) 5782 gen = changegroup.readbundle(f, fname)
5783 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) 5783 modheads = changegroup.addchangegroup(repo, gen, 'unbundle',
5784 'bundle:' + fname)
5784 finally: 5785 finally:
5785 lock.release() 5786 lock.release()
5786 bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch()) 5787 bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch())
5787 return postincoming(ui, repo, modheads, opts.get('update'), None) 5788 return postincoming(ui, repo, modheads, opts.get('update'), None)
5788 5789