tests/test-hg-parseurl.py
author Matt Mackall <mpm@selenic.com>
Mon, 01 Jun 2009 14:51:47 -0500
changeset 8707 0550dfe4fca1
parent 8174 29bc5d18714a
child 10365 d757bc0c7865
permissions -rw-r--r--
commit: editor reads file lists from provided context

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