[PATCH 1 of 2 stable] tests: add test for issue3428

Bryan O'Sullivan bos at serpentine.com
Fri May 11 03:56:33 CDT 2012


# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1336726526 25200
# Branch stable
# Node ID dfc2b072575a0e04e7a5a20eef77686c4ea094f0
# Parent  20a9d823f242f00c3b8c2f0d7ce4c4e081cf11eb
tests: add test for issue3428

This ensures that an out-of-process hook can see an incoming changegroup.

The test as it currently stands is expected to fail.

diff -r 20a9d823f242 -r dfc2b072575a tests/test-hook.t
--- a/tests/test-hook.t	Mon May 07 21:49:45 2012 +0200
+++ b/tests/test-hook.t	Fri May 11 01:55:26 2012 -0700
@@ -579,3 +579,30 @@
   $ hg tag -f foo
   ['a', 'foo', 'tip']
 
+new commits must be visible in pretxnchangegroup (issue3428)
+
+  $ cd ..
+  $ hg init to
+  $ echo '[hooks]' >> to/.hg/hgrc
+  $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc
+  $ echo a >> to/a
+  $ hg --cwd to ci -Ama
+  adding a
+  $ hg clone to from
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo aa >> from/a
+  $ hg --cwd from ci -mb
+  $ hg --cwd from push
+  pushing to $TESTTMP/to
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  changeset:   1:9836a07b9b9d
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     b
+  


More information about the Mercurial-devel mailing list