view tests/test-1102.t @ 26751:520defbc0335

hook: centralize passing HG_PENDING to external hook process This patch centralizes passing HG_PENDING to external hook process into '_exthook()'. To make in-memory changes visible to external hook process, this patch does: - write (or schedule to write) in-memory dirstate changes, and - set HG_PENDING environment variable, if: - a transaction is running, and - there are in-memory changes to be visible This patch tests some commands with some hooks, because transaction activity of a same hook differs from each other ("---": "not tested"). ======== ========= ========= ============ command preupdate precommit pretxncommit ======== ========= ========= ============ unshelve o --- --- backout x --- --- import --- o o qrefresh --- x o ======== ========= ========= ============ Each hooks are examined separately to prevent in-memory changes from being visible to external process accidentally by side effect of hooks previously invoked.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 17 Oct 2015 01:15:34 +0900
parents f2719b387380
children
line wrap: on
line source

  $ rm -rf a
  $ hg init a
  $ cd a
  $ echo a > a
  $ hg ci -Am0
  adding a
  $ hg tag t1 # 1
  $ hg tag --remove t1 # 2

  $ hg co 1
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg tag -f -r0 t1
  $ hg tags
  tip                                3:a49829c4fc11
  t1                                 0:f7b1eb17ad24

  $ cd ..