equal
deleted
inserted
replaced
1058 """apply removes to the working directory |
1058 """apply removes to the working directory |
1059 |
1059 |
1060 yields tuples for progress updates |
1060 yields tuples for progress updates |
1061 """ |
1061 """ |
1062 verbose = repo.ui.verbose |
1062 verbose = repo.ui.verbose |
1063 unlink = util.unlinkpath |
1063 unlinkpath = repo.wvfs.unlinkpath |
1064 wjoin = repo.wjoin |
|
1065 audit = repo.wvfs.audit |
1064 audit = repo.wvfs.audit |
1066 try: |
1065 try: |
1067 cwd = pycompat.getcwd() |
1066 cwd = pycompat.getcwd() |
1068 except OSError as err: |
1067 except OSError as err: |
1069 if err.errno != errno.ENOENT: |
1068 if err.errno != errno.ENOENT: |
1074 repo.ui.debug(" %s: %s -> r\n" % (f, msg)) |
1073 repo.ui.debug(" %s: %s -> r\n" % (f, msg)) |
1075 if verbose: |
1074 if verbose: |
1076 repo.ui.note(_("removing %s\n") % f) |
1075 repo.ui.note(_("removing %s\n") % f) |
1077 audit(f) |
1076 audit(f) |
1078 try: |
1077 try: |
1079 unlink(wjoin(f), ignoremissing=True) |
1078 unlinkpath(f, ignoremissing=True) |
1080 except OSError as inst: |
1079 except OSError as inst: |
1081 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
1080 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
1082 (f, inst.strerror)) |
1081 (f, inst.strerror)) |
1083 if i == 100: |
1082 if i == 100: |
1084 yield i, f |
1083 yield i, f |