tests/test-hg-parseurl.py
author Pierre-Yves David <pierre-yves.david@fb.com>
Sun, 12 Apr 2015 14:26:11 -0400
changeset 24748 d6caadff4779
parent 13897 375872fdadba
child 28745 8a23f88131c3
permissions -rw-r--r--
develwarn: handle the end of line inside the function itself The traceback version should not have a end of line at all. The non-traceback version will requires the same things soon.

from mercurial.hg import parseurl

def testparse(url, branch=[]):
    print '%s, branches: %r' % parseurl(url, branch)

testparse('http://example.com/no/anchor')
testparse('http://example.com/an/anchor#foo')
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)
testparse('http://example.com/')
testparse('http://example.com')
testparse('http://example.com#foo')