Commit Graph

41 Commits

Author SHA1 Message Date
Benoit Boissinot
f23fc93dd5 verify: use set instead of dict 2009-05-17 04:14:15 +02:00
Peter Arrenbrecht
35e8011b63 verify: detect manifest revs not in any changeset 2009-05-14 16:22:49 +02:00
Benoit Boissinot
fdd0aa0449 verify: reference the correct linkrev when a filelog is missing
when a filelog is missing, the first bad revision is the first revision
where the filelog is referenced, not 0.
2009-05-04 19:51:08 +02:00
Henrik Stuart
fbd8e53ee1 verify: avoid exception on missing file revlog
Previously, accessing the filelinkrevs of a specific file that happens to
have already been unlinked from the filesystem, e.g. due to a partial rollback
having occurred, will trigger a KeyError being raised.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-04-24 10:44:39 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Martin Geisler
56c8ce33ee verify: combine sets instead of concatenating lists 2009-04-25 22:26:39 +02:00
Martin Geisler
44aa7e92d1 util: use built-in set instead of util.unique 2009-04-22 00:56:06 +02:00
Ronny Pfannschmidt
5356baa346 switch lock releasing in the core from gc to explicit 2009-04-22 02:01:22 +02:00
Wagner Bruna
b2fafee0f4 verify, i18n: fix unmarked strings 2009-03-29 19:56:53 -03:00
Peter Arrenbrecht
a2d3e23eef cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:

  _junk = foo()
  _junk = None

to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00
Benoit Boissinot
c34938cba1 verify: find correct first corrupted cset for missing/corrupted revlogs 2009-03-07 20:16:03 +01:00
Benoit Boissinot
5ed5555a2d verify: do not abort on fully corrupted revlog 2009-03-07 20:04:56 +01:00
Matt Mackall
193584d590 Merge with stable 2009-01-21 14:14:56 -06:00
Matt Mackall
3ff835714e verify: don't trip over binary files starting with 01 0a 2009-01-21 11:15:47 -06:00
Dirkjan Ochtman
574603a8c0 use dict.iteritems() rather than dict.items()
This should be faster and more future-proof. Calls where the result is to be
sorted using util.sort() have been left unchanged. Calls to .items() on
configparser objects have been left as-is, too.
2009-01-12 09:16:03 +01:00
Matt Mackall
b2807810c6 linkrev: take a revision number rather than a hash 2008-11-12 15:19:14 -06:00
John Mulligan
636223becf issue 1144: prevent traceback on verify of bundles 2008-10-18 14:43:14 -04:00
Benoit Boissinot
1343a1f47c d5e923544dd7 uses err() instead of warn() but prototype doesn't match
we might want to make warn() look more like err() in the future
to avoid this kind of problem.
2008-09-08 00:50:34 +02:00
Matt Mackall
2793481364 store: change handling of decoding errors 2008-08-13 20:18:43 -05:00
Adrian Buehlmann
a318975eaf verify: check repo.store 2008-08-13 20:18:41 -05:00
Matt Mackall
e3f5f88298 verify: only warn on copy nullid 2008-08-13 20:18:40 -05:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
26bd918734 verify: lots of refactoring
- simplify finding first bad rev
- no need to count changesets
- add exc function to simplify exception handling
- combine checksize and checkversion to checklog
- unify missing revlog detection in checklog
- add checkentry to consolidate
  - linkrev lookup
  - detailed check of linkrev
  - detailed check of parents
  - duplicate checking
- use checkentry for changelog, manifest, and files
- simplify havecl and havemf
- track all changesets refering to a manifest
- move unnamed file check somewhere more useful
- reorder crosschecks
- fix filenodes crosscheck and add exception handling
- check unpacked size field
2008-06-26 14:35:50 -05:00
Matt Mackall
07f882031a verify: add some local variables 2008-06-26 14:35:50 -05:00
Matt Mackall
bc715be859 add __len__ and __iter__ methods to repo and revlog 2008-06-26 14:35:50 -05:00
Patrick Mezard
e6b5e91a5d verify: check copy source revlog and nodeid 2008-04-14 22:31:33 +02:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Matt Mackall
a93c9d4d89 verify: improve handling of empty or missing files
- explicitly notice empty or missing changeset, manifest or file
  revlogs
- shortcircuit warnings relating to missing changeset or manifest
  revlogs
- fix changeset/manifest crosscheck swapped variables
- properly sort crosscheck messages
2007-11-20 15:46:20 -06:00
Matt Mackall
e38e06ffb3 verify: report first bad changeset
- add linkrev and file arguments to err
- track lowest reported linkrev in err
- find linkrev in a couple cases
- sort linkrevs when reporting a bunch of errors against a file
- tidy up lots of messages
- make more robust against damaged indexes
- report first bad changeset if an error is encountered
2007-09-21 17:18:06 -05:00
Matt Mackall
57b8fee517 verify: report expected linkrev 2007-08-15 16:55:15 -05:00
Matt Mackall
b4f06de2ba remove unneeded imports of mdiff 2007-08-15 16:09:50 -05:00
Matt Mackall
3e13c68628 Use try/finally pattern to cleanup locks and transactions 2007-07-21 16:02:10 -05:00
Thomas Arendsen Hein
4d29c6dc8e Updated copyright notices and add "and others" to "hg version" 2007-06-19 08:51:34 +02:00
Matt Mackall
cd2a1e0251 verify: hold write lock
Verify will report spurious errors if commits or pulls happen during verify.
2007-05-01 14:42:54 -05:00
Matt Mackall
04561e556e revlog: simplify revlog version handling
- pass the default version as an attribute on the opener
- eliminate config option mess
2007-03-22 19:52:38 -05:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
2ac5552785 verify: add rename link checking 2006-12-01 02:35:46 -06:00
Benoit Boissinot
3f09dfef56 use xrange instead of range 2006-10-19 14:16:51 +02:00
Brendan Cully
e54b369ac8 Abstract manifest block parsing. 2006-09-29 13:00:54 -07:00
Matt Mackall
d5009b5b05 Move repo.verify 2006-08-07 16:27:09 -05:00