view tests/test-hg-parseurl.py @ 33940:2a37459aedf2

releasenotes: view admonition titles using -l flag Since this extension is fairly new for almost all the contributors, remembering the admonition (with titles) is difficult. The list (-l) flag provides a list of all the active admonitions along with titles. For usage, hg releasenotes -l returns the list. Differential Revision: https://phab.mercurial-scm.org/D454
author Rishabh Madan <rishabhmadan96@gmail.com>
date Mon, 28 Aug 2017 04:11:58 +0530
parents d26c4af27978
children 11d128a14ec0
line wrap: on
line source

from __future__ import absolute_import, print_function

from mercurial import (
    hg,
)

def testparse(url, branch=[]):
    print('%s, branches: %r' % hg.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')