shrink-revlog: remove unneeded imports and useless code stable
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Fri, 19 Feb 2010 02:11:37 +0100
branchstable
changeset 10509 3e7e789d9494
parent 10508 cc35ad583e66
child 10510 f77f3383c666
shrink-revlog: remove unneeded imports and useless code
contrib/shrink-revlog.py
--- a/contrib/shrink-revlog.py	Fri Feb 19 02:07:13 2010 +0100
+++ b/contrib/shrink-revlog.py	Fri Feb 19 02:11:37 2010 +0100
@@ -19,9 +19,8 @@
 # e.g. by comparing "before" and "after" states of random changesets
 # (maybe: export before, shrink, export after, diff).
 
-import sys, os, tempfile
-import optparse
-from mercurial import ui as ui_, hg, revlog, transaction, node, util
+import os, tempfile
+from mercurial import revlog, transaction, node, util
 from mercurial import changegroup
 from mercurial.i18n import _
 
@@ -113,9 +112,6 @@
     Shrink revlog by re-ordering revisions. Will operate on manifest for
     the given repository if no other revlog is specified."""
 
-    # Unbuffer stdout for nice progress output.
-    sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
-
     if not repo.local():
         raise util.Abort(_('not a local repository: %s') % repo.root)