I know that I can svn diff -r a:b repo
to view the changes between the two specified revisions. What I'd like is a diff for every revision that changed the file. Is such a command available?
相关问题
- How can I set the SVN password with Emacs 23.1 bui
- If statements in .htaccess files, to enable passwo
- SVN+SSH checkout over VPN using tortoise SVN, Smar
- Mercurial compared to private branches in SVN
- Using Subversion and SourceSafe at the same time?
相关文章
- Is there a version control system abstraction for
- Intermittent “SVNException: svn: E175002: Connecti
- IntelliJ Subversion Authentication Required Dialog
- TortoiseHG and hgsubversion (Windows): “no module
- Incompatible JavaHl library loaded
- TFS vs. JIRA/Bamboo/SVN [closed]
- converting svn repo to git using reposurgeon
- SVN查看日志超时
The oddly named "blame" command does this. If you use Tortoise, it gives you a "from revision" dialog, then a file listing with a line by line indicator of Revision number and author next to it.
If you right click on the revision info, you can bring up a "Show log" dialog that gives full checkin information, along with other files that were part of the checkin.
Start with
That will get you a list of revisions where the file changed, which you can then use to script repeated calls to
svn diff
.Slightly different from what you described, but I think this might be what you actually need:
It will print the file with each line prefixed by the time and author of the commit that last changed it.
As far as I know there is no built in svn command to accomplish this. You would need to write a script to run several commands to build all the diffs. A simpler approach would be to use a GUI svn client if that is an option. Many of them such as the subversive plugin for Eclipse will list the history of a file as well as allow you to view the diff of each revision.
Thanks, Bendin. I like your solution very much.
I changed it to work in reverse order, showing most recent changes first. Which is important with long standing code, maintained over several years. I usually pipe it into more.
I added -r to the sort. I removed spec. handling for 'first record'. It is it will error out on the last entry, as there is nothing to diff it with. Though I am living with it because I never get down that far.
You could use
git-svn
to import the repository into a Git repository, then usegit log -p filename
. This shows each log entry for the file followed by the corresponding diff.