Mercurial > hg
annotate tests/test-push-validation.t @ 17719:2e3ceb59c312
verify: use appropriate local variable in "checkentry()"
Before this patch, "checkentry()" internal function uses both
"node"(argument of itself) and "n"(defined in outer of it) variables.
Because all callers of "checkentry()" use "n" to refer the object
which is passed to "checkentry()" as "node", both can refer same
object in "checkentry()". So, "checkentry()" works correctly.
But such usage is not good for independence of "checkentry()".
This patch replaces "n" in "checkentry()" with "node".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 04 Oct 2012 01:24:05 +0900 |
parents | f2719b387380 |
children | f009804e2a43 |
rev | line source |
---|---|
12279 | 1 $ hg init test |
2 $ cd test | |
3 | |
4 $ cat > .hg/hgrc <<EOF | |
5 > [server] | |
6 > validate=1 | |
7 > EOF | |
8 | |
9 $ echo alpha > alpha | |
10 $ echo beta > beta | |
11 $ hg addr | |
12 adding alpha | |
13 adding beta | |
14 $ hg ci -m 1 | |
15 | |
16 $ cd .. | |
17 $ hg clone test test-clone | |
18 updating to branch default | |
19 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 | |
21 $ cd test-clone | |
22 $ cp .hg/store/data/beta.i tmp | |
23 $ echo blah >> beta | |
24 $ hg ci -m '2 (corrupt)' | |
25 $ mv tmp .hg/store/data/beta.i | |
10418
5fc090ba08a6
localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
26 |
12279 | 27 Expected to fail: |
28 | |
29 $ hg verify | |
30 checking changesets | |
31 checking manifests | |
32 crosschecking files in changesets and manifests | |
33 checking files | |
34 beta@1: dddc47b3ba30 in manifests not found | |
35 2 files, 2 changesets, 2 total revisions | |
36 1 integrity errors encountered! | |
37 (first damaged changeset appears to be 1) | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
38 [1] |
10418
5fc090ba08a6
localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
39 |
12279 | 40 Expected to fail: |
10418
5fc090ba08a6
localrepo: add optional validation (defaults to off) for incoming changes
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
41 |
12279 | 42 $ hg push |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
12640
diff
changeset
|
43 pushing to $TESTTMP/test (glob) |
12279 | 44 searching for changes |
45 adding changesets | |
46 adding manifests | |
47 adding file changes | |
48 transaction abort! | |
49 rollback completed | |
50 abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify | |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
51 [255] |
12279 | 52 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
53 $ cd .. |