Show Ticket

Duplicates of this ticket: C5FEBA09, A206DD92, B036CF83

Status: open, reported by denis on 2008-04-02 (bug)

Modifying files using "Find in Project" results in unloaded changes made by other team members to be silently overwritten

I found a scenario using "Find in Project" where changes made to a file by a team member (in a version control situation) get silently overwritten, leading to the possibility that the file will get committed to version control without the team member's changes in it.

Steps to reproduce:

1. Open File A in TextMate.
2. Open File B in TextMate (making it the current file shown, very important step to recreating this bug).


3. Have another team member modify File A on their computer (for example, add a line of text to the bottom of it) and commit it to version control.
4. Using your version control client, bring down the modified File A to your computer.
5. Perform a "Find in Project", and perform a global replacement of text that is known to be in the original File A.  Note that "Find in Project" notifies you that it modified File A.
6. Use "File | Save All" to save File A.

At this point, the changes made by the team member will no longer be in File A on disk.  It appears that the "Find in Project" performs the replacements on the copy of File A (the original file) in memory, not the updated File A on disk.  We actually got bit by this a couple of times before realizing what was happening.
Note added by Olivier Le Floch on 2010-03-22 04:36:54

I've encountered this (*very* bothersome) issue regularly in the last two years.