Mercurial > public > mercurial-scm > hg
comparison mercurial/wireproto.py @ 20930:4a987060d97e
localrepo: move the getbundle 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.
The peer API remains unchanged.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 01 Apr 2014 14:40:35 -0700 |
parents | 24a443948627 |
children | de60ca3a390e |
comparison
equal
deleted
inserted
replaced
20929:afe0b48ef2d7 | 20930:4a987060d97e |
---|---|
600 for k, v in opts.iteritems(): | 600 for k, v in opts.iteritems(): |
601 if k in ('heads', 'common'): | 601 if k in ('heads', 'common'): |
602 opts[k] = decodelist(v) | 602 opts[k] = decodelist(v) |
603 elif k == 'bundlecaps': | 603 elif k == 'bundlecaps': |
604 opts[k] = set(v.split(',')) | 604 opts[k] = set(v.split(',')) |
605 cg = repo.getbundle('serve', **opts) | 605 cg = changegroupmod.getbundle(repo, 'serve', **opts) |
606 return streamres(proto.groupchunks(cg)) | 606 return streamres(proto.groupchunks(cg)) |
607 | 607 |
608 @wireprotocommand('heads') | 608 @wireprotocommand('heads') |
609 def heads(repo, proto): | 609 def heads(repo, proto): |
610 h = repo.heads() | 610 h = repo.heads() |