Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 20928:91b47139d0cb
localrepo: move the getlocalbundle method in changegroup module
This is a gratuitous code move aimed at reducing the localrepo bloatness.
The method had 3 callers total, far too few for being kept in local repo.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 01 Apr 2014 14:33:23 -0700 |
parents | cc62c9d6887a |
children | 4a987060d97e |
comparison
equal
deleted
inserted
replaced
20927:24a443948627 | 20928:91b47139d0cb |
---|---|
1140 heads = revs and map(repo.lookup, revs) or revs | 1140 heads = revs and map(repo.lookup, revs) or revs |
1141 outgoing = discovery.findcommonoutgoing(repo, other, | 1141 outgoing = discovery.findcommonoutgoing(repo, other, |
1142 onlyheads=heads, | 1142 onlyheads=heads, |
1143 force=opts.get('force'), | 1143 force=opts.get('force'), |
1144 portable=True) | 1144 portable=True) |
1145 cg = repo.getlocalbundle('bundle', outgoing, bundlecaps) | 1145 cg = changegroup.getlocalbundle(repo, 'bundle', outgoing, bundlecaps) |
1146 if not cg: | 1146 if not cg: |
1147 scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) | 1147 scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) |
1148 return 1 | 1148 return 1 |
1149 | 1149 |
1150 changegroup.writebundle(cg, fname, bundletype) | 1150 changegroup.writebundle(cg, fname, bundletype) |