Commit Graph

17 Commits

Author SHA1 Message Date
Martin Geisler
28fb695e9a i18n: mark strings for translation in Mercurial 2008-08-31 16:12:02 +02:00
Matt Mackall
bc715be859 add __len__ and __iter__ methods to repo and revlog 2008-06-26 14:35:50 -05:00
Matt Mackall
fbb5127472 use repo[changeid] to get a changectx 2008-06-26 14:35:46 -05:00
Benoit Boissinot
9ac6d264fb fix warning from pychecker 2008-03-30 20:21:57 +02:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Alexis S. L. Carvalho
aa51bf2928 repair.py: rewrite a loop, making it cleaner and faster 2008-02-19 19:20:10 -03:00
Alexis S. L. Carvalho
ba985d288a simplify revlog.strip interface and callers; add docstring
Also, strip files only after the changelog and the manifest.
2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
8b35462ec9 strip: calculate list of extra nodes to save and pass it to changegroupsubset
When we remove revision N from the repository, all revisions >= N are
affected: either it's a descendant from N and will also be removed, or
it's not a descendant of N and will be renumbered.

As a consequence, we have to (at least temporarily) remove all filelog
and manifest revisions that have a linkrev >= N, readding some of them
later.

Unfortunately, it's possible to have a revlog with two revisions
r1 and r2 such that r1 < r2, but linkrev(r1) > linkrev(r2).  If we try
to strip revision linkrev(r1) from the repository, we'll also lose
revision r2 when we truncate this revlog.

We already use changegroupsubset to create a temporary changegroup
containing the revisions that have to be restored, but that function is
unable to detect that we also wanted to save the r2 in the case above.

So we manually calculate these extra nodes and pass it to changegroupsubset.

This should fix issue764.
2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
daf9afc324 repair.py: don't use nested functions. 2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
9b687a8fde repair.py: use revs in limitheads 2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
c9102dbdfb repair.py: add a docstring to bundle; use repo.ui 2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
57e493f050 repair.py: split stripall into two functions; clean it up a bit 2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
70423bc0ec repair.py: rename chlog to cl 2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
7bc2e3bde0 repair.py: nodes are nodes, revs are revs
Use "striprev" instead of just "rev" to make the patch a bit less
confusing.  This is also a bit clearer than just "revnum".
2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
14dec2c24b repair.py: use node.* directly 2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
7f21081e68 repair.py: don't import commands.py 2008-01-19 18:01:16 -02:00
Matt Mackall
9a11c35355 strip: move strip code to a new repair module 2007-06-25 01:26:44 -05:00