Show More
@@ -491,7 +491,7 b' class filestore(object):' | |||
|
491 | 491 | self.files = {} |
|
492 | 492 | self.created = 0 |
|
493 | 493 | |
|
494 | def setfile(self, fname, data, mode): | |
|
494 | def setfile(self, fname, data, mode, copied=None): | |
|
495 | 495 | if self.opener is None: |
|
496 | 496 | root = tempfile.mkdtemp(prefix='hg-patch-') |
|
497 | 497 | self.opener = scmutil.opener(root) |
@@ -499,13 +499,13 b' class filestore(object):' | |||
|
499 | 499 | fn = str(self.created) |
|
500 | 500 | self.opener.write(fn, data) |
|
501 | 501 | self.created += 1 |
|
502 | self.files[fname] = (fn, mode) | |
|
502 | self.files[fname] = (fn, mode, copied) | |
|
503 | 503 | |
|
504 | 504 | def getfile(self, fname): |
|
505 | 505 | if fname not in self.files: |
|
506 | 506 | raise IOError() |
|
507 | fn, mode = self.files[fname] | |
|
508 | return self.opener.read(fn), mode | |
|
507 | fn, mode, copied = self.files[fname] | |
|
508 | return self.opener.read(fn), mode, copied | |
|
509 | 509 | |
|
510 | 510 | def close(self): |
|
511 | 511 | if self.opener: |
@@ -535,7 +535,7 b' class patchfile(object):' | |||
|
535 | 535 | data, mode = backend.getfile(self.fname) |
|
536 | 536 | self.exists = True |
|
537 | 537 | else: |
|
538 | data, mode = store.getfile(self.copysource) | |
|
538 | data, mode = store.getfile(self.copysource)[:2] | |
|
539 | 539 | self.exists = backend.exists(self.fname) |
|
540 | 540 | self.missing = False |
|
541 | 541 | if data: |
@@ -1248,7 +1248,7 b' def _applydiff(ui, fp, patcher, backend,' | |||
|
1248 | 1248 | continue |
|
1249 | 1249 | data, mode = None, None |
|
1250 | 1250 | if gp.op in ('RENAME', 'COPY'): |
|
1251 | data, mode = store.getfile(gp.oldpath) | |
|
1251 | data, mode = store.getfile(gp.oldpath)[:2] | |
|
1252 | 1252 | if gp.mode: |
|
1253 | 1253 | mode = gp.mode |
|
1254 | 1254 | if gp.op == 'ADD': |
General Comments 0
You need to be logged in to leave comments.
Login now