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

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jan 13, 2019, 21:57 UTC
Message-ID
<CAPig+cSPL4vcfWR7Pos91N_SO-qCSBMYFY8vbyHX-POKyyRJpg@mail.gmail.com>
In-Reply-To
<20190113135815.11286-2-luke@diamand.org>
On Sun, Jan 13, 2019 at 8:58 AM Luke Diamand <luke@diamand.org> 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.

Show 9 quoted lines
> Signed-off-by: Luke Diamand <luke@diamand.org>
> ---
> 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) &&
Show 15 quoted lines
> @@ -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 ...
> +       )
> +'
Previous: Luke DiamandNext: Junio C Hamano
Message 4 of 6 in “git-p4: handle moved files when updating a P4 shelve”
  1. 0/2 git-p4: handle moved files when updating a P4 shelveLuke Diamand, Jan 13, 2019
  2. 1/2 git-p4: add failing test for shelved CL update involving moveLuke Diamand, Jan 13, 2019
  3. 2/2 git-p4: handle update of moved files when updating a shelveLuke Diamand, Jan 13, 2019
  4. Eric SunshineJan 13, 2019
  5. Junio C HamanoJan 14, 2019
  6. Junio C HamanoJan 14, 2019

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.