[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] "Diff" shows expanded keywords as diffs, but "Create patch" and "svn diff" don't

From: Eric Hanchrow <offby1_at_blarg.net>
Date: 2005-02-06 19:03:41 CET

This is the nightly build of Tortoise dated 5 Feb 2005.

I have a file which has svn:keywords set to "LastChangedDate
LastChangedRevision HeadURL". In the repository, the file, not
surprisingly, includes references to those three keywords, like this:

         << "$LastChangedDate$"
         << std::endl
         << "$LastChangedRevision$"
         << std::endl
         << "$HeadURL$"

Also unsurprisingly, in the working copy, the keywords are expanded;
they look like this:

         << "$LastChangedDate: 2005-02-03 15:36:42 -0800 (Thu, 03 Feb 2005) $"
         << std::endl
         << "$LastChangedRevision: 4749 $"
         << std::endl
         << "$HeadURL: svn://localhost/trunk/sdk/examples/quick_vote/qv.cpp $"

Now, I've made a tiny edit to this file (I inserted a comment in the
first line), and I did "svn diff". That yielded exactly the result I
expected to see:

    $ svn diff qv.cpp
    Index: qv.cpp
    ===================================================================
    --- qv.cpp (revision 4772)
    +++ qv.cpp (working copy)
    @@ -1,4 +1,4 @@
    -
    +// hubba hubba!
     #include "../../test/test_misc/test-misc.h"

     #include <vhti/check_pds_and_combine.h>
    $

Finally, the bug: I right-click on the file's Explorer icon, and
choose "SVN Diff" from the Tortoise menu, but now I see _four_ changed
lines: the original comment, which I expected, and one line each for
the three expanded keywords, which I didn't expect. Those extra three
lines are the bug.

Curiously, if I now choose TortoiseSVN/Create Patch from the context
menu, the resulting patch contains just the comment diff, as I expect.

-- 
Software is largely a service industry operating under the
persistent but unfounded delusion that it is a manufacturing
industry.
        -- Eric Raymond
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Feb 6 19:05:44 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.