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

creating patch of moved file fails

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 14 Jul 2009 09:47:24 +0200


With the latest version 1.6.3, creating a patchfile of a working copy
that contains moved/renamed files doesn't work as before anymore: only
the deletion of the move is included in the patchfile, but not the add
of the new file.

$ svnadmin create testrepo
$ svn co file:///testrepo testwc
$ echo test > testwc\file.txt
$ svn add testwc\file.txt
$ svn ci testwc -m ""
$ svn mv testwc\file.txt testwc\file2.txt
$ svn diff testwc > patch.txt

now patch.txt only contains the deletion of file.txt, but not the add of

In subversion/libsvn_wc/diff.c, line 621:
       SVN_ERR(svn_wc_text_modified_p(&modified, path, FALSE,
                                      adm_access, pool));

that call to svn_wc_text_modified_p() returns false in the 'modified'
variable, which then leads to no diff for files added with history.
Not sure whether svn_wc_text_modified_p should return true of whether
the diff should also check for added-with-history status though.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2009-07-14 09:47:41 CEST

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