tests/test-nested-repo.t
author Matt Mackall <mpm@selenic.com>
Sun, 28 Jul 2013 15:02:32 -0500
branchstable
changeset 19514 cfdae231ba78
parent 19124 4cdec37f0018
child 35393 4441705b7111
permissions -rw-r--r--
checklink: work around sshfs brain-damage (issue3636) With the follow_symlinks option, sshfs will successfully create links while claiming it encountered an I/O error. In addition, depending on the type of link, it may subsequently be impossible to delete the link via sshfs. Our existing link to '.' will cause sshfs to think the link is a directory, and thus cause unlink to give EISDIR. Links to non-existent names or circular links will cause the created link to not even be visible. Thus, we need to create a new temporary file and link to that. We'll still get a failure, but we'll be able to remove the link.

  $ hg init a
  $ cd a
  $ hg init b
  $ echo x > b/x

Should print nothing:

  $ hg add b
  $ hg st

  $ echo y > b/y
  $ hg st

Should fail:

  $ hg st b/x
  abort: path 'b/x' is inside nested repo 'b' (glob)
  [255]
  $ hg add b/x
  abort: path 'b/x' is inside nested repo 'b' (glob)
  [255]

Should fail:

  $ hg add b b/x
  abort: path 'b/x' is inside nested repo 'b' (glob)
  [255]
  $ hg st

Should arguably print nothing:

  $ hg st b

  $ echo a > a
  $ hg ci -Ama a

Should fail:

  $ hg mv a b
  abort: path 'b/a' is inside nested repo 'b' (glob)
  [255]
  $ hg st

  $ cd ..