Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commit.py @ 45261:595307e14140
commitctx: move `writechangesetcopy` business at the end a code section
This code is to handle a specific subcase so we move it a the end. This allow
to gather the rest of the "core" code closer to the related logic.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 23 Jul 2020 22:58:29 +0200 |
parents | ada51c1b6916 |
children | b65b4b09859c |
comparison
equal
deleted
inserted
replaced
45260:ada51c1b6916 | 45261:595307e14140 |
---|---|
136 rf = metadata.get_removal_filter(ctx, (p1, p2, m1, m2)) | 136 rf = metadata.get_removal_filter(ctx, (p1, p2, m1, m2)) |
137 removed = [f for f in removed if not rf(f)] | 137 removed = [f for f in removed if not rf(f)] |
138 | 138 |
139 touched.extend(removed) | 139 touched.extend(removed) |
140 | 140 |
141 files = touched | |
142 mn = _commit_manifest(tr, linkrev, ctx, mctx, files, added, drop) | |
143 | |
141 if writechangesetcopy: | 144 if writechangesetcopy: |
142 filesremoved = removed | 145 filesremoved = removed |
143 | |
144 files = touched | |
145 mn = _commit_manifest(tr, linkrev, ctx, mctx, files, added, drop) | |
146 | 146 |
147 if not writefilecopymeta: | 147 if not writefilecopymeta: |
148 # If writing only to changeset extras, use None to indicate that | 148 # If writing only to changeset extras, use None to indicate that |
149 # no entry should be written. If writing to both, write an empty | 149 # no entry should be written. If writing to both, write an empty |
150 # entry to prevent the reader from falling back to reading | 150 # entry to prevent the reader from falling back to reading |