Show More
@@ -1058,29 +1058,30 b' def batchget(repo, mctx, actions):' | |||||
1058 | wwrite = repo.wwrite |
|
1058 | wwrite = repo.wwrite | |
1059 | ui = repo.ui |
|
1059 | ui = repo.ui | |
1060 | i = 0 |
|
1060 | i = 0 | |
1061 | for f, (flags, backup), msg in actions: |
|
1061 | if True: | |
1062 | repo.ui.debug(" %s: %s -> g\n" % (f, msg)) |
|
1062 | for f, (flags, backup), msg in actions: | |
1063 | if verbose: |
|
1063 | repo.ui.debug(" %s: %s -> g\n" % (f, msg)) | |
1064 | repo.ui.note(_("getting %s\n") % f) |
|
1064 | if verbose: | |
|
1065 | repo.ui.note(_("getting %s\n") % f) | |||
1065 |
|
1066 | |||
1066 | if backup: |
|
1067 | if backup: | |
1067 | absf = repo.wjoin(f) |
|
1068 | absf = repo.wjoin(f) | |
1068 | orig = scmutil.origpath(ui, repo, absf) |
|
1069 | orig = scmutil.origpath(ui, repo, absf) | |
1069 | try: |
|
1070 | try: | |
1070 |
# TODO Mercurial has always aborted if an untracked |
|
1071 | # TODO Mercurial has always aborted if an untracked | |
1071 |
# is replaced by a tracked file, or generally |
|
1072 | # directory is replaced by a tracked file, or generally | |
1072 | # file/directory merges. This needs to be sorted out. |
|
1073 | # with file/directory merges. This needs to be sorted out. | |
1073 | if repo.wvfs.isfileorlink(f): |
|
1074 | if repo.wvfs.isfileorlink(f): | |
1074 | util.rename(absf, orig) |
|
1075 | util.rename(absf, orig) | |
1075 | except OSError as e: |
|
1076 | except OSError as e: | |
1076 | if e.errno != errno.ENOENT: |
|
1077 | if e.errno != errno.ENOENT: | |
1077 | raise |
|
1078 | raise | |
1078 |
|
1079 | |||
1079 | wwrite(f, fctx(f).data(), flags) |
|
1080 | wwrite(f, fctx(f).data(), flags) | |
1080 | if i == 100: |
|
1081 | if i == 100: | |
1081 | yield i, f |
|
1082 | yield i, f | |
1082 | i = 0 |
|
1083 | i = 0 | |
1083 | i += 1 |
|
1084 | i += 1 | |
1084 | if i > 0: |
|
1085 | if i > 0: | |
1085 | yield i, f |
|
1086 | yield i, f | |
1086 |
|
1087 |
General Comments 0
You need to be logged in to leave comments.
Login now