3052 # the dirstate for all the files in the new commit which commitctx |
3052 # the dirstate for all the files in the new commit which commitctx |
3053 # could have done if it updated the dirstate. Now, we can |
3053 # could have done if it updated the dirstate. Now, we can |
3054 # selectively update the dirstate only for the amended files. |
3054 # selectively update the dirstate only for the amended files. |
3055 dirstate = repo.dirstate |
3055 dirstate = repo.dirstate |
3056 |
3056 |
3057 # Update the state of the files which were added and |
3057 # Update the state of the files which were added and modified in the |
3058 # and modified in the amend to "normal" in the dirstate. |
3058 # amend to "normal" in the dirstate. We need to use "normallookup" since |
|
3059 # the files may have changed since the command started; using "normal" |
|
3060 # would mark them as clean but with uncommitted contents. |
3059 normalfiles = set(wctx.modified() + wctx.added()) & filestoamend |
3061 normalfiles = set(wctx.modified() + wctx.added()) & filestoamend |
3060 for f in normalfiles: |
3062 for f in normalfiles: |
3061 dirstate.normal(f) |
3063 dirstate.normallookup(f) |
3062 |
3064 |
3063 # Update the state of files which were removed in the amend |
3065 # Update the state of files which were removed in the amend |
3064 # to "removed" in the dirstate. |
3066 # to "removed" in the dirstate. |
3065 removedfiles = set(wctx.removed()) & filestoamend |
3067 removedfiles = set(wctx.removed()) & filestoamend |
3066 for f in removedfiles: |
3068 for f in removedfiles: |