# HG changeset patch
# User Greg Ward <greg@gerg.ca>
# Date 2012-03-28 19:25:20
# Node ID d76b9abd1509b41366612c064eee07500f5bf75c
# Parent  90ca62bb9e7871a32c1139bb66669b5839581db7

shrink-revlog: make check-code happier

There's still a naked 'except:' clause, but I'm not sure how to fix it
(what exception is it expecting?). This just fixes line length.

diff --git a/contrib/shrink-revlog.py b/contrib/shrink-revlog.py
--- a/contrib/shrink-revlog.py
+++ b/contrib/shrink-revlog.py
@@ -269,19 +269,23 @@ def shrink(ui, repo, **opts):
         lock.release()
 
     if not opts.get('dry_run'):
-        ui.write(_('note: old revlog saved in:\n'
-                   '  %s\n'
-                   '  %s\n'
-                   '(You can delete those files when you are satisfied that your\n'
-                   'repository is still sane.  '
-                   'Running \'hg verify\' is strongly recommended.)\n')
-                 % (oldindexfn, olddatafn))
+        ui.write(
+            _('note: old revlog saved in:\n'
+              '  %s\n'
+              '  %s\n'
+              '(You can delete those files when you are satisfied that your\n'
+              'repository is still sane.  '
+              'Running \'hg verify\' is strongly recommended.)\n')
+            % (oldindexfn, olddatafn))
 
 cmdtable = {
     'shrink': (shrink,
-               [('', 'revlog', '', _('index (.i) file of the revlog to shrink')),
-                ('n', 'dry-run', None, _('do not shrink, simulate only')),
-                ('', 'sort', 'reversepostorder', 'name of sort algorithm to use'),
+               [('', 'revlog', '',
+                 _('the revlog to shrink (.i)')),
+                ('n', 'dry-run', None,
+                 _('do not shrink, simulate only')),
+                ('', 'sort', 'reversepostorder',
+                 _('name of sort algorithm to use')),
                 ],
                _('hg shrink [--revlog PATH]'))
 }
diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t
--- a/tests/test-check-code-hg.t
+++ b/tests/test-check-code-hg.t
@@ -31,15 +31,6 @@
    warning: naked except clause
    warning: naked except clause
   contrib/shrink-revlog.py:0:
-   >                    '(You can delete those files when you are satisfied that your\n'
-   warning: line over 80 characters
-  contrib/shrink-revlog.py:0:
-   >                 ('', 'sort', 'reversepostorder', 'name of sort algorithm to use'),
-   warning: line over 80 characters
-  contrib/shrink-revlog.py:0:
-   >                [('', 'revlog', '', _('index (.i) file of the revlog to shrink')),
-   warning: line over 80 characters
-  contrib/shrink-revlog.py:0:
    >         except:
    warning: naked except clause
   doc/gendoc.py:0: