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

svn copy: Why different changes depending on various circumstances

From: Keith Moore <Keith.Moore_at_securency.com>
Date: Thu, 27 Aug 2009 10:39:02 +1000

Hi, just to give everyone a bit of context: We write [internal] software for our company and have two sites worldwide, one site speaks English the other Spanish. We are speak English so we develop all our software in English and then a third party translates it into Spanish. Managing the updates to the source code and knowing which files require [re]translation is virtually impossible with our current system. As such I started looking into recording changes to localizable files as part of a post-commit hook in Subversion. My idea was to have the post-commit hook send the changes to a, custom built, command-line tool that stores the changes in a database backend and notifies developers, via e-mail, when changes are made to localizable content.

I got a prototype up and running that uses the output from "svnlook changed REPO_PATH -r ? --copy-info" during the post-commit hook. This all works great except for one small problem.

It all revolves around "svn copy WC WC" and the consequent output from svnlook. I'm running svn client 1.5.5 on Windows Vista and svnserve 1.5.5 on a Windows Server 2003 machine with a FSFS repository.

I have a repository like this, bear in mind this a SandPit repository.

Repository URL: Svn://svn_server/SandPit/

Tree:-

CopyProblem/
CopyProblem/Folder1/
CopyProblem/Folder1/File1.txt
CopyProblem/Folder2/SourceFile.txt <-- Copy of CopyProblem/SourceFile.txt
CopyProblem/Folder3/
CopyProblem/SourceFile.txt

I've checked the tree to a working copy on my local machine and am in the root folder of that WC.
Now if I issue the commands:
    svn copy Folder1 Folder3/Folder1
    svn commit . -m ""

The 'svnlook changed repo_path -r rev --copy-info' output is:
A + CopyProblem/Folder3/Folder1/
    (from CopyProblem/Folder1/:r160)

Seems okay, no problem. Now try:
    svn copy Folder2 Folder3/Folder2
    svn commit . -m ""

svnlook output:
A + CopyProblem/Folder3/Folder2/
    (from CopyProblem/Folder2/:r160)
A + CopyProblem/Folder3/Folder2/SourceFile.txt
    (from CopyProblem/Folder2/SourceFile.txt:r162)

This time it also copied the file, but I thought the file would have been copied as part of the directory copy?
Okay, now I add a new file to Folder2 using:
    dir >Folder2\File2.txt
    svn add Folder2\File2.txt
    svn commit . -m ""

So Folder2 has a copied file (SourceFile.txt) and a new file (File2.txt) in it. Now try:
    svn copy Folder2 Folder1/Folder2
    svn commit . -m ""

svnlook output:
A + CopyProblem/Folder1/Folder2/
    (from CopyProblem/Folder2/:r160)
A + CopyProblem/Folder1/Folder2/File2.txt
    (from CopyProblem/Folder2/File2.txt:r165)
A + CopyProblem/Folder1/Folder2/SourceFile.txt
    (from CopyProblem/Folder2/SourceFile.txt:r162)

Now I'm confused, the first copy only copied the directory. The second copied the directory and the file, which I assumed was because the file was, itself, a copy. But then the third copies the directory and both files, one that is a copy one that isn't. Can someone explain the reason the svnlook output, for what seem to be the same operations, is so different?

Thanks,
Keith Moore.
#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2387749

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 02:42:00 CEST

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

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