[Pkg-bazaar-commits] ./bzr/unstable r501: - fix verboseness in commit command

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:19:22 UTC 2009


------------------------------------------------------------
revno: 501
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-05-16 12:46:07 +1000
message:
  - fix verboseness in commit command
modified:
  bzrlib/commit.py
-------------- next part --------------
=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2005-05-16 01:54:16 +0000
+++ b/bzrlib/commit.py	2005-05-16 02:46:07 +0000
@@ -76,10 +76,10 @@
     basis_inv = basis.inventory
     missing_ids = []
 
-    print 'looking for changes...'
+    if verbose:
+        note('looking for changes...')
+        
     for path, entry in work_inv.iter_entries():
-        ## TODO: Cope with files that have gone missing.
-
         ## TODO: Check that the file kind has not changed from the previous
         ## revision of this file (if any).
 
@@ -99,7 +99,8 @@
             continue
 
         if not work_tree.has_id(file_id):
-            note('deleted %s%s' % (path, kind_marker(entry.kind)))
+            if verbose:
+                print('deleted %s%s' % (path, kind_marker(entry.kind)))
             mutter("    file is missing, removing from inventory")
             missing_ids.append(file_id)
             continue
@@ -140,13 +141,14 @@
                 entry.text_id = gen_file_id(entry.name)
                 branch.text_store.add(content, entry.text_id)
                 mutter('    stored with text_id {%s}' % entry.text_id)
-                if not old_ie:
-                    note('added %s' % path)
-                elif (old_ie.name == entry.name
-                      and old_ie.parent_id == entry.parent_id):
-                    note('modified %s' % path)
-                else:
-                    note('renamed %s' % path)
+                if verbose:
+                    if not old_ie:
+                        note('added %s' % path)
+                    elif (old_ie.name == entry.name
+                          and old_ie.parent_id == entry.parent_id):
+                        note('modified %s' % path)
+                    else:
+                        note('renamed %s' % path)
 
 
     for file_id in missing_ids:
@@ -211,10 +213,10 @@
     ## TODO: Also calculate and store the inventory SHA1
     mutter("committing patch r%d" % (branch.revno() + 1))
 
-
     branch.append_revision(rev_id)
 
-    note("commited r%d" % branch.revno())
+    if verbose:
+        note("commited r%d" % branch.revno())
 
 
 



More information about the Pkg-bazaar-commits mailing list