From: Ori Rawlings <orirawlings@gmail.com>
To: git@vger.kernel.org
Cc: Vitor Antunes <vitor.hda@gmail.com>,
Lars Schneider <larsxschneider@gmail.com>,
Luke Diamand <luke@diamand.org>, Pete Wyckoff <pw@padd.com>,
Ori Rawlings <orirawlings@gmail.com>
Subject: [PATCH v2 0/1] git-p4: Add --checkpoint-period option to sync/clone
Date: Thu, 15 Sep 2016 16:17:17 -0500 [thread overview]
Message-ID: <cover.9c54bbdd9f054215b5432c4ba3081110e2e91724.1473973732.git-series.orirawlings@gmail.com> (raw)
In-Reply-To: <1473717733-65682-1-git-send-email-orirawlings@gmail.com>
Importing a long history from Perforce into git using the git-p4 tool
can be especially challenging. The `git p4 clone` operation is based
on an all-or-nothing transactionality guarantee. Under real-world
conditions like network unreliability or a busy Perforce server,
`git p4 clone` and `git p4 sync` operations can easily fail, forcing a
user to restart the import process from the beginning. The longer the
history being imported, the more likely a fault occurs during the
process. Long enough imports thus become statistically unlikely to ever
succeed.
My idea was to leverage the checkpoint feature of git fast-import.
I've included a patch which exposes a new option to the sync/clone
commands in the git-p4 tool. The option enables explict checkpoints on
a periodic basis (approximately every x seconds).
If the sync/clone command fails during processing of Perforce changes,
the user can craft a new git p4 sync command that will identify
changes that have already been imported and proceed with importing
only changes more recent than the last successful checkpoint.
In v2 of this patch series I've added some basic test scenarios,
documentation, and did some minor clean up of the implementation
based on feedback on v1.
Ori Rawlings (1):
git-p4: Add --checkpoint-period option to sync/clone
Documentation/git-p4.txt | 12 ++++++-
git-p4.py | 7 ++++-
t/t9830-git-p4-checkpoint-period.sh | 59 ++++++++++++++++++++++++++++++-
3 files changed, 78 insertions(+), 0 deletions(-)
create mode 100755 t/t9830-git-p4-checkpoint-period.sh
--
git-series 0.8.10
next prev parent reply other threads:[~2016-09-15 21:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 22:02 [PATCH] [git-p4.py] Add --checkpoint-period option to sync/clone Ori Rawlings
2016-09-12 22:02 ` Ori Rawlings
2016-09-13 8:10 ` Luke Diamand
2016-09-15 21:17 ` Ori Rawlings [this message]
2016-09-15 21:17 ` [PATCH v2 1/1] git-p4: " Ori Rawlings
2016-09-16 16:19 ` Lars Schneider
2016-09-16 17:43 ` Ori Rawlings
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.9c54bbdd9f054215b5432c4ba3081110e2e91724.1473973732.git-series.orirawlings@gmail.com \
--to=orirawlings@gmail.com \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
--cc=luke@diamand.org \
--cc=pw@padd.com \
--cc=vitor.hda@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).