3

I am in a situation where we have used a plugin in our project, I am a front end developer so, a guy blamed on me that I have made changes directly inside the plugin code which is obviously a bad practice but I am pretty much sure I didn't do it.

We are using subversion and Trac for version control etc. The project ( and changes ) are very old almost 2-3 months old. Here is my question, How can I know that how many people and who has edited that one( suspected ) file till date?

vats
  • 53
  • 1
  • 6

1 Answers1

2

There's a really neat command in Subversion:

$ svn blame $file_name_or_url

This command will show you each and every line in a file, and who changed that line, and in what revision of Subversion where the change took place. You find the line that caused the problem, and you can find the last guy who touched that line.

You can use the svn log command on a file to see who changed that file and when:

$ svn log $file_name_or_url

This will show you the complete history of that one file. You can also use the --diff parameter to produce a diff output between each of the versions. However, the svn blame command is probably best for what you want.

David W.
  • 105,218
  • 39
  • 216
  • 337
  • Thanks it solved my issue........but any idea how can I do this on trac app online? – vats Dec 20 '12 at 17:34
  • Trac 1.0, the current stable release, supports that *blame* operation. Browse to file, select the annotate option in the context menu top right, just below main menu, click at revision links at interesting lines --> opening a window showing change-set including author and changed files, very convenient. – hasienda Dec 20 '12 at 20:24