Files
git/git_remote_helpers/hg/util.py
Sverre Rabbelier 4051c85671 git-remote-hg: add GitExporter/GitImporter/NonLocalGit
This is inftrastructure required to implement git-remote-hg.
2012-05-11 23:25:51 -05:00

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