tests/test-issue522
author Martin Geisler <mg@lazybytes.net>
Tue, 07 Jul 2009 23:54:30 +0200
changeset 9051 f8e25885d975
parent 8167 6c82beaaa11a
permissions -rwxr-xr-x
commands: wrapped docstrings at 78 characters We have always had a left margin of 4 characters -- probably just because that's how docstrings for top-level functions turn out by default, but it also looks nice in the built-in help. The docstrings were wrapped at 70 characters, which is the default for Emacs. However, this gives a right margin of 10 characters in a standard 80 character terminal. I've now wrapped the relevant docstrings at 78 characters, effectively killing the right margin. The asymmetric margins looked a bit odd and some of the text looked cramped with a right margin, so Dirkjan and I felt that it was best to remove it entirely. The two character gap was kept to have some space between the border of the terminal -- it will also make diffs involving the docstrings fit in a 80 character line.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5210
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     1
#!/bin/sh
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     2
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     3
# In the merge below, the file "foo" has the same contents in both
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     4
# parents, but if we look at the file-level history, we'll notice that
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     5
# the version in p1 is an ancestor of the version in p2.  This test
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     6
# makes sure that we'll use the version from p2 in the manifest of the
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     7
# merge revision.
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     8
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     9
hg init repo
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    10
cd repo
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    11
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    12
echo foo > foo
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 5210
diff changeset
    13
hg ci -qAm 'add foo'
5210
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    14
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    15
echo bar >> foo
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 5210
diff changeset
    16
hg ci -m 'change foo'
5210
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    17
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 5210
diff changeset
    18
hg backout -r tip -m 'backout changed foo'
5210
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    19
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    20
hg up -C 0
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    21
touch bar
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 5210
diff changeset
    22
hg ci -qAm 'add bar'
5210
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    23
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    24
hg merge --debug
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    25
hg debugstate | grep foo
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    26
hg st -A foo
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 5210
diff changeset
    27
hg ci -m 'merge'
5210
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    28
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    29
hg manifest --debug | grep foo
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    30
hg debugindex .hg/store/data/foo.i
90d9ec0dc69d merge: forcefully mark files that we get from the second parent as dirty
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    31