tests/test-hg-parseurl.py
author Wagner Bruna <wbruna@softwareexpress.com.br>
Mon, 18 Jan 2010 15:37:45 -0200
branchstable
changeset 10258 d58d7441b211
parent 8174 29bc5d18714a
child 10365 d757bc0c7865
permissions -rw-r--r--
i18n-pt_BR: synchronized with 279c8a73fde1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8174
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     1
#!/usr/bin/env python
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     2
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     3
from mercurial.hg import parseurl
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     4
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     5
def testparse(url, rev=[]):
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     6
    print '%s, revs: %r, checkout: %r' % parseurl(url, rev)
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     7
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     8
testparse('http://example.com/no/anchor')
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
     9
testparse('http://example.com/an/anchor#foo')
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
    10
testparse('http://example.com/no/anchor/revs', rev=['foo'])
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
    11
testparse('http://example.com/an/anchor/revs#bar', rev=['foo'])
29bc5d18714a hg: allow hg.parseurl(url, None)
Martijn Pieters <mj@zopatista.com>
parents:
diff changeset
    12
testparse('http://example.com/an/anchor/rev-None#foo', rev=None)