annotate tests/test-repair-strip @ 10301:56b50194617f

templates: rename `Last change' column in hgwebdir repository list. This patch changes column headers in the templates that previously said `Last change' to `Last modified'. Neither code nor functionality are changed other than that. For some time now, I have been annoyed by the fact the `Last change' column didn't list the age of the youngest changeset in the repository, or at least tip. It just occurred to me that this is because the wording is slightly misleading; what the column in fact lists is when the repository was last *modified*, that is, when changesets was last added or removed from it. The word `change' can be understood as referring to the changeset itself. Using `changed' would be ever so slightly less amigous. However, the standard nomenclature in this case is `modification date' and `Last modified', which is incidentally entirely unambigous. Hence, `Last modified' is the wording used.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 24 Jan 2010 20:51:53 +0100
parents 4a1b24dbf753
children 4bb4895e1693
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8073
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
1 #!/bin/sh
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
2
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
3 echo "[extensions]" >> $HGRCPATH
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
4 echo "mq=">> $HGRCPATH
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
5
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
6 teststrip() {
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
7 hg -q up -C $1
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
8 echo % before update $1, strip $2
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
9 hg parents
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
10 chmod -$3 $4
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
11 hg strip $2 2>&1 | sed 's/\(saving bundle to \).*/\1/' | sed 's/Permission denied.*\.hg\/store\/\(.*\)/Permission denied \.hg\/store\/\1/'
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
12 echo % after update $1, strip $2
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
13 chmod +$3 $4
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
14 hg verify
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
15 echo % journal contents
9284
4a1b24dbf753 test-repair-strip: Don't rely on cat error message
Mads Kiilerich <mads@kiilerich.com>
parents: 8293
diff changeset
16 if [ -f .hg/store/journal ]; then
4a1b24dbf753 test-repair-strip: Don't rely on cat error message
Mads Kiilerich <mads@kiilerich.com>
parents: 8293
diff changeset
17 sed -e 's/\.i[^\n]*/\.i/' .hg/store/journal
4a1b24dbf753 test-repair-strip: Don't rely on cat error message
Mads Kiilerich <mads@kiilerich.com>
parents: 8293
diff changeset
18 else
4a1b24dbf753 test-repair-strip: Don't rely on cat error message
Mads Kiilerich <mads@kiilerich.com>
parents: 8293
diff changeset
19 echo "(no journal)"
4a1b24dbf753 test-repair-strip: Don't rely on cat error message
Mads Kiilerich <mads@kiilerich.com>
parents: 8293
diff changeset
20 fi
8073
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
21 ls .hg/store/journal >/dev/null 2>&1 && hg recover
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
22 ls .hg/strip-backup/* >/dev/null 2>&1 && hg unbundle -q .hg/strip-backup/*
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
23 rm -rf .hg/strip-backup
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
24 }
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
25
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
26 hg init test
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
27 cd test
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
28
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
29 echo a > a
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
30 hg -q ci -m "a" -A
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
31
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
32 echo b > b
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
33 hg -q ci -m "b" -A
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
34
8293
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
35 echo b2 >> b
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
36 hg -q ci -m "b2" -A
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
37
8073
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
38 echo c > c
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
39 hg -q ci -m "c" -A
8293
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
40
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
41 teststrip 0 2 w .hg/store/data/b.i
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
42 teststrip 0 2 r .hg/store/data/b.i
f00573bc93f8 test: change repair strip test to illustrate manifest errors
Henrik Stuart <henrik.stuart@edlund.dk>
parents: 8073
diff changeset
43 teststrip 0 2 w .hg/store/00manifest.i
8073
e8a28556a0a8 strip: make repair.strip transactional to avoid repository corruption
Henrik Stuart <henrik.stuart@edlund.dk>
parents:
diff changeset
44