tests/test-hg-parseurl.py
author Sune Foldager <cryo@cyanite.org>
Wed, 23 Sep 2009 18:56:09 +0200
changeset 9479 f3569d95c2ab
parent 8174 29bc5d18714a
child 10365 d757bc0c7865
permissions -rw-r--r--
push: fix subtle bug in prepush logic A test case demonstrating the bug has been added. Contributed by Henrik Stuart and Sune Foldager.

#!/usr/bin/env python

from mercurial.hg import parseurl

def testparse(url, rev=[]):
    print '%s, revs: %r, checkout: %r' % parseurl(url, rev)

testparse('http://example.com/no/anchor')
testparse('http://example.com/an/anchor#foo')
testparse('http://example.com/no/anchor/revs', rev=['foo'])
testparse('http://example.com/an/anchor/revs#bar', rev=['foo'])
testparse('http://example.com/an/anchor/rev-None#foo', rev=None)