changeset 198:df4611050286

Output consolidation; decrease the ‘Fetching...’ message to debug level.
author Dan Villiom Podlaski Christiansen <danchr@cs.au.dk>
date Thu, 12 Feb 2009 15:10:42 +0100
parents 43d56e973c3c
children 91db8fc049b0
files fetch_command.py hg_delta_editor.py util.py
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/fetch_command.py
+++ b/fetch_command.py
@@ -81,7 +81,7 @@ def fetch_revisions(ui, svn_url, hg_repo
             converted = False
             while not converted and tries < 3:
                 try:
-                    ui.status(util.describe_revision(r))
+                    util.describe_revision(ui, r)
                     if have_replay:
                         try:
                             replay_convert_rev(hg_editor, svn, r)
@@ -120,8 +120,8 @@ def replay_convert_rev(hg_editor, svn, r
     svn.get_replay(r.revnum, hg_editor)
     i = 1
     if hg_editor.missing_plaintexts:
-        hg_editor.ui.status('Fetching %s files that could not use replay.\n' %
-                            len(hg_editor.missing_plaintexts))
+        hg_editor.ui.debug('Fetching %s files that could not use replay.\n' %
+                           len(hg_editor.missing_plaintexts))
         files_to_grab = set()
         rootpath = svn.subdir and svn.subdir[1:] or ''
         for p in hg_editor.missing_plaintexts:
@@ -595,7 +595,7 @@ def stupid_svn_server_pull_rev(ui, svn, 
             ha = hg_editor.repo.commitctx(current_ctx)
             hg_editor.add_to_revmap(r.revnum, b, ha)
             hg_editor._save_metadata()
-            ui.status(util.describe_commit(ha, b))
+            util.describe_commit(ui, ha, b)
     # These are branches which would have an 'R' status in svn log. This means they were
     # replaced by some other branch, so we need to verify they get marked as closed.
     for branch in check_deleted_branches:
--- a/hg_delta_editor.py
+++ b/hg_delta_editor.py
@@ -526,7 +526,7 @@ class HgChangeReceiver(delta.Editor):
                                          extra)
             new_hash = self.repo.commitctx(current_ctx)
 
-            self.ui.status(our_util.describe_commit(new_hash, branch))
+            our_util.describe_commit(self.ui, new_hash, branch)
             if (rev.revnum, branch) not in self.revmap:
                 self.add_to_revmap(rev.revnum, branch, new_hash)
         # now we handle branches that need to be committed without any files
@@ -553,7 +553,7 @@ class HgChangeReceiver(delta.Editor):
                                          date,
                                          extra)
             new_hash = self.repo.commitctx(current_ctx)
-            self.ui.status(our_util.describe_commit(new_hash, branch))
+            our_util.describe_commit(self.ui, new_hash, branch)
             if (rev.revnum, branch) not in self.revmap:
                 self.add_to_revmap(rev.revnum, branch, new_hash)
         self.clear_current_info()
--- a/util.py
+++ b/util.py
@@ -123,13 +123,13 @@ def is_svn_repo(repo):
 
 default_commit_msg = '*** empty log message ***'
 
-def describe_revision(r):
+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
 
-    return ('[r%d] %s: %s' % (r.revnum, r.author, msg))[:80] + '\n'
+    ui.status(('[r%d] %s: %s' % (r.revnum, r.author, msg))[:80] + '\n')
 
-def describe_commit(h, b):
-    return ' committed to "%s" as %s\n' % ((b or 'default'), node.short(h))
+def describe_commit(ui, h, b):
+    ui.note(' committed to "%s" as %s\n' % ((b or 'default'), node.short(h)))