equal
deleted
inserted
replaced
233 |
233 |
234 @wireprotocommand(b'branchmap', permission=b'pull') |
234 @wireprotocommand(b'branchmap', permission=b'pull') |
235 def branchmap(repo, proto): |
235 def branchmap(repo, proto): |
236 branchmap = repo.branchmap() |
236 branchmap = repo.branchmap() |
237 heads = [] |
237 heads = [] |
238 for branch, nodes in pycompat.iteritems(branchmap): |
238 for branch, nodes in branchmap.items(): |
239 branchname = urlreq.quote(encoding.fromlocal(branch)) |
239 branchname = urlreq.quote(encoding.fromlocal(branch)) |
240 branchnodes = wireprototypes.encodelist(nodes) |
240 branchnodes = wireprototypes.encodelist(nodes) |
241 heads.append(b'%s %s' % (branchname, branchnodes)) |
241 heads.append(b'%s %s' % (branchname, branchnodes)) |
242 |
242 |
243 return wireprototypes.bytesresponse(b'\n'.join(heads)) |
243 return wireprototypes.bytesresponse(b'\n'.join(heads)) |
430 @wireprotocommand(b'getbundle', b'*', permission=b'pull') |
430 @wireprotocommand(b'getbundle', b'*', permission=b'pull') |
431 def getbundle(repo, proto, others): |
431 def getbundle(repo, proto, others): |
432 opts = options( |
432 opts = options( |
433 b'getbundle', wireprototypes.GETBUNDLE_ARGUMENTS.keys(), others |
433 b'getbundle', wireprototypes.GETBUNDLE_ARGUMENTS.keys(), others |
434 ) |
434 ) |
435 for k, v in pycompat.iteritems(opts): |
435 for k, v in opts.items(): |
436 keytype = wireprototypes.GETBUNDLE_ARGUMENTS[k] |
436 keytype = wireprototypes.GETBUNDLE_ARGUMENTS[k] |
437 if keytype == b'nodes': |
437 if keytype == b'nodes': |
438 opts[k] = wireprototypes.decodelist(v) |
438 opts[k] = wireprototypes.decodelist(v) |
439 elif keytype == b'csv': |
439 elif keytype == b'csv': |
440 opts[k] = list(v.split(b',')) |
440 opts[k] = list(v.split(b',')) |