2016-04-04 00:29:03 +03:00
|
|
|
from __future__ import absolute_import, print_function
|
2016-04-05 17:18:52 +03:00
|
|
|
|
|
|
|
from mercurial import (
|
|
|
|
hg,
|
2016-04-04 00:27:04 +03:00
|
|
|
)
|
2009-04-24 20:17:42 +04:00
|
|
|
|
2010-02-07 16:29:07 +03:00
|
|
|
def testparse(url, branch=[]):
|
2016-04-05 17:18:52 +03:00
|
|
|
print('%s, branches: %r' % hg.parseurl(url, branch))
|
2009-04-24 20:17:42 +04:00
|
|
|
|
|
|
|
testparse('http://example.com/no/anchor')
|
|
|
|
testparse('http://example.com/an/anchor#foo')
|
2010-02-07 16:29:07 +03:00
|
|
|
testparse('http://example.com/no/anchor/branches', branch=['foo'])
|
|
|
|
testparse('http://example.com/an/anchor/branches#bar', branch=['foo'])
|
|
|
|
testparse('http://example.com/an/anchor/branches-None#foo', branch=None)
|
2011-04-06 14:48:59 +04:00
|
|
|
testparse('http://example.com/')
|
|
|
|
testparse('http://example.com')
|
|
|
|
testparse('http://example.com#foo')
|