tests/test-nested-repo.t
author Augie Fackler <augie@google.com>
Wed, 14 Jun 2017 20:56:34 -0400
changeset 32872 9fcb6df413c9
parent 19124 4cdec37f0018
child 35393 4441705b7111
permissions -rw-r--r--
ui: add support for a tweakdefaults knob We've been talking for years about a one-stop config knob to opt in to better behavior. There have been a lot of ideas thrown around, but they all seem to be too complicated to get anyone to actually do the work.. As such, this patch is the stupidest thing that can possibly work in the name of getting a good feature to users. Right now it's just three config settings that I think are generally uncontroversial, but I expect to add more soon. That will likely include adding new config knobs for the express purpose of adding them to tweakdefaults.

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