Files
git/git_remote_helpers/hg/util.py
Sverre Rabbelier 64dd19ab54 git-remote-hg: add GitExporter/GitImporter/NonLocalGit
This is inftrastructure required to implement git-remote-hg.
2013-01-31 23:46:56 +00: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