tests/test-subrepo-paths.t
author Sol Jerome <sol.jerome@gmail.com>
Tue, 17 Aug 2010 17:38:19 -0500
changeset 11946 851161f07068
parent 11914 e31e5eb8736c
child 11959 be33381882ad
permissions -rw-r--r--
util: avoid using hashlib on Python < 2.5 (issue2278) The following patch allows the use of python2.4 with a standalone hashlib rather than assuming that python2.5 is in use when hashlib is imported successfully.

  $ hg init outer
  $ cd outer

  $ echo 'sub = http://example.net/libfoo' > .hgsub
  $ hg add .hgsub

hg debugsub with no remapping

  $ hg debugsub
  path sub
   source   http://example.net/libfoo
   revision 

  $ cat > .hg/hgrc <<EOF
  > [subpaths]
  > http://example.net = ssh://localhost
  > EOF

hg debugsub with remapping

  $ hg debugsub
  path sub
   source   ssh://localhost/libfoo
   revision 

test bad subpaths pattern

  $ cat > .hg/hgrc <<EOF
  > [subpaths]
  > .* = \1
  > EOF
  $ hg debugsub
  abort: bad subrepository pattern in .*/test-subrepo-paths.t/outer/.hg/hgrc:2: invalid group reference

  $ exit 0