tests/test-changelog-exec
author Matt Mackall <mpm@selenic.com>
Thu, 11 Oct 2007 00:46:54 -0500
changeset 5451 0a43875677b1
parent 5242 466323968b23
permissions -rwxr-xr-x
revlog: break up compression of large deltas Python's zlib apparently makes an internal copy of strings passed to compress(). To avoid this, compress strings 1M at a time, then join them at the end if the result would be smaller than the original. For initial commits of large but compressible files, this cuts peak memory usage nearly in half.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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