On Fri 2021-01-29 at 23:35h, Stefan via TortoiseSVN wrote on tortoisesvn:
On Friday, January 29, 2021 at 6:01:05 PM UTC+1 Niklas Matthies wrote:
I was also wondering whether it shouldn't be possible to track the
paths in the log history via the Copy revisions, as the information
about the source ("from") and target path of the copy is available. At
least that's how I determine the correct path by hand when looking at
the log.
but you only get that if you show the log for a path upwards. If you show
the log for e.g. branches/myBranch, then you won't get that info for
branches/myBranch. Only if you show the log for branches, then you'll get
that copyfrom infor for branches/myBranch.
I don't think so? Here is an example (you can paste it into cmd.exe):
md c:\svntest
cd c:\svntest
svnadmin create repo
svn mkdir -m "New project" file:///c:/svntest/repo/myproject
svn mkdir -m "Add trunk" file:///c:/svntest/repo/myproject/trunk
svn mkdir -m "Add branches dir" file:///c:/svntest/repo/myproject/branches
svn checkout file:///c:/svntest/repo/myproject/trunk work\trunk
cd work
md trunk\subdir
svn add trunk\subdir
echo aaa > trunk\subdir\example.txt
svn add trunk\subdir\example.txt
svn commit -m "Add subdir/example.txt" trunk
svn copy -m "Create branch" trunk
file:///c:/svntest/repo/myproject/branches/branch
svn checkout file:///c:/svntest/repo/myproject/branches/branch branch
echo bbb > branch\subdir\example.txt
svn commit -m "Modify subdir/example.txt in branch" branch
svn move -m "Swapping branch with trunk (1/3)"
file:///c:/svntest/repo/myproject/trunk file:///c:/svntest/repo/myproject/temp
svn move -m "Swapping branch with trunk (2/3)"
file:///c:/svntest/repo/myproject/branches/branch file:///c:/svntest/repo/myproject/trunk
svn move -m "Swapping branch with trunk (3/3)"
file:///c:/svntest/repo/myproject/temp file:///c:/svntest/repo/myproject/branches/branch
svn log -v file:///c:/svntest/repo/myproject
svn log -v file:///c:/svntest/repo/myproject/branches
svn log -v file:///c:/svntest/repo/myproject/branches/branch
svn log -v file:///c:/svntest/repo/myproject/branches/branch/subdir
The log for /myproject/branches/branch/subdir for example consists of
the following three revisions and includes the copy information:
r9: copy /myproject/branches/branch -> /myproject/temp [Swapping branch with
trunk (3/3)]
r7: copy /myproject/trunk -> /myproject/temp [Swapping branch with trunk (1/3)]
r4: [Add subdir/example.txt]
From that information, one is able to deduce the correct source path
for e.g. copying from r4:
/myproject/branches/branch/subdir ->
/myproject/temp/subdir (from info in r9) ->
/myproject/trunk/subdir (from info in r7)
That is, one applies the copy information backwards if it is a prefix
of the current path.
It works in the same way when copying from the log of
/myproject/branches/branch (one level up).
The log for /myproject/branches also has the information, but when
copying from there, the info for the previous copies wouldn't apply,
because the respective paths aren't a prefix of "/myproject/branches".
And the result is correct because /myproject/branches itself didn't
change (wasn't copied/moved), hence a copy from an earlier revision
doesn't need a different source path.
Or am I missing something?
Niklas
--
You received this message because you are subscribed to the Google Groups
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tortoisesvn/20210130181951.374qxpi4iwf7kwfj%40nmhq.net.