view tests/test-hg-parseurl.py @ 19500:a96565abbd59 stable

mq: rename next() to nextpatch() to avoid confusing a future check-code patch next() is a builtin starting in 2.6, so it's also nice to avoid shadowing the builtin.
author Augie Fackler <raf@durin42.com>
date Thu, 25 Jul 2013 10:42:36 -0400
parents 375872fdadba
children 8a23f88131c3
line wrap: on
line source

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