tests/test-hg-parseurl.py
author Siddharth Agarwal <sid0@fb.com>
Wed, 13 Aug 2014 15:51:33 -0700
branchstable
changeset 22170 0e1b02f984c7
parent 13897 375872fdadba
child 28745 8a23f88131c3
permissions -rw-r--r--
largefiles: don't override matchandpats for always matchers (issue4334) This makes hg log --follow --patch work, since in cmdutil._makelogrevset we use the non-follow matcher for hg log --follow --patch with no file arguments.

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