문제

I would like to know whether there is a tool that can work with Subversion (which I use via Tortoise and Ankh) to generate a pre-commit report of all of my changes (across all files).

This is so that I can easily visually inspect my changes for accuracy prior to committing, without having to perform individual 'diffs' on each file.

In response to @alroc's question, what I wish for is roughly:

FILENAME1.CPP
>>> Line 1234 Was
    int i = 3;
>>>> Line 1234 Now
    int j = 3;

>>>> Line 2345 Was
    string s = "Hello";
>>>> Line 2345 Now
    string s = "Goodbye";


FILENAME2.CPP
>>>> Line 100 Was
    for (int i = 1 to 10)
    {
        DoSomething (i);
    }
>>>> Line 100 Now
    for (int i = 1 to 12)
    {
        DoSomethingElse (i);
    }  
도움이 되었습니까?

해결책

  1. Right-click your working copy.
  2. TortoiseSVN -> Create Patch
  3. Select your files
  4. Click OK
  5. Save the file when prompted

This will create a Unified Diff file which describes all the uncommitted changes.

You can also do this at the command line. svn diff > myfile.diff

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top