repo.or.cz
/
git
/
dscho.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
remote-hg: another case of Postel's law
[git/dscho.git]
/
git_remote_helpers
/
hg
/
util.py
blob
2cd54c1ad0223fb9a0d219a85ff3524841724db7
1
#!/usr/bin/env python
2
3
from
mercurial
import
hg
4
5
def
parseurl
(
url
,
heads
=[]):
6
url
,
heads
=
hg
.
parseurl
(
url
,
heads
)
7
if
isinstance
(
heads
,
tuple
)
and
len
(
heads
) ==
2
:
8
# hg 1.6 or later
9
_junk
,
heads
=
heads
10
if
heads
:
11
checkout
=
heads
[
0
]
12
else
:
13
checkout
=
None
14
return
url
,
heads
,
checkout