git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Luke Diamand <luke@diamand.org>
Date
May 21, 2018, 14:59 UTC
Message-ID
<CAE5ih7-yW89W7zrZkGBAhEY3=WgK_CdJQYucP4URpqk43DqOKA@mail.gmail.com>
In-Reply-To
<xmqqd0xp1o85.fsf@gitster-ct.c.googlers.com>
On 21 May 2018 at 08:07, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> SZEDER Gábor <szeder.dev@gmail.com> 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
Show 57 quoted lines
>
>  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
>         )
>  '
>
Previous: Junio C HamanoNext: SZEDER Gábor
Message 5 of 9 in “[PATCHv4 0/1] git-p4: unshelving: fix for python2.6”
  1. Luke DiamandMay 19, 2018
  2. 1/1 git-p4: add unshelve commandLuke Diamand, May 19, 2018
  3. SZEDER GáborMay 20, 2018
  4. Junio C HamanoMay 21, 2018
  5. Luke DiamandMay 21, 2018
  6. SZEDER GáborMay 21, 2018
  7. Luke DiamandMay 21, 2018
  8. Luke DiamandMay 21, 2018
  9. SZEDER GáborMay 21, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.