tests/test-hg-parseurl.py
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Wed, 21 Jul 2010 11:53:09 +0900
changeset 11699 da0b9109186d
parent 10365 d757bc0c7865
child 12865 4c50552fc9bc
permissions -rw-r--r--
mq: support "qimport --existing --name renametothis thatexistingpatch" Before this change, the command would abort with a not too clear "patch renametothis does not exist" error. This change makes: qimport --existing --name renametothis thatexistingpatch equivalent to: qimport --existing thatexistingpatch; qrename thatexistingpatch renametothis

#!/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)