How can I view all historical changes to a file in SVN

后端 未结 9 1943
闹比i
闹比i 2020-12-02 04:08

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

相关标签:
9条回答
  • 2020-12-02 04:34

    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.

    0 讨论(0)
  • 2020-12-02 04:39

    You could use git-svn to import the repository into a Git repository, then use git log -p filename. This shows each log entry for the file followed by the corresponding diff.

    0 讨论(0)
  • 2020-12-02 04:40

    Slightly different from what you described, but I think this might be what you actually need:

    svn blame filename
    

    It will print the file with each line prefixed by the time and author of the commit that last changed it.

    0 讨论(0)
提交回复
热议问题