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

diff don't recognize all changes in keyword expansions

From: Uwe Zeisberger <zeisberg_at_informatik.uni-freiburg.de>
Date: 2003-12-19 16:23:15 CET


I committed a file which was still opened in my editor. Then I changed
something and, even though my editor warned me, that the file has changed
since reading it, I saved it. The output of the following 'svn diff'
surprised me: The change was caused by keyword expansion.

Voila, a reproduction recipe:

        zeisberg@cepheus:/tmp$ svn --version | head -n 1
        svn, version 0.34.0 (r7859)

        zeisberg@cepheus:/tmp$ svnadmin create repo

        zeisberg@cepheus:/tmp$ mkdir project

        zeisberg_at_cepheus:/tmp$ svn import -m '' project file:///tmp/repo

        Committed revision 1.

        zeisberg_at_cepheus:/tmp$ svn co file:///tmp/repo wc
        Checked out revision 1.

        zeisberg@cepheus:/tmp$ cd wc

        zeisberg@cepheus:/tmp/wc$ echo '$Rev$' > file

        zeisberg@cepheus:/tmp/wc$ svn add file
        A file

        zeisberg@cepheus:/tmp/wc$ svn propset svn:keywords "Rev" file
        property 'svn:keywords' set on 'file'

        zeisberg@cepheus:/tmp/wc$ svn ci -m ''
        Adding file
        Transmitting file data .
        Committed revision 2.

        zeisberg@cepheus:/tmp/wc$ cat file
        $Rev: 2 $

        zeisberg@cepheus:/tmp/wc$ echo '$Rev$' > file

        zeisberg@cepheus:/tmp/wc$ svn diff file

        zeisberg@cepheus:/tmp/wc$ svn status file

        zeisberg@cepheus:/tmp/wc$ svn revert file

        zeisberg@cepheus:/tmp/wc$ cat file

Shouldn't the diff and the status command notice the change in the keyword?
And imho revert should reset the change.


Uwe Zeisberger
<script>alert("This is a virus for Outlook")</script>

  • application/pgp-signature attachment: stored
Received on Fri Dec 19 16:24:03 2003

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

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