##// END OF EJS Templates
rebase: small cosmetic cleanups
Nicolas Dumazet -
r11537:0a044e5f stable
parent child Browse files
Show More
@@ -271,9 +271,9 def concludenode(repo, rev, p1, p2, comm
271 271 'Commit the changes and store useful information in extra'
272 272 try:
273 273 repo.dirstate.setparents(repo[p1].node(), repo[p2].node())
274 ctx = repo[rev]
274 275 if commitmsg is None:
275 commitmsg = repo[rev].description()
276 ctx = repo[rev]
276 commitmsg = ctx.description()
277 277 extra = {'rebase_source': ctx.hex()}
278 278 if extrafn:
279 279 extrafn(ctx, extra)
@@ -347,27 +347,29 def isagitpatch(repo, patchname):
347 347 def updatemq(repo, state, skipped, **opts):
348 348 'Update rebased mq patches - finalize and then import them'
349 349 mqrebase = {}
350 for p in repo.mq.applied:
351 if repo[p.node].rev() in state:
350 mq = repo.mq
351 for p in mq.applied:
352 rev = repo[p.node].rev()
353 if rev in state:
352 354 repo.ui.debug('revision %d is an mq patch (%s), finalize it.\n' %
353 (repo[p.node].rev(), p.name))
354 mqrebase[repo[p.node].rev()] = (p.name, isagitpatch(repo, p.name))
355 (rev, p.name))
356 mqrebase[rev] = (p.name, isagitpatch(repo, p.name))
355 357
356 358 if mqrebase:
357 repo.mq.finish(repo, mqrebase.keys())
359 mq.finish(repo, mqrebase.keys())
358 360
359 361 # We must start import from the newest revision
360 362 for rev in sorted(mqrebase, reverse=True):
361 363 if rev not in skipped:
362 repo.ui.debug('import mq patch %d (%s)\n'
363 % (state[rev], mqrebase[rev][0]))
364 repo.mq.qimport(repo, (), patchname=mqrebase[rev][0],
365 git=mqrebase[rev][1],rev=[str(state[rev])])
366 repo.mq.save_dirty()
367 qrepo = repo.mq.qrepo()
364 name, isgit = mqrebase[rev]
365 repo.ui.debug('import mq patch %d (%s)\n' % (state[rev], name))
366 mq.qimport(repo, (), patchname=name, git=isgit,
367 rev=[str(state[rev])])
368 mq.save_dirty()
369 qrepo = mq.qrepo()
368 370 if qrepo:
369 qrepo[None].add(repo.mq.added)
370 repo.mq.added = []
371 qrepo[None].add(mq.added)
372 mq.added = []
371 373
372 374 def storestatus(repo, originalwd, target, state, collapse, keep, keepbranches,
373 375 external):
General Comments 0
You need to be logged in to leave comments. Login now