annotate tests/test-branches @ 5483:0c43f87baba3 default tip

Fix file-changed-to-dir and dir-to-file commits (issue660). Allow adding to dirstate files that clash with previously existing but marked for removal. Protect from reintroducing clashes by revert. This change doesn't address related issues with update. Current workaround is to do "clean" update by manually removing conflicting files/dirs from working directory.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 27 Oct 2007 16:27:55 +0400
parents 6858a7477a5e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
1 #!/bin/sh
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
2
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
3 hg init a
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
4 cd a
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
5 echo 'root' >root
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
6 hg add root
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
7 hg commit -d '0 0' -u test -m "Adding root node"
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
8
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
9 echo 'a' >a
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
10 hg add a
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
11 hg branch a
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
12 hg commit -d '1 0' -u test -m "Adding a branch"
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
13
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
14 hg update -C 0
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
15 echo 'b' >b
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
16 hg add b
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
17 hg branch b
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
18 hg commit -d '2 0' -u test -m "Adding b branch"
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
19
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
20 echo 'bh1' >bh1
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
21 hg add bh1
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
22 hg commit -d '3 0' -u test -m "Adding b branch head 1"
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
23
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
24 hg update -C 2
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
25 echo 'bh2' >bh2
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
26 hg add bh2
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
27 hg commit -d '4 0' -u test -m "Adding b branch head 2"
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
28
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
29 echo 'c' >c
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
30 hg add c
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
31 hg branch c
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
32 hg commit -d '5 0' -u test -m "Adding c branch"
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
33
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
34 hg branches
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
35 echo '-------'
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
36 hg branches -a