Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 41395:9087513df412
context: delete mistaken comment about return value of renamed()
The comment seems to think that the return value of renamed() is a
tuple of source pathsx in the parents, but it's actually a pair of
(rename source path, file nodeid).
Differential Revision: https://phab.mercurial-scm.org/D5639
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 21 Jan 2019 13:45:12 -0800 |
parents | b129837190f7 |
children | 4bf166a020a7 |
comparison
equal
deleted
inserted
replaced
41394:75e753a26806 | 41395:9087513df412 |
---|---|
2176 This is a convenience method for building a memctx based on another | 2176 This is a convenience method for building a memctx based on another |
2177 context. | 2177 context. |
2178 """ | 2178 """ |
2179 def getfilectx(repo, memctx, path): | 2179 def getfilectx(repo, memctx, path): |
2180 fctx = ctx[path] | 2180 fctx = ctx[path] |
2181 # this is weird but apparently we only keep track of one parent | |
2182 # (why not only store that instead of a tuple?) | |
2183 copied = fctx.renamed() | 2181 copied = fctx.renamed() |
2184 if copied: | 2182 if copied: |
2185 copied = copied[0] | 2183 copied = copied[0] |
2186 return memfilectx(repo, memctx, path, fctx.data(), | 2184 return memfilectx(repo, memctx, path, fctx.data(), |
2187 islink=fctx.islink(), isexec=fctx.isexec(), | 2185 islink=fctx.islink(), isexec=fctx.isexec(), |