annotate tests/test-merge-local @ 4188:dd0d9bd91e0a

dirstate.statwalk: explicitly test for ignored directories This removes a hack where we appended '/' to a dirname so that: - it would not appear on the "dc" dict - it would always be matched by the match function This was a contorted way of checking if the directory was matched by some hgignore pattern, and it would still fail with some uses of --include/--exclude patterns. Things would still work fine if we removed the check altogether and just appended things to "work" directly, but then we would end up walking ignored directories too, which could be quite a bit of work. This allows further simplification of the match function returned by util._matcher, and fixes walking the working directory with a --include pattern that matches only the end of a name.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 10 Mar 2007 23:00:54 -0300
parents ad6f34c83c3d
children 46280c004f22
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3869
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
1 #!/bin/sh
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
2
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
3 hg init
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
4
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
5 echo "# revision 0"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
6 echo "unchanged" > unchanged
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
7 echo "remove me" > remove
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
8 echo "copy me" > copy
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
9 echo "move me" > move
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
10 for i in 1 2 3 4 5 6 7 8 9; do
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
11 echo "merge ok $i" >> zzz1_merge_ok
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
12 done
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
13 echo "merge bad" > zzz2_merge_bad
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
14 hg ci -Am "revision 0" -d "1000000 0"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
15
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
16 echo "# revision 1"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
17 hg rm remove
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
18 hg mv move moved
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
19 hg cp copy copied
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
20 echo "added" > added
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
21 hg add added
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
22 echo "new first line" > zzz1_merge_ok
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
23 hg cat zzz1_merge_ok >> zzz1_merge_ok
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
24 echo "new last line" >> zzz2_merge_bad
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
25 hg ci -m "revision 1" -d "1000000 0"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
26
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
27 echo "# local changes to revision 0"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
28 hg co 0
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
29 echo "new last line" >> zzz1_merge_ok
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
30 echo "another last line" >> zzz2_merge_bad
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
31 hg diff --nodates | grep "^[+-][^<>]"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
32 hg st
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
33
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
34 echo "# local merge with bad merge tool"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
35 HGMERGE=false hg co
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
36 hg co 0
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
37 hg diff --nodates | grep "^[+-][^<>]"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
38 hg st
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
39
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
40 echo "# local merge with conflicts"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
41 HGMERGE=merge hg co
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
42 hg co 0
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
43 hg diff --nodates | grep "^[+-][^<>]"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
44 hg st
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
45
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
46 echo "# local merge without conflicts"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
47 hg revert zzz2_merge_bad
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
48 HGMERGE=merge hg co
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
49 hg diff --nodates | grep "^[+-][^<>]"
ad6f34c83c3d Add instructions how to redo/finish failed merge with local working directory.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
50 hg st