Mercurial > hg
comparison tests/test-hgweb-diffs @ 7309:e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
This gets us git diffs when enabled and doesn't pick erratic file parents.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 03 Nov 2008 20:05:03 +0100 |
parents | |
children | fdcde929ce4f |
comparison
equal
deleted
inserted
replaced
7308:b6f5490effbf | 7309:e74a9173c2d7 |
---|---|
1 echo % setting up repo | |
2 hg init test | |
3 cd test | |
4 echo a > a | |
5 echo b > b | |
6 hg ci -Ama | |
7 | |
8 echo % change permissions for git diffs | |
9 chmod 755 a | |
10 hg ci -Amb | |
11 | |
12 echo % set up hgweb | |
13 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
14 cat hg.pid >> $DAEMON_PIDS | |
15 | |
16 echo % revision | |
17 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' | |
18 | |
19 echo % diff removed file | |
20 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' | |
21 | |
22 echo % set up hgweb with git diffs | |
23 kill `cat hg.pid` | |
24 hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
25 cat hg.pid >> $DAEMON_PIDS | |
26 | |
27 echo % revision | |
28 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' | |
29 | |
30 echo % diff removed file | |
31 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' | |
32 | |
33 echo % errors | |
34 cat errors.log |