cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 127137 - New files status is REMOVED
: New files status is REMOVED
Status: RESOLVED WONTFIX
: versioncontrol
Mercurial
: 6.1
: All All
: P3 (vote)
: TBD
Assigned To:
:
:
:
: RELNOTE
:
:
  Show dependency treegraph
 
Reported: 2008-02-11 15:48 by
Modified: 2008-02-13 11:00 (History)
Issue Type: DEFECT
:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-02-11 15:48:40
1.) delete a file
2.) create a new file with the same name - it's status is removed

guessing that there will be similar behavior when:
1.) renaming a file
2.) undo refactoring

mercurial should check a files status in its interceptors create events and
rollback/revert it if status = removed

see other vcs modules for more info
------- Comment #1 From 2008-02-12 11:26:29 -------
I have reproduced the behavior that Tomas has described.

I need to look at the other vcs modules to see what we should do about it.
------- Comment #2 From 2008-02-12 14:30:38 -------
This is actually by design, its the way Mercurial behaves:

What is in the Status Window is a view of the Repository, so when you delete a
file that was in the repo, Mercurial
correctly schedules it for removal, removes it form the working dir and updates
its status to Locally Removed.
If you then create a new file with that name, it will be locally New but the
commit has not yet happened so the status
is not updated.
On Commit the repository removes the file and the new file is then reported as
Locally New and reflected in the Status View.

It is strange but its by design in Mercurial so we'd be reluctant to hack
around it in the interceptor code. Padraig has
investigated this already and it has a number of risks due to the way the
interceptor code is designed.
------- Comment #3 From 2008-02-12 14:31:42 -------
changing status
------- Comment #4 From 2008-02-12 15:26:53 -------
i see:)

1.) is there a chance to reflect somehow this "bizarre" state in the files
annotation? it's quite confusing... 
2.) or maybe invoking an explicit 'hg add' on the file? the status changes to
modified and only one commit is needed

however, the whole scenario doesn't seem to be a typical/frequent usecase.
speaking for myself - feel free to close if
you think this is how the plugin should work.
------- Comment #5 From 2008-02-13 11:00:41 -------
I have release noted this.