changeset 749:ec52205e5ed1

pull: handle change in termwidth() api from hg change c52c629ce19e
author Augie Fackler <durin42@gmail.com>
date Sun, 14 Nov 2010 19:07:20 -0600
parents e1e2af66953d
children ceaa9eeb6741
files hgsubversion/wrappers.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -306,7 +306,10 @@ def pull(repo, source, heads=[], force=F
                             msg = util.default_commit_msg
                         else:
                             msg = [s.strip() for s in msg.splitlines() if s][0]
-                        w = hgutil.termwidth()
+                        if getattr(ui, 'termwidth', False):
+                            w = ui.termwidth()
+                        else:
+                            w = hgutil.termwidth()
                         bits = (r.revnum, r.author, msg)
                         ui.status(('[r%d] %s: %s' % bits)[:w] + '\n')
                         util.progress(ui, 'pull', r.revnum - start, total=total)