Mercurial > hg
annotate tests/test-update-reverse.t @ 14732:e9ed3506f066 stable
backout of d04ba50e104d: allow to qpop/push with a dirty working copy
The new behavior was breaking existing tools that relied on a sequence such as
this:
1) start with a dirty working copy
2) qimport some patch
3) try to qpush it
4) old behavior would fail at this point due to outstanding changes.
(new behavior would only fail if the outstanding changes and the patches
changes intersect)
5) innocent user qrefreshes, gets his local changes in the imported patch
It's worth considering if we can move this behavior to -f in the future.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 24 Jun 2011 23:25:42 +0300 |
parents | 28e2e3804f2e |
children | efdcce3fd2d5 |
rev | line source |
---|---|
12279 | 1 $ hg init |
2 | |
3 $ touch a | |
4 $ hg add a | |
5 $ hg commit -m "Added a" | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
6 |
12279 | 7 $ touch main |
8 $ hg add main | |
9 $ hg commit -m "Added main" | |
10 $ hg checkout 0 | |
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
12 |
12279 | 13 'main' should be gone: |
14 | |
15 $ ls | |
16 a | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
17 |
12279 | 18 $ touch side1 |
19 $ hg add side1 | |
20 $ hg commit -m "Added side1" | |
21 created new head | |
22 $ touch side2 | |
23 $ hg add side2 | |
24 $ hg commit -m "Added side2" | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
25 |
12279 | 26 $ hg log |
27 changeset: 3:91ebc10ed028 | |
28 tag: tip | |
29 user: test | |
30 date: Thu Jan 01 00:00:00 1970 +0000 | |
31 summary: Added side2 | |
32 | |
33 changeset: 2:b932d7dbb1e1 | |
34 parent: 0:c2eda428b523 | |
35 user: test | |
36 date: Thu Jan 01 00:00:00 1970 +0000 | |
37 summary: Added side1 | |
38 | |
39 changeset: 1:71a760306caf | |
40 user: test | |
41 date: Thu Jan 01 00:00:00 1970 +0000 | |
42 summary: Added main | |
43 | |
44 changeset: 0:c2eda428b523 | |
45 user: test | |
46 date: Thu Jan 01 00:00:00 1970 +0000 | |
47 summary: Added a | |
48 | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
49 |
12279 | 50 $ hg heads |
51 changeset: 3:91ebc10ed028 | |
52 tag: tip | |
53 user: test | |
54 date: Thu Jan 01 00:00:00 1970 +0000 | |
55 summary: Added side2 | |
56 | |
57 changeset: 1:71a760306caf | |
58 user: test | |
59 date: Thu Jan 01 00:00:00 1970 +0000 | |
60 summary: Added main | |
61 | |
62 $ ls | |
63 a | |
64 side1 | |
65 side2 | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
66 |
12279 | 67 $ hg update --debug -C 1 |
68 resolving manifests | |
69 overwrite True partial False | |
70 ancestor 91ebc10ed028+ local 91ebc10ed028+ remote 71a760306caf | |
71 side2: other deleted -> r | |
72 side1: other deleted -> r | |
73 main: remote created -> g | |
74 updating: side1 1/3 files (33.33%) | |
75 removing side1 | |
76 updating: side2 2/3 files (66.67%) | |
77 removing side2 | |
78 updating: main 3/3 files (100.00%) | |
79 getting main | |
80 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
81 |
12279 | 82 $ ls |
83 a | |
84 main | |
1236
67a28636ea64
Fix bug with co -C across branches, update tests
mpm@selenic.com
parents:
diff
changeset
|
85 |