equal
deleted
inserted
replaced
3066 """ |
3066 """ |
3067 parent, p2 = parents |
3067 parent, p2 = parents |
3068 node = ctx.node() |
3068 node = ctx.node() |
3069 def checkout(f): |
3069 def checkout(f): |
3070 fc = ctx[f] |
3070 fc = ctx[f] |
3071 return repo.wwrite(f, fc.data(), fc.flags()) |
3071 repo.wwrite(f, fc.data(), fc.flags()) |
3072 |
3072 |
3073 audit_path = pathutil.pathauditor(repo.root) |
3073 audit_path = pathutil.pathauditor(repo.root) |
3074 for f in actions['forget'][0]: |
3074 for f in actions['forget'][0]: |
3075 repo.dirstate.drop(f) |
3075 repo.dirstate.drop(f) |
3076 for f in actions['remove'][0]: |
3076 for f in actions['remove'][0]: |
3133 except patch.PatchError as err: |
3133 except patch.PatchError as err: |
3134 raise util.Abort(str(err)) |
3134 raise util.Abort(str(err)) |
3135 del fp |
3135 del fp |
3136 else: |
3136 else: |
3137 for f in actions['revert'][0]: |
3137 for f in actions['revert'][0]: |
3138 wsize = checkout(f) |
3138 checkout(f) |
3139 if normal: |
3139 if normal: |
3140 normal(f) |
3140 normal(f) |
3141 elif wsize == repo.dirstate._map[f][2]: |
|
3142 # changes may be overlooked without normallookup, |
|
3143 # if size isn't changed at reverting |
|
3144 repo.dirstate.normallookup(f) |
|
3145 |
3141 |
3146 for f in actions['add'][0]: |
3142 for f in actions['add'][0]: |
3147 # Don't checkout modified files, they are already created by the diff |
3143 # Don't checkout modified files, they are already created by the diff |
3148 if f not in newlyaddedandmodifiedfiles: |
3144 if f not in newlyaddedandmodifiedfiles: |
3149 checkout(f) |
3145 checkout(f) |