Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-abort-checkin @ 2901:05f357b70cb0
Tune a bit the extdiff toplevel comments/samples.
* Capitalize the first letter of all sentences
* Add an example for GNU diff(1) 'context diff' mode.
* Explain the requirement for separate cmd.xxx and opts.xxx
options in .hgrc, which hopefully will guard against users
trying to add:
[extdiff]
# Add a new Mercurial command called `cdiff', which calls
# GNU diff(1) in 'context diff' mode.
cmd.cdiff = diff -Nprc5
which fails for recent crew builds with:
$ hg cdiff .
making snapshot of 1 files from rev 07dc4a569f4e
making snapshot of 1 files from working dir
diff -Nprc5: not found
The correct way to do this is by separating the cmd.cdiff and
opts.cdiff parts like this:
[extdiff]
# Add a new Mercurial command called `cdiff', which calls
# GNU diff(1) in 'context diff' mode.
cmd.cdiff = diff
opts.cdiff = -Nprc5
so add it as a new example and explicitly describe it in the
extdiff comments.
author | Giorgos Keramidas <keramida@ceid.upatras.gr> |
---|---|
date | Tue, 15 Aug 2006 18:14:58 +0300 |
parents | 0b9ac7dfcf56 |
children | 61fcd9fac434 |
rev | line source |
---|---|
2726
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
1 #!/bin/sh |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
2 |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
3 HGRCPATH=$HGTMP/.hgrc; export HGRCPATH |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
4 echo "[extensions]" >> $HGTMP/.hgrc |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
5 echo "mq=" >> $HGTMP/.hgrc |
2831
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
6 cat > $HGTMP/false <<EOF |
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
7 #!/bin/sh |
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
8 exit 1 |
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
9 EOF |
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
10 chmod +x $HGTMP/false |
2726
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
11 |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
12 hg init foo |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
13 cd foo |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
14 echo foo > foo |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
15 hg add foo |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
16 |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
17 # mq may keep a reference to the repository so __del__ will not be called |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
18 # and .hg/journal.dirstate will not be deleted: |
2831
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
19 HGEDITOR=$HGTMP/false hg ci |
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2726
diff
changeset
|
20 HGEDITOR=$HGTMP/false hg ci |
2726
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
21 |
6bd351194a96
Add test mq keeping a reference to localrepo which can't remove journal on exit.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
22 exit 0 |