tests/test-hg-parseurl.py
author Martin Geisler <mg@lazybytes.net>
Sun, 10 May 2009 01:18:38 +0200
changeset 8348 c9ab8f448a9e
parent 8174 29bc5d18714a
child 10365 d757bc0c7865
permissions -rw-r--r--
record: better formatting for qrecord help

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