annotate tests/test-hg-parseurl.py @ 8529:a767998f0a78

hgweb: make hgwebdir handle dict/list paths the same as config paths Before this patch, the only way to get hgwebdir to honor the recursive paths was to create a config object or a config file with the recursive paths in it. This patch makes hgwebdir treat paths the same whether passed in as a list, tuple, config or however hgwebdir supports passing paths.
author Jeremy Whitlock <jcscoobyrs@gmail.com>
date Wed, 20 May 2009 16:04:37 +0200
parents 29bc5d18714a
children d757bc0c7865
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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)