Hi Ping,
I think your assumptions are correct.
I usually test patch with same repo after hard resetting that repo to its 
latest state. (i.e ./dev-support/bin/test-patch /tmp/1.patch)

Ajay

On 9/2/17, 12:37 AM, "Ping Liu" 
<[email protected]<mailto:[email protected]>> wrote:

    I have a patch for an Hadoop Jira issue.  I need test the patch.  I am
    following TestingPatchTips at https://wiki.apache.org/hadoop/TestPatchTips.

    I have difficulty in understanding the command option basedir and
    reset-repo.

    The best example is in Recommended Usage, the last part, where both basedir
    and reset-repo are used.

    *Recommended Usage*
    >
    > In general, the easiest way to use test-patch.sh is to use two repos. One
    > repo is used to build patches. The other repo is used to to test them.
    >
    > $ git diff --no-prefix trunk > /tmp/1.patch$ dev-support/bin/test-patch 
--resetrepo --run-tests --basedir=/test/repo /tmp/1.patch
    >
    >
    > This will run the freshly built patch against the tests in a fresh repo.
    >

    In above example, my understand is

    1. current location $ is the working repo - it contains changes and is
    where the patch is created from.

    2. dev-support/bin/test-patch is under $, therefore we need get into $ in
    order to run test-patch.

    3. /test/repo is the clean repo from current trunk.

    4. when running test-patch command, patch will be applied to /test/repo.

    Please let me know if my understanding is correct.

    So
       --basedir means the repo where the patch will be applied to and test
    will be performed on?

      --resetrepo means

       1. basedir (/test/repo) but not the current dir $ is allowed to be
       modified?
       2. also modified what?  What kind of modification is it?
       3. BTW, is resetrepo a typo for --reset-repo (missing a hyphen)?

    Any idea is highly appreciated!

    Ping

Reply via email to