Using the log command in svn, how do you view files added under a merged folder?

StackOverflow https://stackoverflow.com/questions/23629792

  •  21-07-2023
  •  | 
  •  

Question

I have an issue where the outermost folder of my change was marked as added, but its contents are marked as normal during a merge. When later going to view this commit in the log only the folder is recorded as changed, not the files inside it:

C:\\>svn log svn://repository/Trunk -r 3:HEAD -v
r3 | mangotastic | 2014-05-12 10:11:14 +0100 (Mon, 12 May 2014) | 4 lines
M /Trunk/Scripts
A /Trunk/Scripts/AutomatedDeploy (from /Branches/NewDevelopment/Scripts/AutomatedDeploy:3)

I performed these exact steps when encountering these issues:

  1. Added a new folder, and several files to my branch (using TortoiseSvn > Add)
  2. Merged the single revision to my Trunk (TortoiseSvn commit dialog showed files with normal status)
  3. Viewed the log on my Trunk (and noticed there was no information recorded for the files)

Is there any way to prevent the folder/files merging this way, or perform a more intensive query to the log?

I'm using TortoiseSvn to do the merge, and using SharpSvn to read the merge in a monitoring application (though I see the same issue using the log command).

Was it helpful?

Solution

I tried something similar :

  • created a blank repository
  • branched to a new branch
  • Added a folder, and 2 files
  • Clicked add
  • Clicked commit. Commit message shows 3 files to be committed - the folder and both files.
  • Switched the working directory folder to trunk
  • merged from the branch.
  • Commited trunk - trunk now has those files merged in.
  • Clicked log - can confirm that only folder is shown.
  • When viewing log, with all options (show only affected paths, stop on copy/rename, include merged revisions) unticked that only 2 revisions are shown (version 1, Version 4).

In this scenario, version 4 shows addition of the new folder only.

Clicking "Include Merged revisions" adds versions 2 and 3 to the log.

Clicking on version 3 shows the folder and files being added to the repository.

Currently looking at trying this with a command line app (SVN v1.8) - currently SVN commandline 1.6, TSVN =1.7.7

Update : Viewing the log using --user-merge-history supplies the required info - use -v also :

svn log -v --use-merge-history

gives a log similar to :

c:\Projects\test1>svn log -v --use-merge-history
------------------------------------------------------------------------
r7 | computa_mike | 2014-05-13 14:32:04 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   M /trunk
   A /trunk/New folder2 (from /branches/test2/New folder2:6)

Adding a new folder and file
------------------------------------------------------------------------
r6 | computa_mike | 2014-05-13 13:16:25 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   A /branches/test2/New folder2
   A /branches/test2/New folder2/New Text Document.txt
Merged via: r7

test
------------------------------------------------------------------------
r5 | computa_mike | 2014-05-13 13:14:38 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   A /branches/test2 (from /trunk:4)
Merged via: r7


------------------------------------------------------------------------
r4 | computa_mike | 2014-05-13 13:05:07 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   M /trunk
   A /trunk/NewFolder (from /branches/test1/NewFolder:3)

Committing changes to these files.
------------------------------------------------------------------------
r3 | computa_mike | 2014-05-13 13:03:46 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   A /branches/test1/NewFolder
   A /branches/test1/NewFolder/New Text Document (2).txt
   A /branches/test1/NewFolder/New Text Document.txt
Merged via: r4

Committed new folder and files
------------------------------------------------------------------------
r2 | computa_mike | 2014-05-13 13:01:10 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   A /branches/test1 (from /trunk:1)
Merged via: r4

test1 branch created
------------------------------------------------------------------------
r1 | computa_mike | 2014-05-13 12:58:53 +0100 (Tue, 13 May 2014) | 1 line
Changed paths:
   A /branches
   A /tags
   A /trunk

Imported folder structure
------------------------------------------------------------------------
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top