annotate tests/test-merge-remove @ 9336:dd6f605b15c0

mq: upgrade the patch to HG format when adding the author name with qrefresh When setting the author field with qrefresh (-u|-U), and the patch does have neither a 'From:' nor a '# User' header, add the author name as such: - if the patch has a 'Date:' header, add a 'From:' header - otherwise, upgrade to Mercurial extended patch format and add # From
author Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
date Wed, 12 Aug 2009 10:48:18 +0200
parents 653ddd1d7cd7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6297
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
1 #!/bin/sh
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
2
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
3 hg init repo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
4 cd repo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
5
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
6 echo foo > foo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
7 echo bar > bar
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
8 hg ci -qAm 'add foo bar'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
9
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
10 echo foo2 >> foo
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
11 echo bleh > bar
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
12 hg ci -m 'change foo bar'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
13
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
14 hg up -qC 0
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
15 hg mv foo foo1
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
16 echo foo1 > foo1
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
17 hg cat foo >> foo1
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
18 hg ci -m 'mv foo foo1'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
19
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
20 hg merge
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
21 hg debugstate --nodates
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
22 hg st -q
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
23
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
24 echo '% removing foo1 and bar'
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
25 cp foo1 F
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
26 cp bar B
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
27 hg rm -f foo1 bar
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
28 hg debugstate --nodates
fed1a9c22076 dirstate.remove: during merges, remember the previous file state
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
29 hg st -qC
6298
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
30
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
31 echo '% readding foo1 and bar'
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
32 cp F foo1
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
33 cp B bar
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
34 hg add -v foo1 bar
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
35 hg debugstate --nodates
53cbb33e1269 normallookup: during merges, restore the state saved by remove
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6297
diff changeset
36 hg st -qC
6299
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
37
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
38 echo '% reverting foo1 and bar'
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
39 hg revert -vr . foo1 bar
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
40 hg debugstate --nodates
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
41 hg st -qC
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
42 hg diff
653ddd1d7cd7 revert: update state of files in the "checkout" list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 6298
diff changeset
43