Mercurial > hgsubversion
changeset 431:612b8d753549
inline describe_revision(), use custom termwidth
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 15 Jun 2009 22:31:15 +0200 |
parents | 2851b81c65ce |
children | 4bf90f8c9b7b |
files | hgsubversion/util.py hgsubversion/wrappers.py |
diffstat | 2 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/util.py +++ b/hgsubversion/util.py @@ -64,14 +64,6 @@ def is_svn_repo(repo): default_commit_msg = '*** empty log message ***' -def describe_revision(ui, r): - try: - msg = [s for s in map(str.strip, r.message.splitlines()) if s][0] - except: - msg = default_commit_msg - - ui.status(('[r%d] %s: %s' % (r.revnum, r.author, msg))[:80] + '\n') - def describe_commit(ui, h, b): ui.note(' committed to "%s" as %s\n' % ((b or 'default'), node.short(h)))
--- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -256,10 +256,20 @@ def pull(repo, source, heads=[], force=F converted = False while not converted: try: - util.describe_revision(ui, r) + + msg = r.message.strip() + if not msg: + msg = util.default_commit_msg + else: + msg = [s.strip() for s in msg.splitlines() if s][0] + w = hgutil.termwidth() + bits = (r.revnum, r.author, msg) + ui.status(('[r%d] %s: %s\n' % bits)[:w]) + pullfuns[have_replay](ui, meta, svn, r, tbdelta) meta.save() converted = True + except svnwrap.SubversionRepoCanNotReplay, e: #pragma: no cover ui.status('%s\n' % e.message) stupidmod.print_your_svn_is_old_message(ui)