view tests/test-nested-repo.t @ 39313:3c4b2e880273

log: respect graphshorten on terminal nodes (collapsing o-~ to just o~) Internally we have a custom template that's inspired by ones that we have seen in the community. Normally, this looks something like: o 0834ec17 spectral tip | crecord: support x to toggle single, X to toggle a range o ee932990 spectral @ | filemerge: allow specifying $hgeditor as merge-tools.X.executable @ 66f04611 matt_harbison | cext: fix truncation warnings in revlog on Windows o 42cc76d0 matt_harbison | cext: fix revlog compiler error on Windows ~ o bd63ada7 stable boris | phases: drop dead code in `newheads` ~ With graphshorten on, and the descriptions of the public nodes hidden, it looks like this, note that the commits right before the ~ are still "full height": o 0834ec17 spectral tip | crecord: support x to toggle single, X to toggle a range o ee932990 spectral @ | filemerge: allow specifying $hgeditor as merge-tools.X.executable @ 66f04611 matt_harbison o 42cc76d0 matt_harbison | ~ o bd63ada7 stable boris | ~ This patch makes them look like this, removing the | but keeping the ~: o 0834ec17 spectral tip | crecord: support x to toggle single, X to toggle a range o ee932990 spectral @ | filemerge: allow specifying $hgeditor as merge-tools.X.executable @ 66f04611 matt_harbison o 42cc76d0 matt_harbison ~ o bd63ada7 stable boris ~ This originally removed the ~s entirely, but this was determined to be too much information loss and potentially confusing. This would have looked like the following (note that the last commit is on a different branch than all of the ones above it, and they are *not* linearly related): o 0834ec17 spectral tip | crecord: support x to toggle single, X to toggle a range o ee932990 spectral @ | filemerge: allow specifying $hgeditor as merge-tools.X.executable @ 66f04611 matt_harbison o 42cc76d0 matt_harbison o bd63ada7 stable boris Differential Revision: https://phab.mercurial-scm.org/D4363
author Kyle Lippincott <spectral@google.com>
date Thu, 23 Aug 2018 13:33:19 -0700
parents 4441705b7111
children
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

  $ echo y > b/y
  $ hg st

Should fail:

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

Should fail:

  $ hg add b b/x
  abort: path 'b/x' is inside nested repo 'b'
  [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'
  [255]
  $ hg st

  $ cd ..