81 $ hg commit -m 'merge inside/f1' |
81 $ hg commit -m 'merge inside/f1' |
82 |
82 |
83 TODO: Can merge non-conflicting changes outside narrow spec |
83 TODO: Can merge non-conflicting changes outside narrow spec |
84 |
84 |
85 $ hg update -q 'desc("modify inside/f1")' |
85 $ hg update -q 'desc("modify inside/f1")' |
|
86 |
|
87 #if flat |
|
88 |
86 $ hg merge 'desc("modify outside/f1")' |
89 $ hg merge 'desc("modify outside/f1")' |
87 abort: merge affects file 'outside/f1' outside narrow, which is not yet supported (flat !) |
90 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 (branch merge, don't forget to commit) |
|
92 |
|
93 status should be clean |
|
94 |
|
95 $ hg status |
|
96 ? inside/f1.orig |
|
97 |
|
98 file out of the spec should still not be in the dirstate at all |
|
99 |
|
100 $ hg debugdirstate | grep outside/f1 |
|
101 [1] |
|
102 |
|
103 Commit that merge |
|
104 |
|
105 $ hg ci -m 'merge from outside to inside' |
|
106 |
|
107 status should be clean |
|
108 |
|
109 $ hg status |
|
110 ? inside/f1.orig |
|
111 |
|
112 file out of the spec should not be in the mergestate anymore |
|
113 |
|
114 $ hg debugmergestate | grep outside/f1 |
|
115 [1] |
|
116 |
|
117 file out of the spec should still not be in the dirstate at all |
|
118 |
|
119 $ hg debugdirstate | grep outside/f1 |
|
120 [1] |
|
121 |
|
122 The filenode used should come from p2 |
|
123 |
|
124 $ hg manifest --debug --rev . | grep outside/f1 |
|
125 83cd11431a3b2aff8a3995e5f27bcf33cdb5be98 644 outside/f1 |
|
126 $ hg manifest --debug --rev 'p1(.)' | grep outside/f1 |
|
127 c6b956c48be2cd4fa94be16002aba311143806fa 644 outside/f1 |
|
128 $ hg manifest --debug --rev 'p2(.)' | grep outside/f1 |
|
129 83cd11431a3b2aff8a3995e5f27bcf33cdb5be98 644 outside/f1 |
|
130 |
|
131 |
|
132 remove the commit to get in the previous situation again |
|
133 |
|
134 $ hg debugstrip -r . |
|
135 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
136 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/48eb25338b19-a1bb8350-backup.hg |
|
137 |
|
138 #else |
|
139 |
|
140 $ hg merge 'desc("modify outside/f1")' |
88 abort: merge affects file 'outside/' outside narrow, which is not yet supported (tree !) |
141 abort: merge affects file 'outside/' outside narrow, which is not yet supported (tree !) |
89 (merging in the other direction may work) |
142 (merging in the other direction may work) |
90 [255] |
143 [255] |
|
144 |
|
145 #endif |
91 |
146 |
92 $ hg update -q 'desc("modify outside/f1")' |
147 $ hg update -q 'desc("modify outside/f1")' |
93 $ hg merge 'desc("modify inside/f1")' |
148 $ hg merge 'desc("modify inside/f1")' |
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
95 (branch merge, don't forget to commit) |
150 (branch merge, don't forget to commit) |