tests/test-addremove
author Vadim Gelfer <vadim.gelfer@gmail.com>
Mon, 08 May 2006 10:59:58 -0700
changeset 2221 05b6c13f43c6
parent 1933 7544700fd931
child 2958 ff3ea21a981a
permissions -rwxr-xr-x
reverse sense of return value from python hooks. old scheme (False/None/0/'' == fail) made coding style unnatural, did not allow use of mercurial commands as hooks. new scheme (False/None/0 == pass) is pythonic, does not require peculiar "return True" at ends of hooks, allows hooks like this: [hooks] # update working dir after push into this repo changegroup.update = python:mercurial.commands.update

#!/bin/sh

hg init rep
cd rep
mkdir dir
touch foo dir/bar
hg -v addremove
hg -v commit -m "add 1" -d "1000000 0"
cd dir/
touch ../foo_2 bar_2
hg -v addremove
hg -v commit -m "add 2" -d "1000000 0"