tests/printenv.py
changeset 13405 682edefe7dbb
parent 13404 31a256ffe9e5
child 16963 c19113e842d3
equal deleted inserted replaced
13404:31a256ffe9e5 13405:682edefe7dbb
     1 # simple script to be used in hooks
     1 # simple script to be used in hooks
     2 # copy it to the current directory when the test starts:
       
     3 #
       
     4 #     cp "$TESTDIR"/printenv.py .
       
     5 #
     2 #
     6 # put something like this in the repo .hg/hgrc:
     3 # put something like this in the repo .hg/hgrc:
     7 #
     4 #
     8 #     [hooks]
     5 #     [hooks]
     9 #     changegroup = python ../printenv.py <hookname> [exit] [output]
     6 #     changegroup = python "$TESTDIR"/printenv.py <hookname> [exit] [output]
    10 #
     7 #
    11 #   - <hookname> is a mandatory argument (e.g. "changegroup")
     8 #   - <hookname> is a mandatory argument (e.g. "changegroup")
    12 #   - [exit] is the exit code of the hook (default: 0)
     9 #   - [exit] is the exit code of the hook (default: 0)
    13 #   - [output] is the name of the output file (default: use sys.stdout)
    10 #   - [output] is the name of the output file (default: use sys.stdout)
    14 #              the file will be opened in append mode.
    11 #              the file will be opened in append mode.