##// END OF EJS Templates
rebase: skip resolved but emptied revisions...
Patrick Mezard -
r16509:eab9119c stable
parent child Browse files
Show More
@@ -238,7 +238,13 b' class dirstate(object):'
238
238
239 def setparents(self, p1, p2=nullid):
239 def setparents(self, p1, p2=nullid):
240 self._dirty = self._dirtypl = True
240 self._dirty = self._dirtypl = True
241 oldp2 = self._pl[1]
241 self._pl = p1, p2
242 self._pl = p1, p2
243 if oldp2 != nullid and p2 == nullid:
244 # Discard 'm' markers when moving away from a merge state
245 for f, s in self._map.iteritems():
246 if s[0] == 'm':
247 self.normallookup(f)
242
248
243 def setbranch(self, branch):
249 def setbranch(self, branch):
244 if branch in ['tip', '.', 'null']:
250 if branch in ['tip', '.', 'null']:
@@ -386,6 +392,8 b' class dirstate(object):'
386
392
387 def merge(self, f):
393 def merge(self, f):
388 '''Mark a file merged.'''
394 '''Mark a file merged.'''
395 if self._pl[1] == nullid:
396 return self.normallookup(f)
389 self._dirty = True
397 self._dirty = True
390 s = os.lstat(self._join(f))
398 s = os.lstat(self._join(f))
391 self._addpath(f)
399 self._addpath(f)
@@ -132,14 +132,11 b' Graft out of order, skipping a merge and'
132 b: local copied/moved to a -> m
132 b: local copied/moved to a -> m
133 preserving b for resolve of b
133 preserving b for resolve of b
134 updating: b 1/1 files (100.00%)
134 updating: b 1/1 files (100.00%)
135 b
136 b: searching for copy revision for a
137 b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
138 grafting revision 5
135 grafting revision 5
139 searching for copies back to rev 1
136 searching for copies back to rev 1
140 resolving manifests
137 resolving manifests
141 overwrite: False, partial: False
138 overwrite: False, partial: False
142 ancestor: 4c60f11aa304, local: 6f5ea6ac8b70+, remote: 97f8bfe72746
139 ancestor: 4c60f11aa304, local: d2e44c99fd3f+, remote: 97f8bfe72746
143 e: remote is newer -> g
140 e: remote is newer -> g
144 updating: e 1/1 files (100.00%)
141 updating: e 1/1 files (100.00%)
145 getting e
142 getting e
@@ -148,7 +145,7 b' Graft out of order, skipping a merge and'
148 searching for copies back to rev 1
145 searching for copies back to rev 1
149 resolving manifests
146 resolving manifests
150 overwrite: False, partial: False
147 overwrite: False, partial: False
151 ancestor: 4c60f11aa304, local: 77eb504366ab+, remote: 9c233e8e184d
148 ancestor: 4c60f11aa304, local: 839a7e8fcf80+, remote: 9c233e8e184d
152 e: versions differ -> m
149 e: versions differ -> m
153 d: remote is newer -> g
150 d: remote is newer -> g
154 preserving e for resolve of e
151 preserving e for resolve of e
@@ -157,7 +154,7 b' Graft out of order, skipping a merge and'
157 updating: e 2/2 files (100.00%)
154 updating: e 2/2 files (100.00%)
158 picked tool 'internal:merge' for e (binary False symlink False)
155 picked tool 'internal:merge' for e (binary False symlink False)
159 merging e
156 merging e
160 my e@77eb504366ab+ other e@9c233e8e184d ancestor e@68795b066622
157 my e@839a7e8fcf80+ other e@9c233e8e184d ancestor e@68795b066622
161 warning: conflicts during merge.
158 warning: conflicts during merge.
162 merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
159 merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
163 abort: unresolved conflicts, can't continue
160 abort: unresolved conflicts, can't continue
@@ -203,13 +200,11 b' Compare with original:'
203 View graph:
200 View graph:
204
201
205 $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n'
202 $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n'
206 @ test@11.draft: 3
203 @ test@10.draft: 3
207 |
208 o test@10.draft: 4
209 |
204 |
210 o test@9.draft: 5
205 o test@9.draft: 4
211 |
206 |
212 o bar@8.draft: 1
207 o test@8.draft: 5
213 |
208 |
214 o foo@7.draft: 2
209 o foo@7.draft: 2
215 |
210 |
@@ -227,14 +222,6 b' View graph:'
227 |/
222 |/
228 o test@0.public: 0
223 o test@0.public: 0
229
224
230 $ hg export --git 8
231 # HG changeset patch
232 # User bar
233 # Date 0 0
234 # Node ID 6f5ea6ac8b705521c6d5f49a04ed142e3f76645d
235 # Parent d2e44c99fd3f31c176ea4efb9eca9f6306c81756
236 1
237
238 Graft again onto another branch should preserve the original source
225 Graft again onto another branch should preserve the original source
239 $ hg up -q 0
226 $ hg up -q 0
240 $ echo 'g'>g
227 $ echo 'g'>g
@@ -250,12 +237,12 b' Graft again onto another branch should p'
250 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
237 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
251
238
252 $ hg log --debug -r tip
239 $ hg log --debug -r tip
253 changeset: 13:95adbe5de6b10f376b699ece9ed5a57cd7b4b0f6
240 changeset: 12:95adbe5de6b10f376b699ece9ed5a57cd7b4b0f6
254 tag: tip
241 tag: tip
255 phase: draft
242 phase: draft
256 parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
243 parent: 11:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
257 parent: -1:0000000000000000000000000000000000000000
244 parent: -1:0000000000000000000000000000000000000000
258 manifest: 13:9944044f82a462bbaccc9bdf7e0ac5b811db7d1b
245 manifest: 12:9944044f82a462bbaccc9bdf7e0ac5b811db7d1b
259 user: foo
246 user: foo
260 date: Thu Jan 01 00:00:00 1970 +0000
247 date: Thu Jan 01 00:00:00 1970 +0000
261 files+: b
248 files+: b
@@ -273,7 +260,7 b' Disallow grafting an already grafted cse'
273 [255]
260 [255]
274
261
275 Disallow grafting already grafted csets with the same origin onto each other
262 Disallow grafting already grafted csets with the same origin onto each other
276 $ hg up -q 13
263 $ hg up -q 12
277 $ hg graft 2
264 $ hg graft 2
278 skipping already grafted revision 2
265 skipping already grafted revision 2
279 [255]
266 [255]
@@ -286,5 +273,5 b' Disallow grafting already grafted csets '
286 skipping already grafted revision 2
273 skipping already grafted revision 2
287 [255]
274 [255]
288 $ hg graft tip
275 $ hg graft tip
289 skipping already grafted revision 13 (same origin 2)
276 skipping already grafted revision 12 (same origin 2)
290 [255]
277 [255]
@@ -380,9 +380,7 b' Ensure --continue restores a correct sta'
380 $ hg rebase -c
380 $ hg rebase -c
381 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob)
381 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob)
382 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
382 $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
383 @ 8:secret 'H2'
383 @ 7:draft 'H'
384 |
385 o 7:draft 'H'
386 |
384 |
387 | o 6:draft 'G'
385 | o 6:draft 'G'
388 |/|
386 |/|
@@ -398,11 +396,3 b' Ensure --continue restores a correct sta'
398 |/
396 |/
399 o 0:draft 'A'
397 o 0:draft 'A'
400
398
401 $ hg export --git 8
402 # HG changeset patch
403 # User test
404 # Date 0 0
405 # Node ID 248209b40064fe67181915fa7a4f3395520f700a
406 # Parent 02de42196ebee42ef284b6780a87cdc96e8eaab6
407 H2
408
@@ -117,9 +117,7 b' already has one local mq patch'
117 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
117 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
118
118
119 $ hg tglog
119 $ hg tglog
120 @ 9: 'r5' tags: 5.diff qtip tip
120 @ 8: 'r5' tags: 5.diff qtip tip
121 |
122 o 8: 'r4' tags: 4.diff
123 |
121 |
124 o 7: 'r2' tags: 2.diff qbase
122 o 7: 'r2' tags: 2.diff qbase
125 |
123 |
@@ -137,11 +135,3 b' already has one local mq patch'
137 |
135 |
138 o 0: 'r0' tags:
136 o 0: 'r0' tags:
139
137
140 $ hg export --git 4.diff
141 # HG changeset patch
142 # User test
143 # Date 0 0
144 # Node ID 315eb21a13c2b06e787f5d0000e36f8f8f3a1768
145 # Parent 1660ab13ce9aea3da22ea54926bd49aeff8a4e20
146 r4
147
General Comments 0
You need to be logged in to leave comments. Login now