sublime-lightning icon indicating copy to clipboard operation
sublime-lightning copied to clipboard

Warn when overwriting a newer file on the org

Open chasd00 opened this issue 10 years ago • 3 comments

It would be useful to get a warning if the file on the server is newer than the local file when pushing. Overwriting someone else's work is a very easy mistake to make.

chasd00 avatar Oct 12 '15 14:10 chasd00

Good idea. I'll see what I can do.

dcarroll avatar Oct 12 '15 22:10 dcarroll

I don't think the file on the server will ever be newer than the file being pushed. I would need to keep track of more data about the files. When fetching a file I would need to save the SystemModStamp somewhere, then before saving I would need to query the file to get the SystemModStamp for comparison. Doable, but not trivial.

dcarroll avatar Oct 12 '15 22:10 dcarroll

thanks for the quick response, I'll keep thinking about it too. I wonder if a local git repo could help where before every push a fetch and merge is done. idk, just thinking out loud

On Mon, Oct 12, 2015 at 5:17 PM, Dave Carroll [email protected] wrote:

I don't think the file on the server will ever be newer than the file being pushed. I would need to keep track of more data about the files. When fetching a file I would need to save the SystemModStamp somewhere, then before saving I would need to query the file to get the SystemModStamp for comparison. Doable, but not trivial.

— Reply to this email directly or view it on GitHub https://github.com/dcarroll/sublime-lightning/issues/19#issuecomment-147536223 .

chasd00 avatar Oct 13 '15 15:10 chasd00