tests/test-hg-parseurl.py
author Brodie Rao <me+hg@dackz.net>
Mon, 10 Aug 2009 22:59:29 +0200
changeset 9330 be2a13153372
parent 8174 29bc5d18714a
child 10365 d757bc0c7865
permissions -rw-r--r--
diffstat: scale adds/removes proportionally to graph width The previous method of scaling had a tendency to include graph lines that went past the output width when the file with the most changes had a very large number of changes.

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