Mercurial > hg
view tests/test-patch.t @ 12650:fed4bb2c8def
inotify: raise correct error if server is already started in a deep repository
When path is too long to be an Unix socket address, we create a socket in a
temporary directory and link from the long path to the shorter one.
But checks in server code at startup were insufficient in this case, and used
to raise an unclear "tried linking .hg/inotify.sock to a temporary socket but
.hg/inotify.sock already exists"
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sat, 09 Oct 2010 15:41:53 +0200 |
parents | d7452292f9d3 |
children | 80a3d1121c10 |
line wrap: on
line source
$ cat > patchtool.py <<EOF > import sys > print 'Using custom patch' > if '--binary' in sys.argv: > print '--binary found !' > EOF $ echo "[ui]" >> $HGRCPATH $ echo "patch=python ../patchtool.py" >> $HGRCPATH $ hg init a $ cd a $ echo a > a $ hg commit -Ama -d '1 0' adding a $ echo b >> a $ hg commit -Amb -d '2 0' $ cd .. This test checks that: - custom patch commands with arguments actually work - patch code does not try to add weird arguments like --binary when custom patch commands are used. For instance --binary is added by default under win32. check custom patch options are honored $ hg --cwd a export -o ../a.diff tip $ hg clone -r 0 a b requesting all changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg --cwd b import -v ../a.diff applying ../a.diff Using custom patch Issue2417: hg import with # comments in description Prepare source repo and patch: $ rm $HGRCPATH $ hg init c $ cd c $ echo 0 > a $ hg ci -A -m 0 a -d '0 0' $ echo 1 >> a $ cat << eof > log > 1 > # comment for 1 > eof $ hg ci -l log -d '0 0' $ hg export -o p 1 $ cd .. Clone and apply patch: $ hg clone -r 0 c d requesting all changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd d $ hg import ../c/p applying ../c/p $ hg log -v -r 1 changeset: 1:89bf2f6d8088 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 files: a description: 1 # comment for 1 $ cd ..