1051 removes[gp.path] = 1 |
1051 removes[gp.path] = 1 |
1052 for src, dst in copies: |
1052 for src, dst in copies: |
1053 repo.copy(src, dst) |
1053 repo.copy(src, dst) |
1054 removes = removes.keys() |
1054 removes = removes.keys() |
1055 if (not similarity) and removes: |
1055 if (not similarity) and removes: |
1056 repo.remove(util.sort(removes), True) |
1056 repo.remove(sorted(removes), True) |
1057 for f in patches: |
1057 for f in patches: |
1058 gp = patches[f] |
1058 gp = patches[f] |
1059 if gp and gp.mode: |
1059 if gp and gp.mode: |
1060 islink, isexec = gp.mode |
1060 islink, isexec = gp.mode |
1061 dst = repo.wjoin(gp.path) |
1061 dst = repo.wjoin(gp.path) |
1066 elif gp.op != 'DELETE': |
1066 elif gp.op != 'DELETE': |
1067 util.set_flags(dst, islink, isexec) |
1067 util.set_flags(dst, islink, isexec) |
1068 cmdutil.addremove(repo, cfiles, similarity=similarity) |
1068 cmdutil.addremove(repo, cfiles, similarity=similarity) |
1069 files = patches.keys() |
1069 files = patches.keys() |
1070 files.extend([r for r in removes if r not in files]) |
1070 files.extend([r for r in removes if r not in files]) |
1071 return util.sort(files) |
1071 return sorted(files) |
1072 |
1072 |
1073 def externalpatch(patcher, args, patchname, ui, strip, cwd, files): |
1073 def externalpatch(patcher, args, patchname, ui, strip, cwd, files): |
1074 """use <patcher> to apply <patchname> to the working directory. |
1074 """use <patcher> to apply <patchname> to the working directory. |
1075 returns whether patch was applied with fuzz factor.""" |
1075 returns whether patch was applied with fuzz factor.""" |
1076 |
1076 |