views:

39

answers:

2

Hello,

My problem is that i often forgot what i have changed in my software, when i do a cvs-check in. So i have to lookup my code for changes. If this could be automated, it would be great.

So can anyone tell me if there is a tool or something which can lookup my code (i'm using c#) for specific comments, that i add if i change something and write these comments to a file, so i can use it for cvs checkin?

An example:

//BUGFIX: This Program part was changed
//IMPROVED: This is a new Function
...ProgramCode...

The program should read my source files and recognize the comments with BUGFIX and IMPROVED. These comments should be written to a file. After they a written the lines with BUGFIX and IMPROVED should be removed from my sources. It should be possible to declare new tags.

I would be happy if somebody can give me an advice.

Greetings, Martin

+2  A: 

I don't know how to do what you want, but here's how I work with CVS to avoid this problem in first place :)

Only work on one feature/bugfix a time, and commit it after you're done.

Instead of adding a BUGFIX-tag into your sourcecode, commit the changed files immediately after you fixed the bug (and tested your fix). This is the moment when you know exactly what you did, and why and how you did it.
This leaves you with a clean sandbox, so you don't have to bother about changed files when adding the next feature/fixing the next bug.

When working on features taking days or weeks, make sure to commit your progress, even if the feature is not complete yet (do not break the build though, when others rely on it).

And if you develop a new feature that you can not commit yet and you have to do an urgent bugfix, commit that in a different sandbox and use CVS update on your working copy to merge the bugfix when necessary.

Peter Lang
If I am in my companys office this workflow is no problem and i work in the way you described. The problem for me is, that i don't have a continous connection to my companys network through vpn when im traveling. If i always wait for the next connection to checkin every bugfix my work would not be really efficent. I hope you understand now why a need such a function.
martin
I see.What about writing this file yourself? Instead of adding those tags to your source, write them (and all necessary information) into the file that you would generate otherwise. You can use whatever tags you like and don't need a script modifying your source. Once you are back online, process that file.
Peter Lang
This is what I try to do currently, but sometimes I forget to make notes, so thougt about the described way, that don't split my working process in two parts. But the argument with modifying code is right. It's a bit dangerous. An idea will be a notebooktool with hotkey writing my nodes in a sequential file. Perhaps i can find such a tool.
martin
+1  A: 

Another answer, concerning the alternative method of writing the log-file yourself.

A simple VBScript could do that job of appending (see vbs-script-to-append-to-a-specified-text-file). Display an InputBox, enter the text and let the script append it to a predefined file.

I think the way I would do it is the following

  1. Install Launchy
  2. Place a txt-File in a directory used by Launchy

Whenever you changed something, open the textfile using Launchy, append your changes, save and close the file again.

You can do all this with the keyboard, it's just some extra keystrokes (open Launchy and type the first few letters of your txt-File's name) and once you are done you're back to your IDE.

Peter Lang
This sounds good. I think i will try. Thanks
martin