annotate tests/test-changelog-exec @ 5338:f87685355c9c

revlog: fix revlogio.packentry corner case We want to store version information about the revlog in the first entry of its index. The code in packentry was using some heuristics to detect whether this was the first entry, but these heuristics could fail in some cases (e.g. rev 0 was empty; rev 1 descends directly from the nullid and is stored as a delta). We now give the revision number to packentry to avoid heuristics.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Wed, 26 Sep 2007 01:58:45 -0300
parents 466323968b23
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5242
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
1 #!/bin/sh
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
2 # b51a8138292a introduced a regression where we would mention in the
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
3 # changelog executable files added by the second parent of a merge.
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
4 # Test that that doesn't happen anymore
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
5
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
6 "$TESTDIR/hghave" execbit || exit 80
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
7
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
8 hg init repo
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
9 cd repo
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
10 echo foo > foo
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
11 hg ci -qAm 'add foo' -d '0 0'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
12
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
13 echo bar > bar
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
14 chmod +x bar
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
15 hg ci -qAm 'add bar' -d '0 0'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
16 echo '% manifest of p2:'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
17 hg manifest
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
18 echo
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
19
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
20 hg up -qC 0
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
21 echo >> foo
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
22 hg ci -m 'change foo' -d '0 0'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
23 echo '% manifest of p1:'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
24 hg manifest
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
25
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
26 hg merge
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
27 hg ci -m 'merge' -d '0 0'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
28
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
29 echo '% this should not mention bar:'
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
30 hg tip -v
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
31
466323968b23 Avoid adding to the changelog executable files added by the second parent.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
32 hg debugindex .hg/store/data/bar.i