Show More
@@ -0,0 +1,42 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | hg init a | |||
|
4 | cd a | |||
|
5 | echo a > a | |||
|
6 | hg add -n | |||
|
7 | hg st | |||
|
8 | hg add | |||
|
9 | hg st | |||
|
10 | ||||
|
11 | echo b > b | |||
|
12 | hg add -n b | |||
|
13 | hg st | |||
|
14 | hg add b | |||
|
15 | hg st | |||
|
16 | echo % should fail | |||
|
17 | hg add b | |||
|
18 | hg st | |||
|
19 | ||||
|
20 | hg ci -m 0 | |||
|
21 | echo % should fail | |||
|
22 | hg add a | |||
|
23 | ||||
|
24 | echo aa > a | |||
|
25 | hg ci -m 1 | |||
|
26 | hg up 0 | |||
|
27 | echo aaa > a | |||
|
28 | hg ci -m 2 | |||
|
29 | ||||
|
30 | hg merge | |||
|
31 | hg st | |||
|
32 | echo % should fail | |||
|
33 | hg add a | |||
|
34 | hg st | |||
|
35 | hg ci -m merge | |||
|
36 | ||||
|
37 | echo % issue683 | |||
|
38 | hg rm a | |||
|
39 | hg st | |||
|
40 | echo a > a | |||
|
41 | hg add a | |||
|
42 | hg st |
@@ -0,0 +1,29 b'' | |||||
|
1 | adding a | |||
|
2 | ? a | |||
|
3 | adding a | |||
|
4 | A a | |||
|
5 | A a | |||
|
6 | ? b | |||
|
7 | A a | |||
|
8 | A b | |||
|
9 | % should fail | |||
|
10 | b already tracked! | |||
|
11 | A a | |||
|
12 | A b | |||
|
13 | % should fail | |||
|
14 | a already tracked! | |||
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
16 | warning: conflicts during merge. | |||
|
17 | merging a | |||
|
18 | merging a failed! | |||
|
19 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |||
|
20 | There are unresolved merges, you can redo the full merge using: | |||
|
21 | hg update -C 2 | |||
|
22 | hg merge 1 | |||
|
23 | M a | |||
|
24 | % should fail | |||
|
25 | a already tracked! | |||
|
26 | M a | |||
|
27 | % issue683 | |||
|
28 | R a | |||
|
29 | M a |
@@ -997,6 +997,8 b' class localrepository(repo.repository):' | |||||
997 | "supported currently\n") % f) |
|
997 | "supported currently\n") % f) | |
998 | elif self.dirstate[f] in 'amn': |
|
998 | elif self.dirstate[f] in 'amn': | |
999 | self.ui.warn(_("%s already tracked!\n") % f) |
|
999 | self.ui.warn(_("%s already tracked!\n") % f) | |
|
1000 | elif self.dirstate[f] == 'r': | |||
|
1001 | self.dirstate.normaldirty(f) | |||
1000 | else: |
|
1002 | else: | |
1001 | self.dirstate.add(f) |
|
1003 | self.dirstate.add(f) | |
1002 | finally: |
|
1004 | finally: |
General Comments 0
You need to be logged in to leave comments.
Login now