# HG changeset patch # User Greg Ward # Date 1263305573 -3600 # Node ID 49a8625b8cac416ea1d874e251d366f5a31d0e5b # Parent 318d58fe4ceb49d30961cf2818df51b7434d8000 shrink-revlog: help/doc tweaks - make it look right in 'hg help extensions' - clarify --revlog option - add a main program to tell users this is no longer a standalone script diff -r 318d58fe4ceb -r 49a8625b8cac contrib/shrink-revlog.py --- a/contrib/shrink-revlog.py Thu Jan 07 23:04:53 2010 +0100 +++ b/contrib/shrink-revlog.py Tue Jan 12 15:12:53 2010 +0100 @@ -1,10 +1,11 @@ #!/usr/bin/env python """\ -Reorder a revlog (by default the manifest file in the current repository) to -save space. Specifically, this topologically sorts the revisions in the revlog -so that revisions on the same branch are adjacent as much as possible. This is -a workaround for the fact that Mercurial computes deltas relative to the +reorder a revlog (the manifest by default) to save space + +Specifically, this topologically sorts the revisions in the revlog so that +revisions on the same branch are adjacent as much as possible. This is a +workaround for the fact that Mercurial computes deltas relative to the previous revision rather than relative to a parent revision. This is *not* safe to run on a changelog. @@ -206,6 +207,9 @@ cmdtable = { 'shrink': (shrink, - [('', 'revlog', '', 'shrink file')], + [('', 'revlog', '', 'index (.i) file of the revlog to shrink')], 'hg shrink [--revlog PATH]') } + +if __name__ == "__main__": + print "shrink-revlog.py is now an extension (see hg help extensions)"