mirror of
https://github.com/git/git.git
synced 2026-02-18 13:49:51 +00:00
15 lines
335 B
Python
15 lines
335 B
Python
#!/usr/bin/env python
|
|
|
|
from mercurial import hg
|
|
|
|
def parseurl(url, heads=[]):
|
|
url, heads = hg.parseurl(url, heads)
|
|
if isinstance(heads, tuple) and len(heads) == 2:
|
|
# hg 1.6 or later
|
|
_junk, heads = heads
|
|
if heads:
|
|
checkout = heads[0]
|
|
else:
|
|
checkout = None
|
|
return url, heads, checkout
|