Commit Graph

70 Commits

Author SHA1 Message Date
Pierre-Yves David
a39281497e clfilter: verify logic should be unfiltered
To verify a changelog obviously needs all of it. The verify logic now
ensures it works on an unfiltered repository.
2012-10-08 17:08:52 +02:00
Bryan O'Sullivan
61197562ff verify: fix all doubled-slash sites (issue3665) 2012-10-24 09:27:47 -07:00
Bryan O'Sullivan
dde0f8331e verify: tolerate repeated slashes in a converted repo (issue3665)
These slashes are a hangover from issue3612, fixed in d5787cfaa7cf.

Although the bugfix in that commit is correct, the test it adds
does not replicate the conditions for the bug correctly.
2012-10-22 18:05:40 -07:00
FUJIWARA Katsunori
ec48173940 verify: rename "hasmanifest" variable for source code readability
Before this patch, there are two ambiguous variables: "havemf" and
"hasmanifest".

"havemf" means whether there are any "manifest" entries.

"hasmanifest" means whether there are any "changelog" entries
referring to "manifest" entry.

This patch renames from "hasmanifest" to "refersmf" to clear
difference from "havemf".
2012-10-04 01:24:05 +09:00
FUJIWARA Katsunori
beefacf118 verify: use appropriate local variable in "checkentry()"
Before this patch, "checkentry()" internal function uses both
"node"(argument of itself) and "n"(defined in outer of it) variables.

Because all callers of "checkentry()" use "n" to refer the object
which is passed to "checkentry()" as "node", both can refer same
object in "checkentry()". So, "checkentry()" works correctly.

But such usage is not good for independence of "checkentry()".

This patch replaces "n" in "checkentry()" with "node".
2012-10-04 01:24:05 +09:00
FUJIWARA Katsunori
07219f1b5d verify: use appropriate node information to show verification error
Before this patch, verify module shows verification error message
below:

    unknown parent 2 <HASH_OF_P2> of <HASH_OF_P1>

even though it should show:

    unknown parent 2 <HASH_OF_P2> of <HASH_OF_TARGET>

This patch uses appropriate node information.
2012-10-04 01:24:05 +09:00
Patrick Mezard
1e03a5cb1d verify: do not choke on valid changelog without manifest
Before this change:

  $ hg init
  $ hg branch foo
  $ hg ci -m branchfoo
  $ hg verify
  checking changesets
  checking manifests
   0: empty or missing manifest
  crosschecking files in changesets and manifests
  checking files
  0 files, 1 changesets, 0 total revisions
  1 integrity errors encountered!
  (first damaged changeset appears to be 0)
  [1]
2012-08-21 20:51:16 +02:00
Brodie Rao
a706d64a2c cleanup: replace naked excepts with except Exception: ... 2012-05-12 16:02:46 +02:00
Matt Mackall
80bded910a verify: fix mq misfire 2011-07-14 12:39:39 -05:00
Matt Mackall
d310d155f9 verify: filter messages about missing null manifests (issue2900) 2011-07-13 16:28:46 -05:00
Matt Mackall
1f03009146 verify: filter messages about missing null manifests (issue2900) 2011-07-13 16:28:46 -05:00
Martin Geisler
6a3d9310ab code style: prefer 'is' and 'is not' tests with singletons 2010-11-22 18:15:58 +01:00
timeless
d78a15767f verify/progress: using gerund to indicate action and adding units 2010-08-02 07:15:47 +03:00
Thomas Arendsen Hein
48cd219ead verify: fix "missing revlog!" errors for revlog format v0 and add test
With revlog format v0 the .d files are empty if the only revision stored is an
empty file. Since Mercurial can no longer create format v0 repositories, but
still use it, add a script which creates a repository with a single empty file.
This can be used in other tests if wanted.
2010-09-05 22:32:11 +02:00
Matt Mackall
7ed158a8ab verify: initialize rp variable in case we hit out of memory 2010-08-05 16:17:33 -05:00
Matt Mackall
aa7e2a7659 verify: reduce memory footprint when unpacking files
By never holding a reference to the unpacked string, we avoid holding two
consecutive large files in memory.
2010-08-05 16:17:17 -05:00
Matt Mackall
6b7d6bea8c verify: report exceptions that don't have a str() method 2010-08-05 16:17:17 -05:00
Steve Borho
b31717c291 verify: improve progress descriptions
For GUIs, the progress bar is disconnected visually from the text that
is output by ui.write(), so it's better to be a little bit redundant in
naming the status.  "checking" is redundant, since the user is running
the verify command.  'changesets', 'manifests', etc, tell the user what
is being checked (the entity being counted in the progress bar.
2010-04-13 23:12:23 -05:00
Martin Geisler
f3b2ed5d56 progress: use a verb (+noun) in present participle 2010-03-15 18:33:39 +01:00
Martin Geisler
e2e1279b27 progress: mark strings for translation 2010-02-17 23:07:50 +01:00
Augie Fackler
458129e75a verify: call ui.progress() 2010-02-10 18:46:19 -06:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Sune Foldager
36a958fe4d verify: report existence of journal 2009-11-02 10:15:04 +01:00
Matt Mackall
a777761788 verify: filter the candidate list for broken linkrevs 2009-10-28 13:17:03 -05:00
Patrick Mezard
c463f2299e verify: detect file copy sources not in parents with --verbose 2009-10-06 22:46:31 +02:00
Martin Geisler
ae0794fd45 coding style: use a space after comma
I left a cases like 'lambda x,y:' alone -- the lack of a space does
not bother me as much when the variables are single letters.
2009-07-22 23:12:54 +02:00
Alejandro Santos
bc1b8b3654 verify: fix scope issues with del statement 2009-07-05 11:04:31 +02:00
Matt Mackall
3f99330a0a verify: demote warning about nullid in copy to note 2009-07-01 00:41:14 -05:00
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