]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/client.py
Add git.shorten_hash(), printing only the first few bytes of a sha1.
[bup.git] / lib / bup / client.py
index e773c66049550af9bfd4791788ab1bf2b709e428..f941067237b1f574d93bb2b40668c5f5eb20dfca 100644 (file)
@@ -195,7 +195,7 @@ class Client:
         for b in chunkyreader(self.conn, n):
             f.write(b)
             count += len(b)
-            progress('Receiving index from server: %d/%d\r' % (count, n))
+            qprogress('Receiving index from server: %d/%d\r' % (count, n))
         progress('Receiving index from server: %d/%d, done.\n' % (count, n))
         self.check_ok()
         f.close()
@@ -216,11 +216,13 @@ class Client:
             debug2('%s\n' % line)
             if line.startswith('index '):
                 idx = line[6:]
-                debug1('client: received index suggestion: %s\n' % idx)
+                debug1('client: received index suggestion: %s\n'
+                       % git.shorten_hash(idx))
                 suggested.append(idx)
             else:
                 assert(line.endswith('.idx'))
-                debug1('client: completed writing pack, idx: %s\n' % line)
+                debug1('client: completed writing pack, idx: %s\n'
+                       % git.shorten_hash(line))
                 suggested.append(line)
         self.check_ok()
         if ob: