annotate tests/test-rebuildstate @ 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 b304c2496f52
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5080
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
1 #!/bin/sh
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
2 # basic test for hg debugrebuildstate
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
3
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
4 hg init repo
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
5 cd repo
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
6
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
7 touch foo bar
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
8 hg ci -Am 'add foo bar'
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
9
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
10 touch baz
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
11 hg add baz
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
12 hg rm bar
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
13
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
14 echo '% state dump'
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
15 hg debugstate | cut -b 1-16,35- | sort
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
16 echo '% status'
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
17 hg st -A
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
18
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
19 hg debugrebuildstate
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
20 echo '% state dump'
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
21 hg debugstate | cut -b 1-16,35- | sort
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
22 echo '% status'
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
23 hg st -A
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
24