Author Topic: Feature request for "Reload file ?" requester  (Read 6793 times)

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Feature request for "Reload file ?" requester
« on: September 26, 2007, 11:32:09 am »
Hello!
Codeblocks is really great, and i'm wokring with several compilers (gcc,metware,keil..)
The only "missing" feature for me is (i think no other IDE has such a feature), a "Compare" button on the "Reload file ?" requester.
The current editor file should then be saved to temp, and then configurable "shell" command should be called with the filepathes of the original and the temp file. So this two files could be called with a compare/merge program, to see the changes..

I think this wouldnt be a great great deal to program, but really a nice feature for little deveopment groups who uses this feature. And i think to other IDE would have such a feature!..

Thanks.

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: Feature request for "Reload file ?" requester
« Reply #1 on: September 26, 2007, 01:26:27 pm »
The current editor file should then be saved to temp, and then configurable "shell" command should be called with the filepathes of the original and the temp file. So this two files could be called with a compare/merge program, to see the changes..
Try Subversion + TortoiseSVN plugin for C::B.
More flexible and more usable, I think.
Good luck!
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Feature request for "Reload file ?" requester
« Reply #2 on: September 26, 2007, 01:35:16 pm »
We are just 2 developers... so allways do a checkin/out would be a great overhead and to install a svn server...The other solution would be the simpler one for us...

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: Feature request for "Reload file ?" requester
« Reply #3 on: September 26, 2007, 02:19:41 pm »
We are just 2 developers... so allways do a checkin/out would be a great overhead and to install a svn server...The other solution would be the simpler one for us...

I being used Subversion for 1-2 developers. Branches, tags and more over. On Windows, Linux, no problem.
I does install, configure and forget it. More features, logs, history.
I have no english words :) for explain this great package.

I said my opinion, choose yourself!
Good luck!
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature request for "Reload file ?" requester
« Reply #4 on: September 26, 2007, 03:36:36 pm »
Subversion does not do what you asked for (neither does the TortoiseSVN plugin for Code::Blocks).

However, even for one developer, Subversion (or another RCS) is an absolute must, if you plan to do anything serious. By the way, if you don't want to run a server, you can still use Subversion on the local file system.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Feature request for "Reload file ?" requester
« Reply #5 on: September 26, 2007, 06:19:35 pm »
Schlumie's issue could arise whether or not he uses SVN. Occasionally a source or other text file that is open within the IDE will be overwritten by another process. It would be useful to be able to quickly figure out what was changed by having the option to pop open the new version in a new tab, rename the old version, and maybe put a diff in yet another tab. currently you have the option to reload or not reload, but not the option to see both.

I can't see this being high priority...

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Feature request for "Reload file ?" requester
« Reply #6 on: September 27, 2007, 09:52:10 am »
At last.... someone who understood me  :) ..
The more sophisticated method would be to remember the filetimestamp at loadtime and compare it when saving the file again. If the timestamp has changed, a other user has changed the while while editing... and a popup could warn about it..
The "Reload file?" requester only comes up on application focus change, i think..
I hope that, even if this feature gets no high priority, it will be integrated some time.. 

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature request for "Reload file ?" requester
« Reply #7 on: September 27, 2007, 05:51:48 pm »
I understood your issue was about being able to see the changes you may have made outside Code::Blocks if the "file has changed" dialog pops up. However, the last post sounds like your intent is to check for modifications every time a file is saved, because two developers work on the same set of original, non-versioned files at the same time.

I don't think this should be implemented in Code::Blocks at all, since it is silly. If you have two users modify the same original source tree concurrently, then honestly, you deserve conflicts.

Use Subversion, that's what it is for! It works reliably with 2 people (or with 2000) working concurrently, and it offers a big deal of other useful functionality (for example having a commit log, or the ability to go back in time, or the ability to track who did what change, branching, ...).
Subversion (or another RCS) is even useful if you work on a project all alone, but for any serious project with more than one developer, it is absolutely mandatory, there is no way around it.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Feature request for "Reload file ?" requester
« Reply #8 on: September 27, 2007, 10:52:34 pm »
I have to say I'm with Thomas on this one. If two or more of you are simultaneously editing the same source on a network share or something you're asking for trouble.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Feature request for "Reload file ?" requester
« Reply #9 on: September 27, 2007, 11:47:16 pm »
Binary build must be very fun and surprising  :D
Do you have to guess what has appeared in your binary ?

Offline Schlumie

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Feature request for "Reload file ?" requester
« Reply #10 on: September 28, 2007, 03:38:37 pm »
I think I'am in a special position...  To be exact, there is only 1 real developer (thats me), the other "guy" just makes little adjustments (change some define values for example). There is also a "live" bugreport/fix thing going on between use. So he permanently looks for bugs, and reports them into a bugreport, or for simple fixes he just screams through the other end of the room and i fix it immediatly. So its a kind of teamwork which makes development really easy and fast which is importent i our situation.. The files are on a networkshare. Additionally there are some Excelfiles with macros which creates directly sourcefiles with a lot of tables. This is complicating the things moreover. These excelfiles are sharedexcels to be able to edit them both. I think with subversion it would complicate our situation and the excelfiles couldnt be updated/merged with subversion....
I'm not sure what to do... maybe let the execlfiles+created sourcefiles on the network and the other ones local with subversion... but then the projectfiles would'nt be all in the same directorybranch...   and we would lose the option to save complete snapshot to another directory and be able to compile it simple...
We are working now 3 years together, and there were just a handful problems with changed files (cause the reload method is doing the job quite well..)  But Now I'm searching for a simple way to add security without changing our whole workingmethod..
I'm not really sure what to do... but its not that urgent, cause its been working quite well till now...  but if theres an easy chance to make it a litte saver, i'll take the chance...
Thank you all for your opinions/sugestions!

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Feature request for "Reload file ?" requester
« Reply #11 on: October 02, 2007, 03:25:38 am »
Just bite the bullet and use subversion.  Check the excel files into subversion as well.  Whenever you are editing the file make sure to have subversion "lock" the file so that you associate can't accidentally edit the file at the same time.  When you are done just commit and unlock the file.  You won't be able to diff excel files, but at least you will be able go back to old and working versions of your program.