##// END OF EJS Templates
rebase: write series file without removed mq patches...
Mads Kiilerich -
r15904:7d28d6a6 default
parent child Browse files
Show More
@@ -460,9 +460,13 b' def updatemq(repo, state, skipped, **opt'
460 460 mq.qimport(repo, (), patchname=name, git=isgit,
461 461 rev=[str(state[rev])])
462 462
463 # restore old series to preserve guards
464 mq.fullseries = original_series
465 mq.series_dirty = True
463 # restore missing guards
464 for s in original_series:
465 pname = mq.guard_re.split(s, 1)[0]
466 if pname in mq.fullseries:
467 repo.ui.debug('restoring guard for patch %s' % (pname))
468 mq.fullseries[mq.fullseries.index(pname)] = s
469 mq.series_dirty = True
466 470 mq.savedirty()
467 471
468 472 def updatebookmarks(repo, nstate, originalbookmarks, **opts):
@@ -244,7 +244,7 b' Rebase with guards'
244 244 $ hg ci -Am a
245 245 adding a
246 246
247 Create mq repo with guarded patches foo and bar:
247 Create mq repo with guarded patches foo and bar and empty patch:
248 248
249 249 $ hg qinit
250 250 $ hg qnew foo
@@ -256,6 +256,8 b' Create mq repo with guarded patches foo '
256 256 popping foo
257 257 patch queue now empty
258 258
259 $ hg qnew empty-important -m 'important commit message'
260
259 261 $ hg qnew bar
260 262 $ hg qguard bar +baz
261 263 $ echo bar > bar
@@ -263,13 +265,16 b' Create mq repo with guarded patches foo '
263 265 $ hg qref
264 266
265 267 $ hg qguard -l
268 empty-important: unguarded
266 269 bar: +baz
267 270 foo: +baz
268 271
269 272 $ hg tglog
270 @ 1:* '[mq]: bar' tags: bar qbase qtip tip (glob)
273 @ 2: '[mq]: bar' tags: bar qtip tip
271 274 |
272 o 0:* 'a' tags: qparent (glob)
275 o 1: 'important commit message' tags: empty-important qbase
276 |
277 o 0: 'a' tags: qparent
273 278
274 279 Create new head to rebase bar onto:
275 280
@@ -279,28 +284,35 b' Create new head to rebase bar onto:'
279 284 $ hg add b
280 285 $ hg ci -m b
281 286 created new head
282 $ hg up -C 1
287 $ hg up -C 2
283 288 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
284 289 $ echo a >> a
285 290 $ hg qref
286 291
287 292 $ hg tglog
288 @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob)
293 @ 3: '[mq]: bar' tags: bar qtip tip
289 294 |
290 | o 1:* 'b' tags: (glob)
295 | o 2: 'b' tags:
296 | |
297 o | 1: 'important commit message' tags: empty-important qbase
291 298 |/
292 o 0:* 'a' tags: qparent (glob)
299 o 0: 'a' tags: qparent
293 300
294 301
295 Rebase bar (make sure series order is preserved):
302 Rebase bar (make sure series order is preserved and empty-important also is
303 removed from the series):
296 304
297 305 $ hg qseries
306 empty-important
307 bar
308 foo
309 $ [ -f .hg/patches/empty-important ]
310 $ hg -q rebase -d 2
311 $ hg qseries
298 312 bar
299 313 foo
300 $ hg -q rebase -d 1
301 $ hg qseries
302 bar
303 foo
314 $ [ -f .hg/patches/empty-important ]
315 [1]
304 316
305 317 $ hg qguard -l
306 318 bar: +baz
General Comments 0
You need to be logged in to leave comments. Login now