##// END OF EJS Templates
largefiles: verify status should be written as status, not as write...
Mads Kiilerich -
r18546:fb0e8966 default
parent child Browse files
Show More
@@ -96,10 +96,10 b' class basestore(object):'
96 96 '''Verify the existence (and, optionally, contents) of every big
97 97 file revision referenced by every changeset in revs.
98 98 Return 0 if all is well, non-zero on any errors.'''
99 write = self.ui.write
100 99 failed = False
101 100
102 write(_('searching %d changesets for largefiles\n') % len(revs))
101 self.ui.status(_('searching %d changesets for largefiles\n') %
102 len(revs))
103 103 verified = set() # set of (filename, filenode) tuples
104 104
105 105 for rev in revs:
@@ -113,12 +113,13 b' class basestore(object):'
113 113 numrevs = len(verified)
114 114 numlfiles = len(set([fname for (fname, fnode) in verified]))
115 115 if contents:
116 write(_('verified contents of %d revisions of %d largefiles\n')
117 % (numrevs, numlfiles))
116 self.ui.status(
117 _('verified contents of %d revisions of %d largefiles\n')
118 % (numrevs, numlfiles))
118 119 else:
119 write(_('verified existence of %d revisions of %d largefiles\n')
120 % (numrevs, numlfiles))
121
120 self.ui.status(
121 _('verified existence of %d revisions of %d largefiles\n')
122 % (numrevs, numlfiles))
122 123 return int(failed)
123 124
124 125 def _getfile(self, tmpfile, filename, hash):
@@ -1209,9 +1209,7 b' revert some files to an older revision'
1209 1209 - introduce corruption and make sure that it is caught when checking content:
1210 1210 $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928
1211 1211 $ hg verify -q --large --lfc
1212 searching 1 changesets for largefiles
1213 1212 changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928
1214 verified contents of 3 revisions of 3 largefiles
1215 1213 [1]
1216 1214
1217 1215 - cleanup
@@ -1220,7 +1218,6 b' revert some files to an older revision'
1220 1218 - verifying all revisions will fail because we didn't clone all largefiles to d:
1221 1219 $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1222 1220 $ hg verify -q --large --lfa --lfc
1223 searching 10 changesets for largefiles
1224 1221 changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64
1225 1222 changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d
1226 1223 changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f
@@ -1228,7 +1225,6 b' revert some files to an older revision'
1228 1225 changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1229 1226 changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1230 1227 changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1231 verified contents of 15 revisions of 6 largefiles
1232 1228 [1]
1233 1229
1234 1230 - cleanup
@@ -1637,8 +1633,6 b" test 'verify' with remotestore:"
1637 1633 [1]
1638 1634 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
1639 1635 $ hg -R http-clone -q verify --large --lfa
1640 searching 1 changesets for largefiles
1641 verified existence of 1 revisions of 1 largefiles
1642 1636
1643 1637 largefiles pulled on update - a largefile missing on the server:
1644 1638 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
General Comments 0
You need to be logged in to leave comments. Login now