tests/test-hg-parseurl.py
author Brodie Rao <brodie@bitheap.org>
Wed, 29 Jun 2011 13:20:39 -0400
branchstable
changeset 14768 55db12e54450
parent 13897 375872fdadba
child 28745 8a23f88131c3
permissions -rw-r--r--
color: fix TypeError with auto mode on win32 when colors aren't available (issue2871) This can happen when stdout isn't a terminal (e.g., it's being piped).

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')