Show More
@@ -1,16 +1,17 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 |
|
2 | |||
3 | """\ |
|
3 | """\ | |
4 |
Reorder a revlog (by default the |
|
4 | Reorder a revlog (by default the manifest file in the current repository) to | |
5 |
|
|
5 | save space. Specifically, this topologically sorts the revisions in the revlog | |
6 |
|
|
6 | so that revisions on the same branch are adjacent as much as possible. This is | |
7 | as much as possible. This is a workaround for the fact that Mercurial |
|
7 | a workaround for the fact that Mercurial computes deltas relative to the | |
8 |
|
|
8 | previous revision rather than relative to a parent revision. | |
9 | parent revision. This is *not* safe to run on a changelog. |
|
9 | ||
|
10 | This is *not* safe to run on a changelog. | |||
10 | """ |
|
11 | """ | |
11 |
|
12 | |||
12 | # Originally written by Benoit Boissinot <benoit.boissinot at ens-lyon.org> |
|
13 | # Originally written by Benoit Boissinot <benoit.boissinot at ens-lyon.org> | |
13 |
# as a patch to rewrite-log. |
|
14 | # as a patch to rewrite-log. Cleaned up, refactored, documented, and | |
14 | # renamed by Greg Ward <greg at gerg.ca>. |
|
15 | # renamed by Greg Ward <greg at gerg.ca>. | |
15 |
|
16 | |||
16 | # XXX would be nice to have a way to verify the repository after shrinking, |
|
17 | # XXX would be nice to have a way to verify the repository after shrinking, | |
@@ -165,7 +166,7 b' def shrink(ui, repo, **opts):' | |||||
165 |
|
166 | |||
166 | # Don't use repo.transaction(), because then things get hairy with |
|
167 | # Don't use repo.transaction(), because then things get hairy with | |
167 | # paths: some need to be relative to .hg, and some need to be |
|
168 | # paths: some need to be relative to .hg, and some need to be | |
168 |
# absolute. |
|
169 | # absolute. Doing it this way keeps things simple: everything is an | |
169 | # absolute path. |
|
170 | # absolute path. | |
170 | lock = repo.lock(wait=False) |
|
171 | lock = repo.lock(wait=False) | |
171 | tr = transaction.transaction(sys.stderr.write, |
|
172 | tr = transaction.transaction(sys.stderr.write, |
General Comments 0
You need to be logged in to leave comments.
Login now