tests/test-legacy-exit-code.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Sep 2022 15:49:14 +0200
branchstable
changeset 49469 b5c8524827d2
parent 45906 95c4cca641f6
child 49621 55c6ebd11cb9
permissions -rw-r--r--
dirstate-v2: no longer register the data-file during transaction If the data file change during the transaction, we cannot truncate it. The content of the file itself is fine as it will get backed up at the same time as the docket. Leaving the trailing data at the end of failed transaction is fine. The dirstate-v2 format supports it. The dead data will simply we written over if necessary.

Tests that the exit code is as expected when ui.detailed-exit-code is *not*
enabled.

  $ cat >> $HGRCPATH << EOF
  > [ui]
  > detailed-exit-code=no
  > EOF

  $ hg init
  $ echo a > a
Expect exit code 0 on success
  $ hg ci -Aqm initial

  $ hg co nonexistent
  abort: unknown revision 'nonexistent'
  [255]

  $ hg co 'none()'
  abort: empty revision set
  [255]

  $ hg co 'invalid('
  hg: parse error at 8: not a prefix: end
  (invalid(
           ^ here)
  [255]

  $ hg co 'invalid('
  hg: parse error at 8: not a prefix: end
  (invalid(
           ^ here)
  [255]

  $ hg continue
  abort: no operation in progress
  [255]

  $ hg st --config a=b
  abort: malformed --config option: 'a=b' (use --config section.name=value)
  [255]

  $ echo b > a
  $ hg ci -m second
  $ echo c > a
  $ hg ci -m third
  $ hg --config extensions.rebase= rebase -r . -d 0 -q
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
  [1]