apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.65k stars 1.03k forks source link

Convert build to work with Git rather than SVN. [LUCENE-6938] #7996

Closed asfimport closed 8 years ago

asfimport commented 8 years ago

We assume an SVN checkout in parts of our build and will need to move to assuming a Git checkout.

Patches against https://github.com/dweiss/lucene-solr-svn2git from #7991.


Migrated from LUCENE-6938 by Mark Miller (@markrmiller), resolved Jan 24 2016 Attachments: LUCENE-6938.patch (versions: 4), LUCENE-6938-1.patch, LUCENE-6938-wc-checker.patch (versions: 2) Linked issues:

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 0d53dce184674dfc8c23879c0e0648b0bd6ae1b8 in lucene-solr's branch refs/heads/branch_5_4 from @uschindler https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0d53dce

LUCENE-6938: Add WC checks back, now based on JGit

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit b0e769c3ec598dd7398cc8df123bc4c41069e2c3 in lucene-solr's branch refs/heads/branch_5_4 from @uschindler https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b0e769c

8052, LUCENE-6938: Add branch change trigger to common-build.xml to keep sane build on GIT branch change

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 7a329d4e299f364a716ca7e3d786684f280d0100 in lucene-solr's branch refs/heads/branch_5_5 from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7a329d4

LUCENE-6938: switch from svn to git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 8b71a1baf5b9c6d16d24134cebeaf7f22333580d in lucene-solr's branch refs/heads/branch_5x from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8b71a1b

LUCENE-6938: switch from svn to git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 70e61fd9e04ba0312b9c1d3f6d6e8313ab0dce75 in lucene-solr's branch refs/heads/master from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=70e61fd

LUCENE-6938: switch from svn to git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 2514521b5506760f81a4c23b0685769e4eefea88 in lucene-solr's branch refs/heads/master from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2514521

LUCENE-6938: addVersion can no longer do a --reord-only merge with git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 329167872371d19f37f9f48f1822014dc87a7eb6 in lucene-solr's branch refs/heads/branch_5_5 from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3291678

LUCENE-6938: switch from svn to git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 144ab5b107aeb7cf79d7e5fd97b8ff5d2ba2ba2f in lucene-solr's branch refs/heads/branch_5x from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=144ab5b

LUCENE-6938: switch from svn to git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit f8be973b9473a250ba50746a0b548f6521f012ed in lucene-solr's branch refs/heads/master from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f8be973

LUCENE-6938: switch from svn to git

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit e3a06f0334034c1280f416b4afd6a6249cda395e in lucene-solr's branch refs/heads/branch_5_5 from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e3a06f0

LUCENE-6938: fix buggy detection of dirty git checkout

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 9a4ff707ed8d4aafa20dd3cc9c0fd4c7378046f2 in lucene-solr's branch refs/heads/branch_5_5 from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9a4ff70

LUCENE-6938: add TODO that we should also detect unpushed commits

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 3989732f70df3981ad0533929f64af3a8d30b92d in lucene-solr's branch refs/heads/branch_5x from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3989732

LUCENE-6938: fix buggy detection of dirty git checkout

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 9fe6a8f20a8e6ff1fded6379a096db2e390c9675 in lucene-solr's branch refs/heads/branch_5x from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9fe6a8f

LUCENE-6938: add TODO that we should also detect unpushed commits

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit de9d4ac3b7370df8e3fd5418b7811ecb44c62998 in lucene-solr's branch refs/heads/master from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=de9d4ac

LUCENE-6938: fix buggy detection of dirty git checkout

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 7509b9c9691514c3f6c231a35f29e340b3484fc1 in lucene-solr's branch refs/heads/master from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7509b9c

LUCENE-6938: add TODO that we should also detect unpushed commits

asfimport commented 8 years ago

David Smiley (@dsmiley) (migrated from JIRA)

+1 to that! It can be frustrating to forget to push and find other people expectantly not seeing what you said you did.

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 0cd6d229b3c7d73e7d83eb687c2862fa8eeeb703 in lucene-solr's branch refs/heads/branch_5_5 from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0cd6d22

LUCENE-6938: fix some places in smoke tester to accept git commit hash instead of svn revison

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 383c3ca976a3f216afbfdfbff02619a21dbd2d9c in lucene-solr's branch refs/heads/branch_5x from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=383c3ca

LUCENE-6938: fix some places in smoke tester to accept git commit hash instead of svn revison

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 4d094975d96455fae1877b0a7ee2dafef83a5828 in lucene-solr's branch refs/heads/master from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4d09497

LUCENE-6938: fix some places in smoke tester to accept git commit hash instead of svn revison

Conflicts: dev-tools/scripts/smokeTestRelease.py

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit f6a1bbf8bec8b83ce68b697b9905048b44ef80f6 in lucene-solr's branch refs/heads/branch_5_5 from @sarowe https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f6a1bbf

8259, LUCENE-6938: fix smoke tester to pull pom.xml.template files from the Solr source distribution instead of from svn

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 0bc239b16a1f411ab9c3426dbf8190019356edc0 in lucene-solr's branch refs/heads/branch_5x from @sarowe https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0bc239b

8259, LUCENE-6938: fix smoke tester to pull pom.xml.template files from the Solr source distribution instead of from svn

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit ef965661abf108f10b3da78aaec27576a7ef00c7 in lucene-solr's branch refs/heads/master from @sarowe https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ef96566

8081, LUCENE-6938: fix smoke tester to pull pom.xml.template files from the Solr source distribution instead of from svn

(cherry-picked branch_5_5 commit f6a1bbf)

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit 7105d451777c2c30e7f2b48260265b352fbb3472 in lucene-solr's branch refs/heads/branch_5_5 from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7105d45

LUCENE-6938: addVersion can no longer do a --reord-only merge with git (cherry picked from commit 2514521)

asfimport commented 8 years ago

Shawn Heisey (@elyograg) (migrated from JIRA)

Thanks, @mikemccand. That last commit made the script run with a "5.5.1" argument.

One problem, though: It added the new LUCENE_5_5_1 version as already deprecated, which caused ant test -Dtestcase=TestVersion to fail. Removing the deprecation allowed the test to pass.

asfimport commented 8 years ago

Chris M. Hostetter (@hossman) (migrated from JIRA)

that sounds correct ... on the 5.5 branch LUCENE_5_5_1 should not be deprecated ... but on all subsequent branches (6x, 6_1, master) it should be.

asfimport commented 8 years ago

Jan Høydahl (@janhoy) (migrated from JIRA)

It was I who cherry-picked Mike's fix to the 5_5 branch, but the git mail bot logs author, not committer :) I also saw the same regarding deprecation. Had to remove the deprecations manually, then tests pass. Should the script have a switch for skipping deprecation? A bit unclear to me after reading RM docs: Should bugfix version bump be performed by RM after releasing previous minor release, or by the be done by the RM for the bugfix release just prior to release?

asfimport commented 8 years ago

Shawn Heisey (@elyograg) (migrated from JIRA)

Apologies for the incorrect credit.

I've never done it, but ReleaseTodo seems to indicate that running addVersion is done as one of the early steps in the process.

For major and minor releases, I think this makes sense, because you'll be making a new branch early in the process. At that point the parent branch should get a version bump, and the subsequent release work will be done in the new branch, presumably with the correct version number already present.

For bugfix releases, I think it makes more sense to run addVersion just after tagging the release – one of the last steps. That would have prevented the problem I ran into. I ran "ant package" on branch_5_5 some time after 5.5.0 was fully released, but I got 5.5.0-SNAPSHOT filenames instead of 5.5.1-SNAPSHOT.

Regarding the brand-new bug-fix Version entry being deprecated: This makes no sense to me, especially since it causes an immediate test failure in the test that the addVersion script runs after making changes. I can see with "git diff" that the script did correctly add deprecation annotations to LUCENE_5_5_0.

If the addVersion script were being used to add 5.5.1 to one of the 6x branches or the master branch, then it WOULD make sense for the new entry to be deprecated. Perhaps I was not using the script correctly for my use case, or the script needs some detection code or the option you mentioned to skip deprecation.

asfimport commented 8 years ago

Ryan Ernst (@rjernst) (migrated from JIRA)

It looks like the branch detection logic isn't working given our current naming conventions we have in git now. This is the current logic, which worked in svn:

  if branchName == b'master':
    return 'master'
  if branchName.startswith(b'branch_'):
    return 'stable'
  if branchName.startswith(b'lucene_solr_'):
    return 'release'

But we now name our release branches like branch_5_5 instead of lucene_solr_5_5. So in this case, the script thought it was a stable branch, and thus the version was added as deprecated.

asfimport commented 8 years ago

Jan Høydahl (@janhoy) (migrated from JIRA)

Opened #8210 for this, keeping this JIRA as resolved.

asfimport commented 8 years ago

ASF subversion and git services (migrated from JIRA)

Commit c19b1b90c9812c48712fbaf1b55af49169993766 in lucene-solr's branch refs/heads/branch_5x from Mike McCandless https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c19b1b9

LUCENE-6938: addVersion can no longer do a --reord-only merge with git (cherry picked from commit 2514521)