comparison mercurial/cmdutil.py @ 5177:92236732d5a1

move parseurl from cmdutil to hg
author Matt Mackall <mpm@selenic.com>
date Wed, 15 Aug 2007 16:10:36 -0500
parents d5126a0172ba
children 18a9fbb5cd78
comparison
equal deleted inserted replaced
5176:664a1c312972 5177:92236732d5a1
457 if opts.get('ssh'): 457 if opts.get('ssh'):
458 ui.setconfig("ui", "ssh", opts['ssh']) 458 ui.setconfig("ui", "ssh", opts['ssh'])
459 if opts.get('remotecmd'): 459 if opts.get('remotecmd'):
460 ui.setconfig("ui", "remotecmd", opts['remotecmd']) 460 ui.setconfig("ui", "remotecmd", opts['remotecmd'])
461 461
462 def parseurl(url, revs):
463 '''parse url#branch, returning url, branch + revs'''
464
465 if '#' not in url:
466 return url, (revs or None)
467
468 url, rev = url.split('#', 1)
469 return url, revs + [rev]
470
471 def revpair(repo, revs): 462 def revpair(repo, revs):
472 '''return pair of nodes, given list of revisions. second item can 463 '''return pair of nodes, given list of revisions. second item can
473 be None, meaning use working dir.''' 464 be None, meaning use working dir.'''
474 465
475 def revfix(repo, val, defval): 466 def revfix(repo, val, defval):