tests/test-import.t
changeset 26751 520defbc0335
parent 26750 9f9ec4abe700
child 27054 fe458d078ed7
equal deleted inserted replaced
26750:9f9ec4abe700 26751:520defbc0335
   530   ACTUAL  0:80971e65b431
   530   ACTUAL  0:80971e65b431
   531   M a
   531   M a
   532   ====
   532   ====
   533   $ hg --cwd b revert --no-backup a
   533   $ hg --cwd b revert --no-backup a
   534   $ rm -f b/foo
   534   $ rm -f b/foo
       
   535 
       
   536 == test visibility to precommit external hook
       
   537 
       
   538   $ cat >> b/.hg/hgrc <<EOF
       
   539   > [hooks]
       
   540   > precommit.visibility = sh $TESTTMP/checkvisibility.sh
       
   541   > EOF
       
   542 
       
   543   $ (cd b && sh "$TESTTMP/checkvisibility.sh")
       
   544   ====
       
   545   VISIBLE 0:80971e65b431
       
   546   ACTUAL  0:80971e65b431
       
   547   ====
       
   548 
       
   549   $ hg --cwd b import ../patch1 ../patch2 ../patch3
       
   550   applying ../patch1
       
   551   ====
       
   552   VISIBLE 0:80971e65b431
       
   553   M a
       
   554   ACTUAL  0:80971e65b431
       
   555   M a
       
   556   ====
       
   557   applying ../patch2
       
   558   ====
       
   559   VISIBLE 1:1d4bd90af0e4
       
   560   M a
       
   561   ACTUAL  0:80971e65b431
       
   562   M a
       
   563   ====
       
   564   applying ../patch3
       
   565   ====
       
   566   VISIBLE 2:6d019af21222
       
   567   A foo
       
   568   ACTUAL  0:80971e65b431
       
   569   M a
       
   570   ====
       
   571 
       
   572   $ hg --cwd b rollback -q
       
   573   $ (cd b && sh "$TESTTMP/checkvisibility.sh")
       
   574   ====
       
   575   VISIBLE 0:80971e65b431
       
   576   M a
       
   577   ACTUAL  0:80971e65b431
       
   578   M a
       
   579   ====
       
   580   $ hg --cwd b revert --no-backup a
       
   581   $ rm -f b/foo
       
   582 
       
   583   $ cat >> b/.hg/hgrc <<EOF
       
   584   > [hooks]
       
   585   > precommit.visibility =
       
   586   > EOF
       
   587 
       
   588 == test visibility to pretxncommit external hook
       
   589 
       
   590   $ cat >> b/.hg/hgrc <<EOF
       
   591   > [hooks]
       
   592   > pretxncommit.visibility = sh $TESTTMP/checkvisibility.sh
       
   593   > EOF
       
   594 
       
   595   $ (cd b && sh "$TESTTMP/checkvisibility.sh")
       
   596   ====
       
   597   VISIBLE 0:80971e65b431
       
   598   ACTUAL  0:80971e65b431
       
   599   ====
       
   600 
       
   601   $ hg --cwd b import ../patch1 ../patch2 ../patch3
       
   602   applying ../patch1
       
   603   ====
       
   604   VISIBLE 0:80971e65b431
       
   605   M a
       
   606   ACTUAL  0:80971e65b431
       
   607   M a
       
   608   ====
       
   609   applying ../patch2
       
   610   ====
       
   611   VISIBLE 1:1d4bd90af0e4
       
   612   M a
       
   613   ACTUAL  0:80971e65b431
       
   614   M a
       
   615   ====
       
   616   applying ../patch3
       
   617   ====
       
   618   VISIBLE 2:6d019af21222
       
   619   A foo
       
   620   ACTUAL  0:80971e65b431
       
   621   M a
       
   622   ====
       
   623 
       
   624   $ hg --cwd b rollback -q
       
   625   $ (cd b && sh "$TESTTMP/checkvisibility.sh")
       
   626   ====
       
   627   VISIBLE 0:80971e65b431
       
   628   M a
       
   629   ACTUAL  0:80971e65b431
       
   630   M a
       
   631   ====
       
   632   $ hg --cwd b revert --no-backup a
       
   633   $ rm -f b/foo
       
   634 
       
   635   $ cat >> b/.hg/hgrc <<EOF
       
   636   > [hooks]
       
   637   > pretxncommit.visibility =
       
   638   > EOF
   535 
   639 
   536   $ rm -r b
   640   $ rm -r b
   537 
   641 
   538 
   642 
   539 importing a patch in a subdirectory failed at the commit stage
   643 importing a patch in a subdirectory failed at the commit stage