3644 for f in actions[b'drop'][0]: |
3644 for f in actions[b'drop'][0]: |
3645 audit_path(f) |
3645 audit_path(f) |
3646 prntstatusmsg(b'drop', f) |
3646 prntstatusmsg(b'drop', f) |
3647 repo.dirstate.set_untracked(f) |
3647 repo.dirstate.set_untracked(f) |
3648 |
3648 |
3649 normal = None |
3649 # We are reverting to our parent. If possible, we had like `hg status` |
3650 if node == parent: |
3650 # to report the file as clean. We have to be less agressive for |
3651 # We're reverting to our parent. If possible, we'd like status |
3651 # merges to avoid losing information about copy introduced by the merge. |
3652 # to report the file as clean. We have to use normallookup for |
3652 # This might comes with bugs ? |
3653 # merges to avoid losing information about merged/dirty files. |
3653 reset_copy = p2 == repo.nullid |
3654 if p2 != repo.nullid: |
3654 |
3655 normal = repo.dirstate.set_tracked |
3655 def normal(filename): |
3656 else: |
3656 return repo.dirstate.set_tracked(filename, reset_copy=reset_copy) |
3657 normal = repo.dirstate.set_clean |
|
3658 |
3657 |
3659 newlyaddedandmodifiedfiles = set() |
3658 newlyaddedandmodifiedfiles = set() |
3660 if interactive: |
3659 if interactive: |
3661 # Prompt the user for changes to revert |
3660 # Prompt the user for changes to revert |
3662 torevert = [f for f in actions[b'revert'][0] if f not in excluded_files] |
3661 torevert = [f for f in actions[b'revert'][0] if f not in excluded_files] |
3747 if f not in newlyaddedandmodifiedfiles: |
3746 if f not in newlyaddedandmodifiedfiles: |
3748 prntstatusmsg(b'add', f) |
3747 prntstatusmsg(b'add', f) |
3749 checkout(f) |
3748 checkout(f) |
3750 repo.dirstate.set_tracked(f) |
3749 repo.dirstate.set_tracked(f) |
3751 |
3750 |
3752 normal = repo.dirstate.set_tracked |
|
3753 if node == parent and p2 == repo.nullid: |
|
3754 normal = repo.dirstate.set_clean |
|
3755 for f in actions[b'undelete'][0]: |
3751 for f in actions[b'undelete'][0]: |
3756 if interactive: |
3752 if interactive: |
3757 choice = repo.ui.promptchoice( |
3753 choice = repo.ui.promptchoice( |
3758 _(b"add back removed file %s (Yn)?$$ &Yes $$ &No") % f |
3754 _(b"add back removed file %s (Yn)?$$ &Yes $$ &No") % f |
3759 ) |
3755 ) |