Mercurial > hg
annotate tests/test-hgweb-diffs @ 7429:dbc40381620e
tests: Skip tests if they will fail because of outer repo
For different reasons these tests will fail if run in a tmpdir which is in a hg
repo.
The following three tests assumes no .hg in path dirs - I don't know how to
work around that:
* test-dispatch explicitly tests for no repo and expects "abort: There is no
Mercurial repository here (.hg not found)!"
* test-extension expects parentui to be None when not cd'ed to a repo dir
* test-globalopts tests that implicit -R works correctly - that could perhaps be
done from another repo instead of assuming no repo
The following two might be worth investigating further:
* test-convert-svn-sink fails for unknown reasons, starting with "abort:
unresolved merge conflicts (see hg resolve)"
* test-glog gets strange failures when testing "from outer space"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 27 Nov 2008 00:57:31 +0100 |
parents | fdcde929ce4f |
children | cb93eee1fbcd |
rev | line source |
---|---|
7309
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
1 echo % setting up repo |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
2 hg init test |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
3 cd test |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
4 echo a > a |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
5 echo b > b |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
6 hg ci -Ama |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
7 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
8 echo % change permissions for git diffs |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
9 chmod 755 a |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
10 hg ci -Amb |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
11 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
12 echo % set up hgweb |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
13 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
14 cat hg.pid >> $DAEMON_PIDS |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
15 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
16 echo % revision |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
17 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
18 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
19 echo % diff removed file |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
20 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
21 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
22 echo % set up hgweb with git diffs |
7428
fdcde929ce4f
tests: use killdaemons in hgweb tests
Mads Kiilerich <mads@kiilerich.com>
parents:
7309
diff
changeset
|
23 "$TESTDIR/killdaemons.py" |
7309
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
24 hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
25 cat hg.pid >> $DAEMON_PIDS |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
26 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
27 echo % revision |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
28 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
29 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
30 echo % diff removed file |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
31 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
32 |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
33 echo % errors |
e74a9173c2d7
hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
34 cat errors.log |