view tests/test-nested-repo.t @ 17173:c621f84dbb35

obsolete: compute extinct changesets `extinct` changesets are obsolete changesets with obsolete descendants only. They are of no interest anymore and can be: - exclude from exchange - hidden to the user in most situation - safely garbage collected This changeset just allows mercurial to detect them. The implementation is a bit naive, as for unstable changesets. We better use a simple revset query and a cache, but simple version comes first.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 06 Jul 2012 19:34:09 +0200
parents f2719b387380
children 4cdec37f0018
line wrap: on
line source

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

Should print nothing:

  $ hg add b
  $ 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 ..