Lucene - Core
  1. Lucene - Core
  2. LUCENE-5385

make precommit work for svn 1.8 or git checkouts

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New
    1. LUCENE-5385.patch
      2 kB
      Uwe Schindler
    2. LUCENE-5385.patch
      2 kB
      Robert Muir
    3. LUCENE-5385-classpath.patch
      1 kB
      Robert Muir

      Issue Links

        Activity

        Hide
        ASF subversion and git services added a comment -

        Commit 1556047 from Uwe Schindler in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1556047 ]

        Merged revision(s) 1556046 from lucene/dev/trunk:
        LUCENE-5385: further optimize "fake check" to be as cheap as possible

        Show
        ASF subversion and git services added a comment - Commit 1556047 from Uwe Schindler in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1556047 ] Merged revision(s) 1556046 from lucene/dev/trunk: LUCENE-5385 : further optimize "fake check" to be as cheap as possible
        Hide
        ASF subversion and git services added a comment -

        Commit 1556046 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1556046 ]

        LUCENE-5385: further optimize "fake check" to be as cheap as possible

        Show
        ASF subversion and git services added a comment - Commit 1556046 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1556046 ] LUCENE-5385 : further optimize "fake check" to be as cheap as possible
        Hide
        ASF subversion and git services added a comment -

        Commit 1556013 from Uwe Schindler in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1556013 ]

        Merged revision(s) 1556012 from lucene/dev/trunk:
        LUCENE-5385: add missing folder & svn:ignore

        Show
        ASF subversion and git services added a comment - Commit 1556013 from Uwe Schindler in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1556013 ] Merged revision(s) 1556012 from lucene/dev/trunk: LUCENE-5385 : add missing folder & svn:ignore
        Hide
        ASF subversion and git services added a comment -

        Commit 1556012 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1556012 ]

        LUCENE-5385: add missing folder & svn:ignore

        Show
        ASF subversion and git services added a comment - Commit 1556012 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1556012 ] LUCENE-5385 : add missing folder & svn:ignore
        Hide
        ASF subversion and git services added a comment -

        Commit 1555983 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1555983 ]

        LUCENE-5385: minimize this file some, remove a bunch of bogus stuff

        Show
        ASF subversion and git services added a comment - Commit 1555983 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1555983 ] LUCENE-5385 : minimize this file some, remove a bunch of bogus stuff
        Hide
        ASF subversion and git services added a comment -

        Commit 1555982 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1555982 ]

        LUCENE-5385: minimize this file some, remove a bunch of bogus stuff

        Show
        ASF subversion and git services added a comment - Commit 1555982 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1555982 ] LUCENE-5385 : minimize this file some, remove a bunch of bogus stuff
        Hide
        ASF subversion and git services added a comment -

        Commit 1555981 from Uwe Schindler in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1555981 ]

        Merged revision(s) 1555980 from lucene/dev/trunk:
        LUCENE-5385: Small update to fail on other fatal SVN errors

        Show
        ASF subversion and git services added a comment - Commit 1555981 from Uwe Schindler in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1555981 ] Merged revision(s) 1555980 from lucene/dev/trunk: LUCENE-5385 : Small update to fail on other fatal SVN errors
        Hide
        ASF subversion and git services added a comment -

        Commit 1555980 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1555980 ]

        LUCENE-5385: Small update to fail on other fatal SVN errors

        Show
        ASF subversion and git services added a comment - Commit 1555980 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1555980 ] LUCENE-5385 : Small update to fail on other fatal SVN errors
        Hide
        Robert Muir added a comment -

        One problem i had testing this issue, is the massive, massive 391-line long .gitignore.

        this is unarguably bogus!

        Show
        Robert Muir added a comment - One problem i had testing this issue, is the massive, massive 391-line long .gitignore. this is unarguably bogus!
        Hide
        ASF subversion and git services added a comment -

        Commit 1555974 from Uwe Schindler in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1555974 ]

        Merged revision(s) 1555973 from lucene/dev/trunk:
        LUCENE-5385: Make precommit work for svn 1.8 or git checkouts

        Show
        ASF subversion and git services added a comment - Commit 1555974 from Uwe Schindler in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1555974 ] Merged revision(s) 1555973 from lucene/dev/trunk: LUCENE-5385 : Make precommit work for svn 1.8 or git checkouts
        Hide
        Uwe Schindler added a comment -

        I committed the improved check and Robert's lib directory fixes.

        I keep the issue open for further improvements with GIT.

        Show
        Uwe Schindler added a comment - I committed the improved check and Robert's lib directory fixes. I keep the issue open for further improvements with GIT.
        Hide
        ASF subversion and git services added a comment -

        Commit 1555973 from Uwe Schindler in branch 'dev/trunk'
        [ https://svn.apache.org/r1555973 ]

        LUCENE-5385: Make precommit work for svn 1.8 or git checkouts

        Show
        ASF subversion and git services added a comment - Commit 1555973 from Uwe Schindler in branch 'dev/trunk' [ https://svn.apache.org/r1555973 ] LUCENE-5385 : Make precommit work for svn 1.8 or git checkouts
        Hide
        Robert Muir added a comment -

        much better: +1

        Show
        Robert Muir added a comment - much better: +1
        Hide
        Uwe Schindler added a comment -

        Here is my improved patch. I added a "fake" check at the early beginning (a really cheap one, it retrieves the status of the WC directory itsself, without any network access or recursing).

        It then picks some error codes and prints a correct warning.

        Show
        Uwe Schindler added a comment - Here is my improved patch. I added a "fake" check at the early beginning (a really cheap one, it retrieves the status of the WC directory itsself, without any network access or recursing). It then picks some error codes and prints a correct warning.
        Hide
        Robert Muir added a comment -

        patch for the missing lib/ stuff.

        I guess i think its bogus that lucene/tools depends on jars in lucene/test-framework without even calling 'resolve' first. I think it should just depend on ant itself for now? this is how the other modules are done.

        its also confusing lucene/test-framework doesnt just depend on its own lib/ but instead junit-path + ant-path (which add up to that, but i dont like it). These paths are separately needed for e.g. running tests and other things, but shouldnt be used here.

        Show
        Robert Muir added a comment - patch for the missing lib/ stuff. I guess i think its bogus that lucene/tools depends on jars in lucene/test-framework without even calling 'resolve' first. I think it should just depend on ant itself for now? this is how the other modules are done. its also confusing lucene/test-framework doesnt just depend on its own lib/ but instead junit-path + ant-path (which add up to that, but i dont like it). These paths are separately needed for e.g. running tests and other things, but shouldnt be used here.
        Hide
        Uwe Schindler added a comment -

        Wecould also check the error code in the SVNException:
        e.getErrorMessage().getErrorCode() and use that in a switch statement:

        • WC_UNSUPPORTED_FORMAT
        • some other error code if no WC at all

        I will try this out later! But in any case we can add a "fake" check before that does nothing. I will post a patch soon.

        Show
        Uwe Schindler added a comment - Wecould also check the error code in the SVNException: e.getErrorMessage().getErrorCode() and use that in a switch statement: WC_UNSUPPORTED_FORMAT some other error code if no WC at all I will try this out later! But in any case we can add a "fake" check before that does nothing. I will post a patch soon.
        Hide
        Robert Muir added a comment -

        The biggest thing i dont like, is the ignoring of any svn exceptions in the main processing loop.
        I guess I would prefer if we had something like this instead:

        // explicit sanity check to see if its even an svn checkout with a supported version
        try {
          statusClient.getVersionOrSomeOtherTrivialOperation();
        } catch (SVNException e) {
          task.log("unsupported....")
        }
        
        Show
        Robert Muir added a comment - The biggest thing i dont like, is the ignoring of any svn exceptions in the main processing loop. I guess I would prefer if we had something like this instead: // explicit sanity check to see if its even an svn checkout with a supported version try { statusClient.getVersionOrSomeOtherTrivialOperation(); } catch (SVNException e) { task.log( "unsupported...." ) }
        Hide
        Robert Muir added a comment -

        The first thing to tackle is the svn status check. Here is a start to that.

        Precommit will still fail (depending on what tasks have been run earlier) for other reasons on e.g. git, because it doesnt have the lib/ empty directories.

        Show
        Robert Muir added a comment - The first thing to tackle is the svn status check. Here is a start to that. Precommit will still fail (depending on what tasks have been run earlier) for other reasons on e.g. git, because it doesnt have the lib/ empty directories.

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development