Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Autosave enhancement
Bat:
I've just send a patch :
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3524&group_id=5358
goal : add integrated restore on autosave feature
There some slight modifications to introduce necessary entry point
Note : lots of modification are only visible for ".save" version of autosave
oBFusCATed:
Can you explain what is the purpose of this patch?
What problem are you trying to solve with it?
For me it seems that you're trying to replace a VCS system with it.
Is this the case?
Looking at the patch it seems you're using _("...") for things that are not translatable, which is a mistake!
For example all the file types should be surrounded by _T or wxT and not by _().
Another problem I see is that you've couple the SDK for cbEditor and the AutoSave plugin. I'm not sure this is a good idea.
Bat:
The prupose of this match, is mainly to integrate recover of autosaved file, in case of C::B crash
Ok, crash never appends, but just in case ;)
It's not same purpose of CVS, as it recover only "unsaved" file. As soon as a file is saved on disk, autosave is deleted. And there CVS take relay
At workspace/project/editor open, if an autosaved file is younger than original file, there were probably some problem (crash, no save of file other than voluntary say "no" to save file, ...)
For _("..."), I will correct this (I ignore / and haven't search / this difference)
--- Quote ---Another problem I see is that you've couple the SDK for cbEditor and the AutoSave plugin. I'm not sure this is a good idea.
--- End quote ---
Humm, really not wanted. I've added some particular entry point to have a better autosave (without mess in "modified" flag), but I thought Autosave is not needed for cbEditor to work.
To be decoupled, I must have possibility to start C::B with autosave plugin not present ? Is it the good test ?
oBFusCATed:
--- Quote from: Bat on November 16, 2013, 11:48:49 am ---The prupose of this match, is mainly to integrate recover of autosaved file, in case of C::B crash
--- End quote ---
I still don't understand. What you want is C::B to automatically copy the file from .save to the original on the next start?
This patch adds tons of complexity to the code, so you'll have to justify it, before it goes in SVN.
And yes, C::B must be able to work without the autosave plugin as before.
thomas:
I'm not quite happy with the patch for a couple of reasons.
The autosave plugin is already something that's not-really-necessary, and it was only ever intended as a workaround to the actual problem, years ago. The whole idea behind it was that it is slighly less annoying when Code::Blocks crashes and the last 2 hours of your work aren't gone -- you only lose maybe the last 2-3 mins of your work.
The main objective is, however, that Code::Blocks does not crash in the first place, and we're reasonably close to that objective (I've not seen a crash on my machine for years).
Having to restore from a save file is something that should rarely happen if ever (I remember having to do it a single time, years ago). It is not something most people will regularly find useful being automated.
More importantly, however...
The code alters the SDK to make the plugin work with its new functionality, and the "complete save" feature uses a boolean as a lock. Of course a boolean is sufficient since autosave only runs every few minutes, so there will never be any concurrency, right? Except when there is concurrency because the user opens or saves a file or saves the current project... which of course happens in regular intervals.
Navigation
[0] Message Index
[#] Next page
Go to full version