##// END OF EJS Templates
rebase: preserve mq series order after rebasing (issue2849)
Idan Kamara -
r14599:b2800451 default
parent child Browse files
Show More
@@ -396,13 +396,8 b' def updatemq(repo, state, skipped, **opt'
396 mq.qimport(repo, (), patchname=name, git=isgit,
396 mq.qimport(repo, (), patchname=name, git=isgit,
397 rev=[str(state[rev])])
397 rev=[str(state[rev])])
398
398
399 # Restore missing guards
399 # restore old series to preserve guards
400 for s in original_series:
400 mq.fullseries = original_series
401 pname = mq.guard_re.split(s, 1)[0]
402 if pname in mq.fullseries:
403 repo.ui.debug('restoring guard for patch %s' % (pname))
404 mq.fullseries.remove(pname)
405 mq.fullseries.append(s)
406 mq.series_dirty = True
401 mq.series_dirty = True
407 mq.savedirty()
402 mq.savedirty()
408
403
@@ -250,6 +250,7 b' Create mq repo with guarded patches foo '
250 $ hg qnew foo
250 $ hg qnew foo
251 $ hg qguard foo +baz
251 $ hg qguard foo +baz
252 $ echo foo > foo
252 $ echo foo > foo
253 $ hg add foo
253 $ hg qref
254 $ hg qref
254 $ hg qpop
255 $ hg qpop
255 popping foo
256 popping foo
@@ -258,6 +259,7 b' Create mq repo with guarded patches foo '
258 $ hg qnew bar
259 $ hg qnew bar
259 $ hg qguard bar +baz
260 $ hg qguard bar +baz
260 $ echo bar > bar
261 $ echo bar > bar
262 $ hg add bar
261 $ hg qref
263 $ hg qref
262
264
263 $ hg qguard -l
265 $ hg qguard -l
@@ -272,13 +274,13 b' Create mq repo with guarded patches foo '
272 Create new head to rebase bar onto:
274 Create new head to rebase bar onto:
273
275
274 $ hg up -C 0
276 $ hg up -C 0
275 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
277 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
276 $ echo b > b
278 $ echo b > b
277 $ hg add b
279 $ hg add b
278 $ hg ci -m b
280 $ hg ci -m b
279 created new head
281 created new head
280 $ hg up -C 1
282 $ hg up -C 1
281 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
283 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
282 $ echo a >> a
284 $ echo a >> a
283 $ hg qref
285 $ hg qref
284
286
@@ -290,13 +292,19 b' Create new head to rebase bar onto:'
290 o 0:* 'a' tags: qparent (glob)
292 o 0:* 'a' tags: qparent (glob)
291
293
292
294
293 Rebase bar:
295 Rebase bar (make sure series order is preserved):
294
296
297 $ hg qseries
298 bar
299 foo
295 $ hg -q rebase -d 1
300 $ hg -q rebase -d 1
301 $ hg qseries
302 bar
303 foo
296
304
297 $ hg qguard -l
305 $ hg qguard -l
306 bar: +baz
298 foo: +baz
307 foo: +baz
299 bar: +baz
300
308
301 $ hg tglog
309 $ hg tglog
302 @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob)
310 @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob)
General Comments 0
You need to be logged in to leave comments. Login now