<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
        <base href="https://hibernate.atlassian.net"> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0" bgcolor="#f5f5f5"> 
            <!-- header here --> 
            <tbody>
                <tr> 
                    <td id="header-pattern-container" style="padding: 0; border-collapse: collapse; padding: 10px 20px"> 
                        <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                            <tbody>
                                <tr> 
                                    <td id="header-avatar-image-container" valign="top" style="padding: 0; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="https://avatar-cdn.atlassian.com/2a8bdd4ffd282b7185c74b52ab452617?s=48&amp;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F2a8bdd4ffd282b7185c74b52ab452617%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td> 
                                    <td id="header-text-container" valign="middle" style="padding: 0; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="yrodiere" id="email_yrodiere" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=yrodiere" style="color:#6c797f;; color: #3b73af; text-decoration: none">Yoann Rodière</a> <strong>commented</strong> on <a href="https://hibernate.atlassian.net/browse/HSEARCH-3179" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-2bf7331f-f461-46fa-bbb2-f837dda99ca4" height="16" width="16" border="0" align="absmiddle" alt="Task"> HSEARCH-3179</a> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="email-content-container" style="padding: 0; border-collapse: collapse; padding: 0 20px"> 
                        <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; border-spacing: 0; border-collapse: separate"> 
                            <tbody>
                                <tr> 
                                    <!-- there needs to be content in the cell for it to render in some clients --> 
                                    <td class="email-content-rounded-top mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <td style="vertical-align: top;; padding: 0; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3179" style="color: #3b73af; text-decoration: none">Re: Search 6 groundwork - Merge the Search 6 Proof-of-concept into the main repository</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-pattern" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; border-bottom: none; padding-bottom: 0" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0; border-collapse: collapse; padding: 0 0 10px"> <p style="margin: 10px 0 0; margin-top: 0">So, the script now seems to be working, and I added a few commits to my branch to make the build work again (it builds both the new code and the legacy code). The Elasticsearch 2 build will fail, obviously, since the Search 6 POC targets ES 5 and has no support for dialects yet, but that's just temporary.</p> <p style="margin: 10px 0 0">In order for the merge to be clean, there is more to do, most notably merge the dependency management from legacy/pom.xml to pom.xml, convert the distribution module to include all artifacts (new and legacy code) and merge the two versions of the "shared-test-resources" modules.<br> But at least it works, and we can play around.</p> <p style="margin: 10px 0 0">In short, the script will:</p> 
                                                        <ul> 
                                                            <li>prepare the two branches, most notably by renaming packages in the Search 6 POC branch to not mention the "v6poc" package</li> 
                                                            <li>move most code to the legacy/ directory in the Search 5 branch</li> 
                                                            <li>merge the Search 6 POC code into the Search 5 branch</li> 
                                                        </ul> <p style="margin: 10px 0 0">There are two methods available to do this, both producing the exact same file tree, but a different git history:</p> 
                                                        <ul> 
                                                            <li>By default (mainly because it's much faster), no history rewriting will be performed, even on the Search 6 POC branch. We will append commits to each branch to prepare it for the merge. This means in particular we will add a massive commit to perform the removal of the "v6poc" package in the Search 6 POC branch, moving every single Java file to a different directory.</li> 
                                                            <li>With the "-r" option, history rewriting will be used as necessary on the Search 6 POC branch. This means in particular that the package changes will be applied to the whole history (resulting in a history where the "v6poc" package never existed), and that the Search 6 POC branch will be rebased on top of the Search 5 branch before merging.</li> 
                                                        </ul> <p style="margin: 10px 0 0">In case it's not obvious: the Search 5 history will *<b>never</b>* be rewritten. This history is public, has been for a long time, and we don't want to mess with existing clones and forks.</p> <p style="margin: 10px 0 0">Both methods will involve file moves (be it only because we will have to merge back Search 5 files into Search 6).<br> This means the full history of a particular moved file will only be visible when using "git log --follow – &lt;file&gt;",<br> or "git log – &lt;file&gt;' with the right configuration option: "git config --global log.follow 1".<br> IDEs (at least IDEA) enable the "--follow" option by default when looking at the history of a file.</p> <p style="margin: 10px 0 0">However, the methods differ subtly in how history will look like after the merge.</p> <h3 style="margin: 10px 0 0; font-size: 16px; line-height: 1.563; margin: 30px 0 0"><a name="Comparisonofthetwomethods" style="color: #3b73af; text-decoration: none"></a>Comparison of the two methods</h3> <h4 style="margin: 10px 0 0; font-size: 14px; line-height: 1.500; margin: 20px 0 0; margin-top: 10px"><a name="Prosofthe%22rewrittenhistory%22method%3A" style="color: #3b73af; text-decoration: none"></a>Pros of the "rewritten history" method:</h4> 
                                                        <ul> 
                                                            <li>Preserves history for files copied from Search 5 to the POC: with "--follow", most files in Search 6<br> that were copied from Search 5 will have Search 5 commits in their history ("git log").</li> 
                                                            <li>Does not involve any file renaming commit for files created in the POC:<br> their full history will be visible even without "--follow".</li> 
                                                        </ul> <h4 style="margin: 10px 0 0; font-size: 14px; line-height: 1.500; margin: 20px 0 0"><a name="Prosofthe%22appendedcommit%22method%3A" style="color: #3b73af; text-decoration: none"></a>Pros of the "appended commit" method:</h4> 
                                                        <ul> 
                                                            <li>It's much faster, so it's ideal when testing.</li> 
                                                            <li>It doesn't change the commit IDs.</li> 
                                                        </ul> <h4 style="margin: 10px 0 0; font-size: 14px; line-height: 1.500; margin: 20px 0 0"><a name="TopologyoftheresultingGithistory" style="color: #3b73af; text-decoration: none"></a>Topology of the resulting Git history</h4> <p style="margin: 10px 0 0">Essentially, the "appended commit" method will result in this history:</p> 
                                                        <div class="preformatted panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="preformattedContent panelContent" style="padding: 9px 12px"> 
                                                                <pre style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; white-space: pre; word-break: normal; word-wrap: break-word; word-break: break-all; white-space: pre-wrap">o Some follow-up commit to make the build pass

o Some follow-up commit to make the build pass

o Some follow-up commit to make the build pass

M─┐ Merge commit
│ │ 
│ o Some commit to prepare for the merge in the Search 6 POC
│ │ 
│ o Some commit to prepare for the merge in the Search 6 POC
│ │ 
│ o Some commit to prepare for the merge in the Search 6 POC
│ │ 
│ o Last commit of Search 6 POC (same as the Search 6 POC master, same commit ID)
│ │
│ ...
│ │ 
│ │ 
│ I Initial commit of Search 6 POC (same as the Search 6 POC initial commit, same commit ID)

o Some commit to prepare for the merge in the Search 5 repository

o Some commit to prepare for the merge in the Search 5 repository

o Some commit to prepare for the merge in the Search 5 repository

o Last commit of Search 5 (same as the Search 5 repository master, same commit ID)

...
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">But the rewritten history method will result in this history:</p> 
                                                        <div class="preformatted panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="preformattedContent panelContent" style="padding: 9px 12px"> 
                                                                <pre style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; white-space: pre; word-break: normal; word-wrap: break-word; word-break: break-all; white-space: pre-wrap">o Some follow-up commit to make the build pass

o Some follow-up commit to make the build pass

o Some follow-up commit to make the build pass

M─┐ Merge commit
│ │ 
│ o Some commit to prepare for the merge in the Search 6 POC
│ │ 
│ o Some commit to prepare for the merge in the Search 6 POC
│ │ 
│ o Some commit to prepare for the merge in the Search 6 POC
│ │ 
│ o Last commit of Search 6 POC (commit ID is different from the Search 6 POC repository)
│ │
│ ...
│ │ 
│ │ 
│ o Initial commit of Search 6 POC (commit ID is different from the Search 6 POC repository)
│─┘
o Some commit to prepare for the merge in the Search 5 repository

o Some commit to prepare for the merge in the Search 5 repository

o Some commit to prepare for the merge in the Search 5 repository

o Last commit of Search 5 (same as the Search 5 repository master, same commit ID)

...
</pre> 
                                                            </div>
                                                        </div> <h4 style="margin: 10px 0 0; font-size: 14px; line-height: 1.500; margin: 20px 0 0"><a name="Seeforyourself" style="color: #3b73af; text-decoration: none"></a>See for yourself</h4> <p style="margin: 10px 0 0">You can find the result of executing the merge with each method on my repo:</p> 
                                                        <ul> 
                                                            <li>Rewritten history: <a href="https://github.com/yrodiere/hibernate-search/tree/HSEARCH-3179" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://github.com/yrodiere/hibernate-search/tree/HSEARCH-3179</a></li> 
                                                            <li>Appended commit: <a href="https://github.com/yrodiere/hibernate-search/tree/HSEARCH-3179-norewrite" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">https://github.com/yrodiere/hibernate-search/tree/HSEARCH-3179-norewrite</a></li> 
                                                        </ul> <p style="margin: 10px 0 0">In a few commands:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
cd &lt;your local clone of hibernate-search (not the POC)&gt;
git remote add yrodiere git@github.com:yrodiere/hibernate-search.git
git fetch
git checkout HSEARCH-3179
git checkout HSEARCH-3179-norewrite
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">The result is best viewed in your own local copy, with <tt>git log --graph</tt> or a tool such as <a href="https://jonas.github.io/tig/" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">tig</a> (press "G" to enable the graph mode).</p> <p style="margin: 10px 0 0">In particular, compare the output of this command on each branch:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
git log --follow backend-elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/impl/DefaultElasticsearchClient.java
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">In one case you'll have the full history, including Search 5 commits, but in the other you will only have Search 6 commits.</p> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> <script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "description": "View Issue",
  "potentialAction": {
    "@type": "ViewAction",
        "target": "https://hibernate.atlassian.net/browse/HSEARCH-3179?inbox=true&focusedCommentId=102566&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-102566",
    "name": "View Comment"
      },
  "publisher": {
    "@type": "Organization",
    "name": "Atlassian",
    "url": "https://www.atlassian.com"
  }
}
</script> 
                                        <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="actions-pattern-container" valign="middle" style="padding: 0; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                                        <table align="left" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                                            <tbody>
                                                                <tr> 
                                                                    <td class="actions-pattern-action-icon-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3179#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-12c183f2-e4b2-4afe-bd6e-ae6f68da2239" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td> 
                                                                    <td class="actions-pattern-action-text-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-3179#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td> 
                                                                </tr> 
                                                            </tbody>
                                                        </table> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <!-- there needs to be content in the cell for it to render in some clients --> 
                                <tr> 
                                    <td class="email-content-rounded-bottom mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="footer-pattern" style="padding: 0; border-collapse: collapse; padding: 12px 20px"> 
                        <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                            <tbody>
                                <tr> 
                                    <td id="footer-pattern-mobile-separated-links" class="mobile-resize-text" width="100%" colspan="2" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> Get Jira notifications on your phone! Download the Jira Cloud app for <a href="https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&amp;referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail" style="color: #3b73af; text-decoration: none">Android</a> or <a href="https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&amp;ct=EmailNotificationLink&amp;mt=8" style="color: #3b73af; text-decoration: none">iOS</a> 
                                        <hr> </td> 
                                </tr> 
                                <tr> 
                                    <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian Jira <span id="footer-build-information">(v1001.0.0-SNAPSHOT#100086-<span title="eddc2cc4d85651f17ffdf06e216d8d388e87181b" data-commit-id="eddc2cc4d85651f17ffdf06e216d8d388e87181b}">sha1:eddc2cc</span>)</span> </td> 
                                    <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                        <table style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="footer-pattern-logo-desktop-padding" style="padding: 0; border-collapse: collapse; padding-top: 3px; opacity: 0.150"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-7e66eb88-0935-4bef-9844-46c55ba1e7aa" alt="Atlassian logo" title="Atlassian logo" width="192" height="24" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    
<img src="https://u4043402.ct.sendgrid.net/wf/open?upn=YNXLe5Uzuivj8jGpuXra04BSJ-2BS7raa1puTAtyVUP-2F0UG25sB-2BHToWWBMcbXwnNUojSKEW95Qsf1J03pxUDmlmOYxQMJvW-2BhfKIpgZlSZwbjWr8o0DEa4CIQs-2Fk8uM61eZwzglHqt7kl-2FNoZqySxvaSLw-2FOc4MTAlZF6BSqx8EACF5dVfSlMIiMnhFN3yM-2BXcKF84hpm0axzs-2FJjEX3yTV-2BvkJdQzXrL2zsVGAfiliZyLlwAyKl7doqnnvAjJaGDdSv2DwR561qSvtsEklYJkSnqTWOpRFPgitIb859aBl6l0ZWCJJmErC6uY2tSTEagS7ohhubo20-2BprnVVm5JNw0xibSWpVGgoBIn2TFAGYkYmyHupxFm2bVV6ppKLQins-2Fns9bP8Y9dg0ieTfd1WwJ5rrF5Fd6mxDgiB0yZdcL2LR5jBAmGNuhsn6R8-2Brjiaju0WdJfYxKype6KdNxBajHQ-3D-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body>
</html>