Show More
@@ -157,6 +157,7 b' def _process_files(tr, ctx, error=False)' | |||
|
157 | 157 | m = mctx.read() |
|
158 | 158 | m1 = m1ctx.read() |
|
159 | 159 | m2 = m2ctx.read() |
|
160 | ms = mergestate.mergestate.read(repo) | |
|
160 | 161 | |
|
161 | 162 | files = metadata.ChangingFiles() |
|
162 | 163 | |
@@ -175,7 +176,7 b' def _process_files(tr, ctx, error=False)' | |||
|
175 | 176 | else: |
|
176 | 177 | added.append(f) |
|
177 | 178 | m[f], is_touched = _filecommit( |
|
178 | repo, fctx, m1, m2, linkrev, tr, writefilecopymeta, | |
|
179 | repo, fctx, m1, m2, linkrev, tr, writefilecopymeta, ms | |
|
179 | 180 | ) |
|
180 | 181 | if is_touched: |
|
181 | 182 | if is_touched == 'added': |
@@ -211,7 +212,7 b' def _process_files(tr, ctx, error=False)' | |||
|
211 | 212 | |
|
212 | 213 | |
|
213 | 214 | def _filecommit( |
|
214 | repo, fctx, manifest1, manifest2, linkrev, tr, includecopymeta, | |
|
215 | repo, fctx, manifest1, manifest2, linkrev, tr, includecopymeta, ms, | |
|
215 | 216 | ): |
|
216 | 217 | """ |
|
217 | 218 | commit an individual file as part of a larger transaction |
@@ -226,6 +227,7 b' def _filecommit(' | |||
|
226 | 227 | includecopymeta: boolean, set to False to skip storing the copy data |
|
227 | 228 | (only used by the Google specific feature of using |
|
228 | 229 | changeset extra as copy source of truth). |
|
230 | ms: mergestate object | |
|
229 | 231 | |
|
230 | 232 | output: (filenode, touched) |
|
231 | 233 | |
@@ -324,8 +326,10 b' def _filecommit(' | |||
|
324 | 326 | fparent2 = nullid |
|
325 | 327 | elif not fparentancestors: |
|
326 | 328 | # TODO: this whole if-else might be simplified much more |
|
327 | ms = mergestate.mergestate.read(repo) | |
|
328 | if ms.extras(fname).get(b'filenode-source') == b'other': | |
|
329 | if ( | |
|
330 | ms.active() | |
|
331 | and ms.extras(fname).get(b'filenode-source') == b'other' | |
|
332 | ): | |
|
329 | 333 | fparent1, fparent2 = fparent2, nullid |
|
330 | 334 | |
|
331 | 335 | # is the file changed? |
@@ -481,7 +481,7 b' and its ancestor by overriding "repo._fi' | |||
|
481 | 481 | > from __future__ import absolute_import |
|
482 | 482 | > from mercurial import commit, error, extensions, node |
|
483 | 483 | > def _filecommit(orig, repo, fctx, manifest1, manifest2, |
|
484 | > linkrev, tr, includecopymeta): | |
|
484 | > linkrev, tr, includecopymeta, ms): | |
|
485 | 485 | > fname = fctx.path() |
|
486 | 486 | > text = fctx.data() |
|
487 | 487 | > flog = repo.file(fname) |
@@ -484,7 +484,7 b' and its ancestor by overriding "repo._fi' | |||
|
484 | 484 | > from __future__ import absolute_import |
|
485 | 485 | > from mercurial import commit, error, extensions, node |
|
486 | 486 | > def _filecommit(orig, repo, fctx, manifest1, manifest2, |
|
487 | > linkrev, tr, includecopymeta): | |
|
487 | > linkrev, tr, includecopymeta, ms): | |
|
488 | 488 | > fname = fctx.path() |
|
489 | 489 | > text = fctx.data() |
|
490 | 490 | > flog = repo.file(fname) |
General Comments 0
You need to be logged in to leave comments.
Login now