tests/test-hg-parseurl.py
author David Soria Parra <davidsp@fb.com>
Wed, 08 Jan 2014 12:25:00 -0800
branchstable
changeset 20228 45aac162da03
parent 13897 375872fdadba
child 28745 8a23f88131c3
permissions -rw-r--r--
i18n-de: rename noun "entfernt" to "Gegenseite" The German translation for "remote" as "entfernt" can be misleading in situations where remote is used as a noun. "entfernt" is not a noun and can also mean "removed". To clarify this we rename "remote" to "Gegenseite" when used as a noun.

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