I'm working on a Ruby script in TextMate 2 and all of a sudden I'm seeing the end of my files disappear and inserted midline is ">>>>>>> External Changes" and from there on everything is deleted. The only thing that I've knowingly changed is I've started to use Bookmarks. Therefore Cmd-F2 and shift-F2.
Any ideas?
Greg
Sounds like an 'git stash apply' happened.
On 4 jan. 2013, at 01:24, Greg web@web.knobby.ws wrote:
I'm working on a Ruby script in TextMate 2 and all of a sudden I'm seeing the end of my files disappear and inserted midline is ">>>>>>> External Changes" and from there on everything is deleted. The only thing that I've knowingly changed is I've started to use Bookmarks. Therefore Cmd-F2 and shift-F2.
Any ideas? Greg
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Thanks. I'm not using git with TextMate and there's no shortcut for it, so seems unlikely.
I assume I'm inadvertently applying some shortcut. More than irritating since the end of the file gets chopped off without my realizing it and I'm relying on manual saving.
Greg
On Jan 4, 2013, at 9:26 AM, Koen Punt koen@koenpunt.nl wrote:
Sounds like an 'git stash apply' happened.
On 4 jan. 2013, at 01:24, Greg web@web.knobby.ws wrote:
I'm working on a Ruby script in TextMate 2 and all of a sudden I'm seeing the end of my files disappear and inserted midline is ">>>>>>> External Changes" and from there on everything is deleted. The only thing that I've knowingly changed is I've started to use Bookmarks. Therefore Cmd-F2 and shift-F2.
Any ideas? Greg
I've seen the same thing happen to me when I edited a file I had open in TM2 in another editing program. Maybe you have another program or process running that is modifying the file?
Mike
On Fri, Jan 4, 2013 at 1:37 PM, Greg web@web.knobby.ws wrote:
Thanks. I'm not using git with TextMate and there's no shortcut for it, so seems unlikely.
I assume I'm inadvertently applying some shortcut. More than irritating since the end of the file gets chopped off without my realizing it and I'm relying on manual saving.
Greg
On Jan 4, 2013, at 9:26 AM, Koen Punt koen@koenpunt.nl wrote:
Sounds like an 'git stash apply' happened.
On 4 jan. 2013, at 01:24, Greg web@web.knobby.ws wrote:
I'm working on a Ruby script in TextMate 2 and all of a sudden I'm seeing the end of my files disappear and inserted midline is ">>>>>>> External Changes" and from there on everything is deleted. The only thing that I've knowingly changed is I've started to use Bookmarks. Therefore Cmd-F2 and shift-F2.
Any ideas?
Greg
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Jan 4, 2013, at 1:24 AM, Greg web@web.knobby.ws wrote:
I'm working on a Ruby script in TextMate 2 and all of a sudden I'm seeing the end of my files disappear and inserted midline is ">>>>>>> External Changes" and from there on everything is deleted. The only thing that I've knowingly changed is I've started to use Bookmarks. Therefore Cmd-F2 and shift-F2.
Any ideas?
When a file is externally modified but also has local changes, TextMate will run ‘diff3’ to try and intelligently merge in the external changes. If there is a conflict, you would get a marker like the one you quote.
It sounds like something is not working as it should though.
Could it be that this file is externally modified (while you’re working with it)?
Are you regularly using Ruby → Run (⌘R) with these files?
Is this on a local HFS+ file system (as opposed to a network mounted drive, something controlled by a syncing service like DropBox)?
On Jan 4, 2013, at 11:01 AM, Allan Odgaard mailinglist@textmate.org wrote:
On Jan 4, 2013, at 1:24 AM, Greg web@web.knobby.ws wrote:
I'm working on a Ruby script in TextMate 2 and all of a sudden I'm seeing the end of my files disappear and inserted midline is ">>>>>>> External Changes" and from there on everything is deleted. The only thing that I've knowingly changed is I've started to use Bookmarks. Therefore Cmd-F2 and shift-F2.
Any ideas?
When a file is externally modified but also has local changes, TextMate will run ‘diff3’ to try and intelligently merge in the external changes. If there is a conflict, you would get a marker like the one you quote.
It sounds like something is not working as it should though.
Could it be that this file is externally modified (while you’re working with it)?
It's not impossible that I'd opened the files with BBEdit since I understand compare files there more easily. But I don't think that I did it on all these files and I've done this for years without any problem. But see below for a more likely culprit.
Are you regularly using Ruby → Run (⌘R) with these files?
Yes
Is this on a local HFS+ file system (as opposed to a network mounted drive, something controlled by a syncing service like DropBox)?
Ah, maybe this is the problem. And I'd forgot I'd done it. Files are in a Dropbox folder. Not being used or worked on from another computer though. But this is plausible explanation and as of now is the only thing that I can think of that's changed.
Is there anything I can do to continue to use Dropbox and prevent the problem. Dropbox isn't a requirement, but I use the script on my laptop and thought this would be easier than copying it over when I made change.
Thanks Allan.
On Jan 4, 2013, at 4:02 PM, Greg web@web.knobby.ws wrote:
On Jan 4, 2013, at 11:01 AM, Allan Odgaard mailinglist@textmate.org wrote:
On Jan 4, 2013, at 1:24 AM, Greg web@web.knobby.ws wrote:
Are you regularly using Ruby → Run (⌘R) with these files?
Yes
This may be the problem after all. I can't get control-c to stop the script, so from time to time I've Cmd-R to start it again which then asks me if I want to stop it which I do, then I stop the script in a dialog box (Pashua) that allows me to cancel.
I moved the files out of the Dropbox folder and got the problem again, so maybe the above caused it.
What is the command for stop the running script?
On Jan 5, 2013, at 3:03 AM, Greg web@web.knobby.ws wrote:
Are you regularly using Ruby → Run (⌘R) with these files?
Yes
This may be the problem after all.
I did this commit https://github.com/textmate/ruby.tmbundle/commit/e7f78683144a53e7bb3e14f0f4a...
Your ruby bundle should automatically update soonish (you can check About → Bundles to see release notes for bundles, which would indicate wether or not it has been updated).
While I don’t see how this would cause the behavior you’re seeing, it’s something I long wanted to fix, as having the command itself handle the saving does have a few disadvantages (like not respecting encodings) and it does stress the “externally modified” code.
If you see the issue after your ruby bundle has updated, let me know.
[…] What is the command for stop the running script?
Control-C is the way to terminate a running script. This is done by sending SIGINT, SIGTERM, and then SIGKILL to the script and up the process tree (if the script has forked). If it fails, the only other way is to close the window (which effectively does the same, but includes the process that runs your script.
On Jan 5, 2013, at 3:03 AM, Greg web@web.knobby.ws wrote:
Are you regularly using Ruby → Run (⌘R) with these files?
Yes
This may be the problem after all.
I did this commit https://github.com/textmate/ruby.tmbundle/commit/e7f78683144a53e7bb3e14f0f4a...
Your ruby bundle should automatically update soonish (you can check About → Bundles to see release notes for bundles, which would indicate whether or not it has been updated).
While I don’t see how this would cause the behavior you’re seeing, it’s something I long wanted to fix, as having the command itself handle the saving does have a few disadvantages (like not respecting encodings) and it does stress the “externally modified” code.
If you see the issue after your ruby bundle has updated, let me know.
[…] What is the command for stop the running script?
Control-C is the way to terminate a running script. This is done by sending SIGINT, SIGTERM, and then SIGKILL to the script and up the process tree (if the script has forked). If it fails, the only other way is to close the window (which effectively does the same, but includes the process that runs your script.
Thanks. The update has showed up. No problems with the updated version working with scripts NOT in Dropbox.
Next to try in Dropbox.
Thanks for the update.
Control-C not working. Reluctant to close window since I want the information written out while debugging.