view tests/test-hg-parseurl.py @ 17924:45bd0cd7ca04 stable

amend: force editor only if old message is reused (issue3698) This regression was added by 9732473aa24b. It triggered the editor even if --message or --logfile were provided.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 13 Nov 2012 08:41:56 -0800
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')