Mercurial > hg
comparison mercurial/merge.py @ 33085:1e79c66d6b07
workingfilectx: add backgroundclose as a kwarg to write()
This is necessary because some callers in merge.py pass backgroundclose=True
when writing.
As with previous changes in this series, this should be a no-op.
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Sun, 25 Jun 2017 22:30:14 -0700 |
parents | 873f638fd7db |
children | eb4c49f55f1f |
comparison
equal
deleted
inserted
replaced
33084:873f638fd7db | 33085:1e79c66d6b07 |
---|---|
1128 | 1128 |
1129 yields tuples for progress updates | 1129 yields tuples for progress updates |
1130 """ | 1130 """ |
1131 verbose = repo.ui.verbose | 1131 verbose = repo.ui.verbose |
1132 fctx = mctx.filectx | 1132 fctx = mctx.filectx |
1133 wwrite = repo.wwrite | |
1134 ui = repo.ui | 1133 ui = repo.ui |
1135 i = 0 | 1134 i = 0 |
1136 with repo.wvfs.backgroundclosing(ui, expectedcount=len(actions)): | 1135 with repo.wvfs.backgroundclosing(ui, expectedcount=len(actions)): |
1137 for f, (flags, backup), msg in actions: | 1136 for f, (flags, backup), msg in actions: |
1138 repo.ui.debug(" %s: %s -> g\n" % (f, msg)) | 1137 repo.ui.debug(" %s: %s -> g\n" % (f, msg)) |
1149 if e.errno != errno.ENOENT: | 1148 if e.errno != errno.ENOENT: |
1150 raise | 1149 raise |
1151 | 1150 |
1152 if repo.wvfs.isdir(f) and not repo.wvfs.islink(f): | 1151 if repo.wvfs.isdir(f) and not repo.wvfs.islink(f): |
1153 repo.wvfs.removedirs(f) | 1152 repo.wvfs.removedirs(f) |
1154 wwrite(f, fctx(f).data(), flags, backgroundclose=True) | 1153 wctx[f].write(fctx(f).data(), flags, backgroundclose=True) |
1155 if i == 100: | 1154 if i == 100: |
1156 yield i, f | 1155 yield i, f |
1157 i = 0 | 1156 i = 0 |
1158 i += 1 | 1157 i += 1 |
1159 if i > 0: | 1158 if i > 0: |