Mercurial > hg-stable
diff tests/test-transplant.t @ 13579:3cbb3c57a50e
transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Sometimes it is necessary to know the original revision ID in order to
correctly rewrite the patch or commit message when transplanting. This
patch follows the pattern set by the existing 'HGUSER' environment variable,
and adds a test that covers both HGUSER and HGREVISION.
author | Luke Plant <L.Plant.98@cantab.net> |
---|---|
date | Fri, 11 Mar 2011 15:48:44 +0000 |
parents | 7439ea4146f8 |
children | 65399579da68 |
line wrap: on
line diff
--- a/tests/test-transplant.t Fri Mar 11 12:42:07 2011 +0100 +++ b/tests/test-transplant.t Fri Mar 11 15:48:44 2011 +0000 @@ -330,6 +330,27 @@ [255] $ cd .. +test environment passed to filter + + $ hg init filter-environment + $ cd filter-environment + $ cat <<'EOF' >test-filter-environment + > #!/bin/sh + > echo "Transplant by $HGUSER" >> $1 + > echo "Transplant from rev $HGREVISION" >> $1 + > EOF + $ chmod +x test-filter-environment + $ hg transplant -s ../t --filter ./test-filter-environment 0 + filtering * (glob) + applying 17ab29e464c6 + 17ab29e464c6 transplanted to 5190e68026a0 + + $ hg log --template '{rev} {parents} {desc}\n' + 0 r1 + Transplant by test + Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f + $ cd .. + test with a win32ext like setup (differing EOLs)