<div dir="ltr"><div>Hi Nicolás,</div><div><br></div><div>It is discussed on the KDE svn2git page. They talk about how to fix missing parents:</div><div><a href="https://techbase.kde.org/Projects/MoveToGit/UsingSvn2Git#Post-processing">https://techbase.kde.org/Projects/MoveToGit/UsingSvn2Git#Post-processing</a></div><div><br></div><div>This is exactly what I am describing in the previous email. </div><div><br></div><div>You can see it in the history of the git repository. Here is an example from one I converted.</div><div><br></div><div>The commit message was:</div><div><span style="text-align:left;color:rgb(153,153,153);text-transform:none;text-indent:0px;letter-spacing:normal;font-size:14px;font-variant:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none;background-color:transparent"><font face="arial narrow,sans-serif"><b><i>refactor parser-api structure to be a module; add scm/developerConnection tags to pom</i></b></font></span></div><div><span style="text-align:left;color:rgb(153,153,153);text-transform:none;text-indent:0px;letter-spacing:normal;font-size:14px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none;background-color:transparent"><font face="arial narrow,sans-serif"><b><i><br></i></b></font></span></div><div><font color="#003000" face="arial,helvetica,sans-serif">Now the developer was 'updating' the pom.xml, that is clear from the commit message.</font></div><div><font color="#000000">But, from gits perspective this is a new file, and pom.xml is recorded as being <i><u>added</u></i> to version control.</font></div><div><font color="#b00000"><br></font></div><div><font color="#007600"><span style="font:400 13.33px arial,sans-serif;text-align:left;color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:transparent">The parent commit is missing from the history. </span></font></div><div><font color="#007600"><b><br></b></font></div><div><font color="#000000">The commit has no parents according to git. But the commit has a parent in svn, and I can find the revision for it.</font></div><div><font color="#000000">If I convert the 'Modules' directory to git using 'svn2git':</font></div><div><br></div><div><font color="#000000">match /projects/Modules/</font></div><div><br></div><div><font color="#000000"> I can find the commit of the parent recorded in the history for the 'Modules' directory. </font><font color="#000000">Does this not point to</font></div><div><font color="#000000">history being recorded in different places depending on how you do your checkout in SVN?</font><br></div><div><span style="text-align:left;color:rgb(153,153,153);text-transform:none;text-indent:0px;letter-spacing:normal;font-size:14px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none"><font face="arial,helvetica,sans-serif"><font color="#000000"><font color="#000000"></font><font color="#000000"></font><br></font></font></span></div><span style="text-align:left;color:rgb(153,153,153);text-transform:none;text-indent:0px;letter-spacing:normal;font-size:14px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none"><font face="arial,helvetica,sans-serif"><div><font color="#000000" size="2" style="background-color:rgb(255,255,255)">Regards,</font></div><div><font color="#000000" size="2" style="background-color:rgb(255,255,255)">John</font></div><div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><font size="2"></font><font size="2"></font><font style="background-color:rgb(255,255,255)"></font><font color="#000000"></font><br></div></font></span><span style="text-align:left;color:rgb(153,153,153);text-transform:none;text-indent:0px;letter-spacing:normal;font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;word-spacing:0px;display:inline;white-space:pre-wrap;float:none;background-color:transparent"><div><font style="background-color:rgb(255,255,255)"></font><font color="#000000"></font><br></div></span><div><b><br></b></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 December 2017 at 05:32, Nicolás Alvarez <span dir="ltr"><<a href="mailto:nicolas.alvarez@gmail.com" target="_blank">nicolas.alvarez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2017-12-17 2:09 GMT-03:00 John Lawlor <<a href="mailto:jk.lawlor@gmail.com">jk.lawlor@gmail.com</a>>:<br>
> Hi,<br>
><br>
> I have encountered this problem with svn2git. It may be more to do with poor<br>
> repository structure in SVN, but it's worth highlighting all the same.<br>
><br>
> Let's say we have the following in SVN:<br>
><br>
> svn/projects/Modules/<wbr>framework/file-appender/trunk<br>
> svn/projects/Modules/<wbr>framework/file-appender/<wbr>branches<br>
> svn/projects/Modules/<wbr>framework/file-appender/tags<br>
><br>
> svn/projects/Modules/<wbr>framework/file-manager/trunk<br>
> svn/projects/Modules/<wbr>framework/file-manager/<wbr>branches<br>
> svn/projects/Modules/<wbr>framework/file-manager/tags<br>
><br>
> This is a pretty standard layout. However, for some reason the SVN<br>
> administrator gave developers write access to Modules. Really, I think<br>
> Modules should never have existed, it should probably be more like:<br>
><br>
> svn/projects/file-appender<br>
> svn/projects/file-manager<br>
><br>
> This results in several places for history to be recorded in the SVN tree.<br>
> If someone checks out 'Modules', they can make commits above 'trunk' into<br>
> say file-appender:<br>
><br>
> (from svn log)<br>
><br>
> Changed paths:<br>
> A Modules/framework/file-<wbr>manager/trunk/pom.xml<br>
><br>
> If you subsequently convert file-appender to git, using a rule like:<br>
><br>
> match /projects/Modules/framework/<wbr>file-appender/trunk<br>
><br>
> the commit recorded at the Modules level will not appear in your converted<br>
> repository. This makes sense as the commit wasn't made in 'trunk', it was<br>
> made at 'Modules'.<br>
><br>
> I am just wondering if this is really a problem or not. You might be missing<br>
> the commit but I am thinking, should 'pom.xml' be modified later at 'trunk',<br>
> the contents of the file will still be there from the commit made in the<br>
> wrong place.<br>
><br>
> What can and does happen though is if the file is never modified in 'trunk',<br>
> after being created in 'Modules', it will be lost. It has no history in<br>
> trunk, hence it doesn't exist.<br>
<br>
I have no idea what you mean with "several places for history to be<br>
recorded in the SVN tree" or "at the Modules level" etc...<br>
<br>
If someone modifies<br>
/projects/Modules/framework/<wbr>file-appender/trunk/pom.xml, then "match<br>
/projects/Modules/framework/<wbr>file-appender/trunk/" will obviously match<br>
it, since it's a prefix of the full path being modified. It doesn't<br>
matter what you checked out when making the commit. Checking out /a/b<br>
and making a change to c/d.txt and checking out /a and making a change<br>
to b/c/d.txt gives exactly the same result: a commit that changes<br>
/a/b/c/d.txt. The two cases aren't distinguishable in the resulting<br>
SVN repository, and svn2git will work the same.<br>
<br>
I see in your example you mention a change is done in file-manager,<br>
and then you convert file-appender. I assume that's just a mistake in<br>
your email? :)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Nicolás<br>
Award-winning git repo surgeon<br>
</font></span></blockquote></div><br></div>