Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 45065:41b32cbc53f8
commitctx: document _filecommit input and output
This is the beginning of a larger refactoring/cleanup of the commitctx code to
clarify and augment the logic gathering metadata useful for copy tracing. The
current code is a tad too long and entangled to make such update easy. We start
with easy and small cleanup.
Differential Revision: https://phab.mercurial-scm.org/D8699
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 06 Jul 2020 18:52:19 +0200 |
parents | 5797dbb630df |
children | b8f4ead9fa49 |
comparison
equal
deleted
inserted
replaced
45064:6232d732658c | 45065:41b32cbc53f8 |
---|---|
2784 changelist, | 2784 changelist, |
2785 includecopymeta, | 2785 includecopymeta, |
2786 ): | 2786 ): |
2787 """ | 2787 """ |
2788 commit an individual file as part of a larger transaction | 2788 commit an individual file as part of a larger transaction |
2789 | |
2790 input: | |
2791 | |
2792 fctx: a file context with the content we are trying to commit | |
2793 manifest1: manifest of changeset first parent | |
2794 manifest2: manifest of changeset second parent | |
2795 linkrev: revision number of the changeset being created | |
2796 tr: current transation | |
2797 changelist: list of file being changed (modified inplace) | |
2798 individual: boolean, set to False to skip storing the copy data | |
2799 (only used by the Google specific feature of using | |
2800 changeset extra as copy source of truth). | |
2801 | |
2802 output: | |
2803 | |
2804 The resulting filenode | |
2789 """ | 2805 """ |
2790 | 2806 |
2791 fname = fctx.path() | 2807 fname = fctx.path() |
2792 fparent1 = manifest1.get(fname, nullid) | 2808 fparent1 = manifest1.get(fname, nullid) |
2793 fparent2 = manifest2.get(fname, nullid) | 2809 fparent2 = manifest2.get(fname, nullid) |