From: "Eric Rannaud" <e@nanocritical.com>
To: Adam Dinwoodie <adam@dinwoodie.org>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, jeremy.serror@gmail.com,
"Shawn O . Pearce" <spearce@spearce.org>,
Ramsay Jones <ramsay@ramsayjones.plus.com>
Subject: Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0
Date: Thu, 28 Sep 2017 14:03:58 -0700 [thread overview]
Message-ID: <20170928210358.11596-1-e@nanocritical.com> (raw)
In-Reply-To: <20170928125916.GB9439@dinwoodie.org>
On Thu, Sep 28, 2017 at 5:59 AM, Adam Dinwoodie <adam@dinwoodie.org> wrote:
> On Wed, Sep 27, 2017 at 10:07:41PM -0700, Eric Rannaud wrote:
>>
>> Also adding the necessary PIPE prereq, as pointed out by Ramsay Jones.
>
> Cygwin doesn't have the PIPE prereq; I've just confirmed that the
> previous version of this patch has t9300 failing on Cygwin, but this
> version passes.
What's the preferred solution here? I can avoid using named pipes entirely:
read_checkpoint () {
if read output
then
if ! test "$output" = "progress checkpoint"
then
echo >&2 "no progress checkpoint received: $output"
echo 1 > V.result
else
echo 0 > V.result
fi
else
echo >&2 "failed to read fast-import output"
echo 1 > V.result
fi
}
# The commands in input_file should not produce any output on the file
# descriptor set with --cat-blob-fd (or stdout if unspecified).
#
# To make sure you're observing the side effects of checkpoint *before*
# fast-import terminates (and thus writes out its state), check that the
# fast-import process is still running using background_import_still_running
# *after* evaluating the test conditions.
background_import_then_checkpoint () {
options=$1
input_file=$2
rm -f V.result
( cat "$input_file"
echo "checkpoint"
echo "progress checkpoint"
sleep 3600 &
echo $! >V.pid
wait ) | git fast-import $options | read_checkpoint &
# We don't mind if the pipeline has already died by the time the test
# ends.
test_when_finished "kill $(cat V.pid) || true"
while ! test -f V.result
do
# Try to sleep less than a second, if supported.
sleep .1 2>/dev/null || sleep 1
done
return $(cat V.result)
}
Do we like this better?
next prev parent reply other threads:[~2017-09-28 21:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 3:30 [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0 Eric Rannaud
2017-09-26 4:25 ` Junio C Hamano
2017-09-26 9:53 ` [PATCH 1/1] " Eric Rannaud
2017-09-27 3:37 ` Junio C Hamano
2017-09-27 19:46 ` [PATCH] " Eric Rannaud
2017-09-27 23:19 ` Ramsay Jones
2017-09-28 3:48 ` Junio C Hamano
2017-09-28 4:56 ` Eric Rannaud
2017-09-28 5:07 ` [PATCH 1/1] " Eric Rannaud
2017-09-28 10:35 ` Junio C Hamano
2017-09-28 20:30 ` Eric Rannaud
2017-09-28 12:59 ` Adam Dinwoodie
2017-09-28 21:03 ` Eric Rannaud [this message]
2017-09-29 2:44 ` Junio C Hamano
2017-09-29 3:09 ` [PATCH] " Eric Rannaud
2017-09-29 3:51 ` Junio C Hamano
2017-09-29 5:40 ` Eric Rannaud
2017-09-29 9:35 ` Junio C Hamano
2017-09-28 6:02 ` Junio C Hamano
2017-09-28 6:44 ` Eric Rannaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170928210358.11596-1-e@nanocritical.com \
--to=e@nanocritical.com \
--cc=adam@dinwoodie.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeremy.serror@gmail.com \
--cc=ramsay@ramsayjones.plus.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.