C. Michael Pilato wrote:
> Neels J. Hofmeyr wrote:
>> So, no replies on this? I think it deserves some attention because it
>> affects `svn log' usability of moved files...
>>
>> ~Neels
>>
>> Neels J. Hofmeyr wrote:
>>> Hi all,
>>>
>>> there are plenty of posts about log on moved files, but I don't see this
>>> particular case complained about anywhere:
>>>
>>> I have a file that was some time ago `svn move'd to my current directory.
>>> `blame' tells me that some line is from revision N. I run `svn log -r N' but
>>> get an empty log message!?
>>>
>>> I then cd to my working copy root, run the same log command and voilà,
>>> there's the log message. Here's a transcript using a working copy of trunk,
>>> and also using the svn client compiled from trunk:
>>>
>>> [[[
>>> At revision 33739.
>>>
>>> neels_at_dub:/arch/elego/svn/trunk
>>> $ cd subversion/tests/cmdline/
>>>
>>> neels_at_dub:/arch/elego/svn/trunk/subversion/tests/cmdline
>>> $ svn blame tree_conflict_tests.txt
>>> [...]
>>> 31016 sbutler ==============
>>> 31016 sbutler Current Status
>>> 31016 sbutler ==============
>>> [...]
>>>
>>> neels_at_dub:/arch/elego/svn/trunk/subversion/tests/cmdline
>>> $ svn log -r 31016
>>> ------------------------------------------------------------------------
>> "Log is empty!? But the file is right here!"
>
> You're doing an apples to oranges comparison. You run 'svn blame' on a
> particular file, and that particular file tells you some revisions of
> interest. But then you run 'svn log' *not* on that same file, but on its
> current parent directory. Your current directory wasn't modified in r31016.
> You should have run 'svn log -r 31016 tree_conflicts_tests.txt'.
>
> The reason you see the log when you back up to the root is because the root
> directory *was* modified by r31016 by the bubble-up addition of the file
> which originally lived in /trunk/notes, but was later moved into the
> tests/cmdline/ directory.
>
Ah I see, thanks for explaining. So the directory's log contains all the
changes made in its subtree, except for all those changes that were once
made in a different location before their files were moved into the subtree.
Isn't that kind of quirky?
> I can see how this can cause confusion, but welcome to versioned
> directories. :-)
We all should get a little badge whenever we overcome another level of
naiveness, and discover more complexity... ;)
~Neels
(btw, I understand now why my recipe didn't reproduce the error: the
directory moved_to_dir was created in revision 1 and had the log on it anyway.)
--
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696 mobile: +49 177 2345869 fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Received on 2008-10-24 02:31:49 CEST