Re: [PATCH 1/2] git-p4: add failing test for shelved CL update involving move

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 13, 2019 at 8:58 AM Luke Diamand <luke@xxxxxxxxxxx> wrote:
> Updating a shelved P4 changelist where one or more of the files have
> been moved does not work. Add a test for this.

Perhaps this message could give more detail about the actual problem
than the generic "does not work" which provides no useful information.

> Signed-off-by: Luke Diamand <luke@xxxxxxxxxxx>
> ---
> diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh
> @@ -500,6 +500,12 @@ test_expect_success 'submit --shelve' '
> +last_shelve() {
> +       change=$(p4 -G changes -s shelved -m 1 //depot/... | \
> +               marshal_dump change)
> +       echo $change
> +}

A simpler definition for this function would be:

last_shelve () {
    p4 -G changes -s shelved -m 1 //depot/... | marshal_dump change
}

which will give the same result when you later capture its output with:

    change=$(last_shelve) &&

> @@ -533,12 +539,53 @@ test_expect_success 'submit --update-shelve' '
>         ) &&
>         (
>                 cd "$cli" &&
> -               change=$(p4 -G changes -s shelved -m 1 //depot/... | \
> -                        marshal_dump change) &&
> +               change=$(last_shelve) &&
>                 p4 unshelve -c $change -s $change &&
>                 grep -q updated-line shelf.t &&
>                 p4 describe -S $change | grep added-file.t &&
> -               test_path_is_missing shelved-change-1.t
> +               test_path_is_missing shelved-change-1.t &&
> +               p4 revert ...
> +       )
> +'



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux