Mercurial > hg
comparison mercurial/commit.py @ 45247:e15416c95b25
commitctx: explicitly pass `manifest` to _commit_manifest
As pointed out by Yuya Nishihara.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Jul 2020 15:40:13 +0200 |
parents | 13814622b3b1 |
children | 4cde23ba076e |
comparison
equal
deleted
inserted
replaced
45246:b1f2659c1c34 | 45247:e15416c95b25 |
---|---|
204 removed = [f for f in removed if not rf(f)] | 204 removed = [f for f in removed if not rf(f)] |
205 | 205 |
206 touched.extend(removed) | 206 touched.extend(removed) |
207 | 207 |
208 files = touched | 208 files = touched |
209 mn = _commit_manifest(tr, linkrev, ctx, mctx, files, added, drop) | 209 mn = _commit_manifest(tr, linkrev, ctx, mctx, m, files, added, drop) |
210 | 210 |
211 return mn, files, filesadded, removed | 211 return mn, files, filesadded, removed |
212 | 212 |
213 | 213 |
214 def _filecommit( | 214 def _filecommit( |
345 else: | 345 else: |
346 fnode = fparent1 | 346 fnode = fparent1 |
347 return fnode, touched | 347 return fnode, touched |
348 | 348 |
349 | 349 |
350 def _commit_manifest(tr, linkrev, ctx, mctx, files, added, drop): | 350 def _commit_manifest(tr, linkrev, ctx, mctx, manifest, files, added, drop): |
351 """make a new manifest entry (or reuse a new one) | 351 """make a new manifest entry (or reuse a new one) |
352 | 352 |
353 given an initialised manifest context and precomputed list of | 353 given an initialised manifest context and precomputed list of |
354 - files: files affected by the commit | 354 - files: files affected by the commit |
355 - added: new entries in the manifest | 355 - added: new entries in the manifest |
367 p1 = ctx.p1() | 367 p1 = ctx.p1() |
368 p2 = ctx.p2() | 368 p2 = ctx.p2() |
369 m1ctx = p1.manifestctx() | 369 m1ctx = p1.manifestctx() |
370 | 370 |
371 m1 = m1ctx.read() | 371 m1 = m1ctx.read() |
372 | |
373 manifest = mctx.read() | |
374 | 372 |
375 if not files: | 373 if not files: |
376 # if no "files" actually changed in terms of the changelog, | 374 # if no "files" actually changed in terms of the changelog, |
377 # try hard to detect unmodified manifest entry so that the | 375 # try hard to detect unmodified manifest entry so that the |
378 # exact same commit can be reproduced later on convert. | 376 # exact same commit can be reproduced later on convert. |