Mercurial > hg
comparison hgext/rebase.py @ 23517:4f18e80d9c30
rebase: show more useful status information while rebasing
Show status messages while rebasing, similar to what graft do:
rebasing 12:2647734878ef "fork" (tip)
This gives more context for the user when resolving conflicts.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 09 Dec 2014 03:45:26 +0100 |
parents | 9972758ab4c5 |
children | 2fb0504b8175 |
comparison
equal
deleted
inserted
replaced
23516:328afbad6e57 | 23517:4f18e80d9c30 |
---|---|
16 | 16 |
17 from mercurial import hg, util, repair, merge, cmdutil, commands, bookmarks | 17 from mercurial import hg, util, repair, merge, cmdutil, commands, bookmarks |
18 from mercurial import extensions, patch, scmutil, phases, obsolete, error | 18 from mercurial import extensions, patch, scmutil, phases, obsolete, error |
19 from mercurial import copies | 19 from mercurial import copies |
20 from mercurial.commands import templateopts | 20 from mercurial.commands import templateopts |
21 from mercurial.node import nullrev, nullid, hex | 21 from mercurial.node import nullrev, nullid, hex, short |
22 from mercurial.lock import release | 22 from mercurial.lock import release |
23 from mercurial.i18n import _ | 23 from mercurial.i18n import _ |
24 import os, errno | 24 import os, errno |
25 | 25 |
26 revtodo = -1 | 26 revtodo = -1 |
365 | 365 |
366 sortedstate = sorted(state) | 366 sortedstate = sorted(state) |
367 total = len(sortedstate) | 367 total = len(sortedstate) |
368 pos = 0 | 368 pos = 0 |
369 for rev in sortedstate: | 369 for rev in sortedstate: |
370 ctx = repo[rev] | |
371 desc = '%d:%s "%s"' % (ctx.rev(), ctx, | |
372 ctx.description().split('\n', 1)[0]) | |
373 names = repo.nodetags(ctx.node()) + repo.nodebookmarks(ctx.node()) | |
374 if names: | |
375 desc += ' (%s)' % ' '.join(names) | |
370 pos += 1 | 376 pos += 1 |
371 if state[rev] == revtodo: | 377 if state[rev] == revtodo: |
372 ui.progress(_("rebasing"), pos, ("%d:%s" % (rev, repo[rev])), | 378 ui.status(_('rebasing %s\n') % desc) |
379 ui.progress(_("rebasing"), pos, ("%d:%s" % (rev, ctx)), | |
373 _('changesets'), total) | 380 _('changesets'), total) |
374 p1, p2, base = defineparents(repo, rev, target, state, | 381 p1, p2, base = defineparents(repo, rev, target, state, |
375 targetancestors) | 382 targetancestors) |
376 storestatus(repo, originalwd, target, state, collapsef, keepf, | 383 storestatus(repo, originalwd, target, state, collapsef, keepf, |
377 keepbranchesf, external, activebookmark) | 384 keepbranchesf, external, activebookmark) |
408 if not collapsef: | 415 if not collapsef: |
409 ui.note(_('no changes, revision %d skipped\n') % rev) | 416 ui.note(_('no changes, revision %d skipped\n') % rev) |
410 ui.debug('next revision set to %s\n' % p1) | 417 ui.debug('next revision set to %s\n' % p1) |
411 skipped.add(rev) | 418 skipped.add(rev) |
412 state[rev] = p1 | 419 state[rev] = p1 |
420 elif state[rev] == nullmerge: | |
421 pass | |
422 elif state[rev] == revignored: | |
423 ui.status(_('not rebasing ignored %s\n') % desc) | |
424 else: | |
425 ui.status(_('already rebased %s as %s\n') % | |
426 (desc, repo[state[rev]])) | |
413 | 427 |
414 ui.progress(_('rebasing'), None) | 428 ui.progress(_('rebasing'), None) |
415 ui.note(_('rebase merging completed\n')) | 429 ui.note(_('rebase merging completed\n')) |
416 | 430 |
417 if collapsef and not keepopen: | 431 if collapsef and not keepopen: |