Re: [PATCHv4 1/1] git-p4: add unshelve command

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

 



On 21 May 2018 at 08:07, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:
>
>>> diff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh
>>> new file mode 100755
>>> index 0000000000..cca2dec536
>
> ... in short, I'd queue a fix-up on top like this to be later
> squashed after getting an ack?

That looks good to me, thanks! Ack.

Luke

>
>  t/t9832-unshelve.sh | 23 ++++-------------------
>  1 file changed, 4 insertions(+), 19 deletions(-)
>
> diff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh
> index cca2dec536..3513abd21a 100755
> --- a/t/t9832-unshelve.sh
> +++ b/t/t9832-unshelve.sh
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>
> -last_shelved_change() {
> +last_shelved_change () {
>         p4 changes -s shelved -m1 | cut -d " " -f 2
>  }
>
> @@ -17,7 +17,7 @@ test_expect_success 'init depot' '
>                 cd "$cli" &&
>                 echo file1 >file1 &&
>                 p4 add file1 &&
> -               p4 submit -d "change 1"
> +               p4 submit -d "change 1" &&
>                 : >file_to_delete &&
>                 p4 add file_to_delete &&
>                 p4 submit -d "file to delete"
> @@ -120,29 +120,14 @@ EOF
>         )
>  '
>
> -diff_adds_line() {
> -       text="$1" &&
> -       file="$2" &&
> -       grep -q "^+$text" $file || (echo "expected \"text\" $text not found in $file" && exit 1)
> -}
> -
> -diff_excludes_line() {
> -       text="$1" &&
> -       file="$2" &&
> -       if grep -q "^+$text" $file; then
> -               echo "unexpected text \"$text\" found in $file" &&
> -               exit 1
> -       fi
> -}
> -
>  # Now try to unshelve it. git-p4 should refuse to do so.
>  test_expect_success 'try to unshelve the change' '
>         test_when_finished cleanup_git &&
>         (
>                 change=$(last_shelved_change) &&
>                 cd "$git" &&
> -               ! git p4 unshelve $change >out.txt 2>&1 &&
> -               grep -q "cannot unshelve" out.txt
> +               test_must_fail git p4 unshelve $change 2>err.txt &&
> +               grep -q "cannot unshelve" err.txt
>         )
>  '
>




[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