Skip to content
Snippets Groups Projects
Commit a5dafefc authored by Sean Farley's avatar Sean Farley
Browse files

memctx: simplify _manifest with new revlog nodeids

This was originally written before we had modifiednodeid and
addednodeid, so we had to get the parents of the context, the data from
the function, and then hash that.

This is much more simple now and helps refactor more code later.
parent 15e86ecf
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,6 @@
phases,
pycompat,
repoview,
revlog,
scmutil,
sparse,
subrepo,
......@@ -2287,13 +2286,6 @@
man = pctx.manifest().copy()
for f in self._status.modified:
p1node = nullid
p2node = nullid
p = pctx[f].parents() # if file isn't in pctx, check p2?
if len(p) > 0:
p1node = p[0].filenode()
if len(p) > 1:
p2node = p[1].filenode()
man[f] = revlog.hash(self[f].data(), p1node, p2node)
man[f] = modifiednodeid
for f in self._status.added:
......@@ -2298,6 +2290,6 @@
for f in self._status.added:
man[f] = revlog.hash(self[f].data(), nullid, nullid)
man[f] = addednodeid
for f in self._status.removed:
if f in man:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment