diff hgext/largefiles/localstore.py @ 18545:a49b7c9fc246

largefiles: report localstore errors with single line warnings messages The actual hash is also not relevant to report. This makes verify output with multiple failures easier to process.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 04 Feb 2013 02:46:53 +0100
parents 5206af8894a3
children d035c3902111
line wrap: on
line diff
--- a/hgext/largefiles/localstore.py	Mon Feb 04 02:46:53 2013 +0100
+++ b/hgext/largefiles/localstore.py	Mon Feb 04 02:46:53 2013 +0100
@@ -63,23 +63,19 @@
             return False
 
         expecthash = fctx.data()[0:40]
+        storepath = lfutil.storepath(self.remote, expecthash)
         verified.add(key)
         if not lfutil.instore(self.remote, expecthash):
             self.ui.warn(
-                _('changeset %s: %s missing\n'
-                  '  (looked for hash %s)\n')
-                % (cset, filename, expecthash))
+                _('changeset %s: %s references missing %s\n')
+                % (cset, filename, storepath))
             return True                 # failed
 
         if contents:
-            storepath = lfutil.storepath(self.remote, expecthash)
             actualhash = lfutil.hashfile(storepath)
             if actualhash != expecthash:
                 self.ui.warn(
-                    _('changeset %s: %s: contents differ\n'
-                      '  (%s:\n'
-                      '  expected hash %s,\n'
-                      '  but got %s)\n')
-                    % (cset, filename, storepath, expecthash, actualhash))
+                    _('changeset %s: %s references corrupted %s\n')
+                    % (cset, filename, storepath))
                 return True             # failed
         return False