comparison 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
comparison
equal deleted inserted replaced
13578:e720b3324e35 13579:3cbb3c57a50e
328 patch failed to apply 328 patch failed to apply
329 abort: fix up the merge and run hg transplant --continue 329 abort: fix up the merge and run hg transplant --continue
330 [255] 330 [255]
331 $ cd .. 331 $ cd ..
332 332
333 test environment passed to filter
334
335 $ hg init filter-environment
336 $ cd filter-environment
337 $ cat <<'EOF' >test-filter-environment
338 > #!/bin/sh
339 > echo "Transplant by $HGUSER" >> $1
340 > echo "Transplant from rev $HGREVISION" >> $1
341 > EOF
342 $ chmod +x test-filter-environment
343 $ hg transplant -s ../t --filter ./test-filter-environment 0
344 filtering * (glob)
345 applying 17ab29e464c6
346 17ab29e464c6 transplanted to 5190e68026a0
347
348 $ hg log --template '{rev} {parents} {desc}\n'
349 0 r1
350 Transplant by test
351 Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f
352 $ cd ..
353
333 354
334 test with a win32ext like setup (differing EOLs) 355 test with a win32ext like setup (differing EOLs)
335 356
336 $ hg init twin1 357 $ hg init twin1
337 $ cd twin1 358 $ cd twin1