views:

25

answers:

1

Hi all! Sorry for my English ;)

I want to make something like auto-diff. For example, Im writing an article and want to paste there all my changes in project code. I hate writing code, then copy-pasting it to text editor, writing comments, then writing code again.

Can somebody advice me any way to do smth like this:

  • I edit my some user.rb file (in this step i want all changes to be written in some changes.txt)
  • Then i edit README file (in this step all changes in README should be written to changes.txt too)
  • And then I refactor code in user.rb (in this step new changes in user.rb should be written to changes.txt below any changes. i should see all my changes to user.rb file)

Somebody understood what i want? ;)

A: 

I don't know what exactly you want if you want the logic then here what i can suggest. what i understood is like you have some project,you made some changes, now you want some difference file to generate & patch it back.

first You have to maintain an Original Copy of the project.

you can create a Xml file where each tag will be having id like your filename.content of tag whatever the output of the Diff command comes

Use of XML will make your work easier to edit the file latter on. Now you can use any programming language java,c# to write & read from the XML, & see some better algorithm for finding difference & patching it back.

Black Diamond