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