view tests/test-issue1089.t @ 31890:ca7af5d15b21

chg: always wait for pager Previously, when runcommand raises, chg aborts with, and does not wait for pager. The call stack is like: hgc_runcommand -> handleresponse -> readchannel -> debugmsg("failed to read channel") -> exit(255) That means, chg returns to the shell, then both the pager and the shell will read from the terminal at the same time, causing problems. This patch fixes that by using "atexit" to register the pager cleanup function so chg will always wait for pager even if runcommand raises.
author Jun Wu <quark@fb.com>
date Tue, 11 Apr 2017 18:31:40 -0700
parents 2fc86d92c4a9
children 4441705b7111
line wrap: on
line source

https://bz.mercurial-scm.org/1089

  $ hg init
  $ mkdir a
  $ echo a > a/b
  $ hg ci -Am m
  adding a/b

  $ hg rm a
  removing a/b (glob)
  $ hg ci -m m a

  $ mkdir a b
  $ echo a > a/b
  $ hg ci -Am m
  adding a/b

  $ hg rm a
  removing a/b (glob)
  $ cd b

Relative delete:

  $ hg ci -m m ../a

  $ cd ..