comparison mercurial/verify.py @ 9602:fc493cb90bb1

Merge with redone c655432c2c24 (issue1860)
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 16 Oct 2009 11:19:39 +0200
parents 98feea5659d9
children 96c803e9018f
comparison
equal deleted inserted replaced
9601:11ace5726d02 9602:fc493cb90bb1
171 if not f: 171 if not f:
172 err(None, _("cannot decode filename '%s'") % f2) 172 err(None, _("cannot decode filename '%s'") % f2)
173 elif size > 0: 173 elif size > 0:
174 storefiles.add(f) 174 storefiles.add(f)
175 175
176 lrugetctx = util.lrucachefunc(repo.changectx)
176 files = sorted(set(filenodes) | set(filelinkrevs)) 177 files = sorted(set(filenodes) | set(filelinkrevs))
177 for f in files: 178 for f in files:
178 try: 179 try:
179 linkrevs = filelinkrevs[f] 180 linkrevs = filelinkrevs[f]
180 except KeyError: 181 except KeyError:
222 exc(lr, _("unpacking %s") % short(n), inst, f) 223 exc(lr, _("unpacking %s") % short(n), inst, f)
223 224
224 # check renames 225 # check renames
225 try: 226 try:
226 if rp: 227 if rp:
228 if lr is not None and ui.verbose:
229 ctx = lrugetctx(lr)
230 found = False
231 for pctx in ctx.parents():
232 if rp[0] in pctx:
233 found = True
234 break
235 if not found:
236 warn(_("warning: copy source of '%s' not"
237 " in parents of %s") % (f, ctx))
227 fl2 = repo.file(rp[0]) 238 fl2 = repo.file(rp[0])
228 if not len(fl2): 239 if not len(fl2):
229 err(lr, _("empty or missing copy source revlog %s:%s") 240 err(lr, _("empty or missing copy source revlog %s:%s")
230 % (rp[0], short(rp[1])), f) 241 % (rp[0], short(rp[1])), f)
231 elif rp[1] == nullid: 242 elif rp[1] == nullid: