tests/test-nested-repo.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Fri, 14 Nov 2014 17:37:59 +0000
changeset 23565 996c01bfbec4
parent 19124 4cdec37f0018
child 35393 4441705b7111
permissions -rw-r--r--
graphlog: add a way to test the 'groupbranchiter' function We add an experimental config option to use the topological sorting. I first tried to hook the 'groupbranchiter' function in the 'sort' revset but this was useless because graphlog enforces revision number sorting :( As the goal is to advance on the topological iteration logic, I see this experimental option as a good way to move forward. We have to use turn the iterator into a list because the graphlog is apparently not ready for pure iterator input yet.

  $ 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 ..