equal
deleted
inserted
replaced
332 break |
332 break |
333 del lines[random.randrange(0, len(lines))] |
333 del lines[random.randrange(0, len(lines))] |
334 for __ in xrange(add): |
334 for __ in xrange(add): |
335 lines.insert(random.randint(0, len(lines)), makeline()) |
335 lines.insert(random.randint(0, len(lines)), makeline()) |
336 path = fctx.path() |
336 path = fctx.path() |
337 changes[path] = context.memfilectx(path, |
337 changes[path] = context.memfilectx(repo, path, |
338 '\n'.join(lines) + '\n') |
338 '\n'.join(lines) + '\n') |
339 for __ in xrange(pick(filesremoved)): |
339 for __ in xrange(pick(filesremoved)): |
340 path = random.choice(mfk) |
340 path = random.choice(mfk) |
341 for __ in xrange(10): |
341 for __ in xrange(10): |
342 path = random.choice(mfk) |
342 path = random.choice(mfk) |
352 path.append(random.choice(words)) |
352 path.append(random.choice(words)) |
353 path.append(random.choice(words)) |
353 path.append(random.choice(words)) |
354 path = '/'.join(filter(None, path)) |
354 path = '/'.join(filter(None, path)) |
355 data = '\n'.join(makeline() |
355 data = '\n'.join(makeline() |
356 for __ in xrange(pick(linesinfilesadded))) + '\n' |
356 for __ in xrange(pick(linesinfilesadded))) + '\n' |
357 changes[path] = context.memfilectx(path, data) |
357 changes[path] = context.memfilectx(repo, path, data) |
358 def filectxfn(repo, memctx, path): |
358 def filectxfn(repo, memctx, path): |
359 data = changes[path] |
359 data = changes[path] |
360 if data is None: |
360 if data is None: |
361 raise IOError |
361 raise IOError |
362 return data |
362 return data |