# HG changeset patch # User Dirkjan Ochtman # Date 1245097875 -7200 # Node ID 612b8d7535495342e9b885c8a93a3dc263f8c6e0 # Parent 2851b81c65ce71140113258b6c7397e382eaf46d inline describe_revision(), use custom termwidth diff --git a/hgsubversion/util.py b/hgsubversion/util.py --- 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))) diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- 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)