Show More
@@ -601,7 +601,7 b' def replacerev(ui, repo, ctx, filedata, ' | |||||
601 | if path not in ctx: |
|
601 | if path not in ctx: | |
602 | return None |
|
602 | return None | |
603 | fctx = ctx[path] |
|
603 | fctx = ctx[path] | |
604 |
cop |
|
604 | copysource = fctx.copysource() | |
605 | return context.memfilectx( |
|
605 | return context.memfilectx( | |
606 | repo, |
|
606 | repo, | |
607 | memctx, |
|
607 | memctx, | |
@@ -609,7 +609,7 b' def replacerev(ui, repo, ctx, filedata, ' | |||||
609 | data=filedata.get(path, fctx.data()), |
|
609 | data=filedata.get(path, fctx.data()), | |
610 | islink=fctx.islink(), |
|
610 | islink=fctx.islink(), | |
611 | isexec=fctx.isexec(), |
|
611 | isexec=fctx.isexec(), | |
612 |
cop |
|
612 | copysource=copysource) | |
613 |
|
613 | |||
614 | extra = ctx.extra().copy() |
|
614 | extra = ctx.extra().copy() | |
615 | extra['fix_source'] = ctx.hex() |
|
615 | extra['fix_source'] = ctx.hex() |
@@ -645,7 +645,7 b' def collapse(repo, firstctx, lastctx, co' | |||||
645 | fctx.path(), fctx.data(), |
|
645 | fctx.path(), fctx.data(), | |
646 | islink='l' in flags, |
|
646 | islink='l' in flags, | |
647 | isexec='x' in flags, |
|
647 | isexec='x' in flags, | |
648 |
cop |
|
648 | copysource=copied.get(path)) | |
649 | return mctx |
|
649 | return mctx | |
650 | return None |
|
650 | return None | |
651 |
|
651 |
@@ -83,7 +83,7 b' def _commitfiltered(repo, ctx, match, ke' | |||||
83 | mctx = context.memfilectx(repo, memctx, fctx.path(), fctx.data(), |
|
83 | mctx = context.memfilectx(repo, memctx, fctx.path(), fctx.data(), | |
84 | fctx.islink(), |
|
84 | fctx.islink(), | |
85 | fctx.isexec(), |
|
85 | fctx.isexec(), | |
86 |
cop |
|
86 | copysource=copied.get(path)) | |
87 | return mctx |
|
87 | return mctx | |
88 |
|
88 | |||
89 | if not files: |
|
89 | if not files: |
@@ -2563,7 +2563,7 b' def amend(ui, repo, old, extra, pats, op' | |||||
2563 | fctx.path(), fctx.data(), |
|
2563 | fctx.path(), fctx.data(), | |
2564 | islink='l' in flags, |
|
2564 | islink='l' in flags, | |
2565 | isexec='x' in flags, |
|
2565 | isexec='x' in flags, | |
2566 |
cop |
|
2566 | copysource=copied.get(path)) | |
2567 | return mctx |
|
2567 | return mctx | |
2568 | except KeyError: |
|
2568 | except KeyError: | |
2569 | return None |
|
2569 | return None |
@@ -2233,10 +2233,10 b' def memfilefromctx(ctx):' | |||||
2233 | """ |
|
2233 | """ | |
2234 | def getfilectx(repo, memctx, path): |
|
2234 | def getfilectx(repo, memctx, path): | |
2235 | fctx = ctx[path] |
|
2235 | fctx = ctx[path] | |
2236 |
cop |
|
2236 | copysource = fctx.copysource() | |
2237 | return memfilectx(repo, memctx, path, fctx.data(), |
|
2237 | return memfilectx(repo, memctx, path, fctx.data(), | |
2238 | islink=fctx.islink(), isexec=fctx.isexec(), |
|
2238 | islink=fctx.islink(), isexec=fctx.isexec(), | |
2239 |
cop |
|
2239 | copysource=copysource) | |
2240 |
|
2240 | |||
2241 | return getfilectx |
|
2241 | return getfilectx | |
2242 |
|
2242 | |||
@@ -2246,12 +2246,12 b' def memfilefrompatch(patchstore):' | |||||
2246 | This is a convenience method for building a memctx based on a patchstore. |
|
2246 | This is a convenience method for building a memctx based on a patchstore. | |
2247 | """ |
|
2247 | """ | |
2248 | def getfilectx(repo, memctx, path): |
|
2248 | def getfilectx(repo, memctx, path): | |
2249 |
data, mode, cop |
|
2249 | data, mode, copysource = patchstore.getfile(path) | |
2250 | if data is None: |
|
2250 | if data is None: | |
2251 | return None |
|
2251 | return None | |
2252 | islink, isexec = mode |
|
2252 | islink, isexec = mode | |
2253 | return memfilectx(repo, memctx, path, data, islink=islink, |
|
2253 | return memfilectx(repo, memctx, path, data, islink=islink, | |
2254 |
isexec=isexec, cop |
|
2254 | isexec=isexec, copysource=copysource) | |
2255 |
|
2255 | |||
2256 | return getfilectx |
|
2256 | return getfilectx | |
2257 |
|
2257 | |||
@@ -2377,7 +2377,7 b' class memfilectx(committablefilectx):' | |||||
2377 | See memctx and committablefilectx for more details. |
|
2377 | See memctx and committablefilectx for more details. | |
2378 | """ |
|
2378 | """ | |
2379 | def __init__(self, repo, changectx, path, data, islink=False, |
|
2379 | def __init__(self, repo, changectx, path, data, islink=False, | |
2380 |
isexec=False, cop |
|
2380 | isexec=False, copysource=None): | |
2381 | """ |
|
2381 | """ | |
2382 | path is the normalized file path relative to repository root. |
|
2382 | path is the normalized file path relative to repository root. | |
2383 | data is the file content as a string. |
|
2383 | data is the file content as a string. | |
@@ -2394,8 +2394,8 b' class memfilectx(committablefilectx):' | |||||
2394 | else: |
|
2394 | else: | |
2395 | self._flags = '' |
|
2395 | self._flags = '' | |
2396 | self._copied = None |
|
2396 | self._copied = None | |
2397 |
if cop |
|
2397 | if copysource: | |
2398 |
self._copied = (cop |
|
2398 | self._copied = (copysource, nullid) | |
2399 |
|
2399 | |||
2400 | def cmp(self, fctx): |
|
2400 | def cmp(self, fctx): | |
2401 | return self.data() != fctx.data() |
|
2401 | return self.data() != fctx.data() |
General Comments 0
You need to be logged in to leave comments.
Login now