tests/test-hg-parseurl.py
author Daniel J. Lauk <daniel.lauk@gmail.com>
Wed, 11 Aug 2010 11:46:06 +0200
branchstable
changeset 11778 7e5f5e5858f9
parent 10365 d757bc0c7865
child 12865 4c50552fc9bc
permissions -rw-r--r--
convert: Using --dest-type svn crashed, if the source repo used tags. The convert extension requires puttags(self, tags) to return a sequence for a multi-variable assignment. If puttags implicitly returns None, the code will break when trying to un-pack None for assignment.

#!/usr/bin/env python

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)