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

Re: [PATCH v2 1/1] git-p4: Add --checkpoint-period option to sync/clone

From
Lars Schneider <larsxschneider@gmail.com>
Date
Sep 16, 2016, 16:19 UTC
Message-ID
<9A490197-3220-4AF9-95DA-89B726A91F92@gmail.com>
In-Reply-To
<728dfb8e2bf4aa9f6297eada7b8e8a107fd382e6.1473973732.git-series.orirawlings@gmail.com>
Show 19 quoted lines
> On 15 Sep 2016, at 23:17, Ori Rawlings <orirawlings@gmail.com> wrote:
> 
> 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.
> 
> The underlying git fast-import protocol supports an explicit checkpoint
> command. The idea here is to optionally allow the user to force an
> explicit checkpoint every <x> seconds. If the sync/clone operation fails
> branches are left updated at the appropriate commit available during the
> latest checkpoint. This allows a user to resume importing Perforce
> history while only having to repeat at most approximately <x> seconds
> worth of import activity.

This looks interesting! I ran into the same issue and added a parameter to the p4 commands to retry (patch not yet proposed to the mailing list): https://github.com/autodesk-forks/git/commit/fcfc96a7814935ee6cefb9d69e44def30a90eabb

Would it make sense to print the "git-p4 resume command" in case an error happens and checkpoints are written?

Cheers, Lars

Previous: Ori RawlingsNext: Ori Rawlings
Message 6 of 7 in “[git-p4.py] Add --checkpoint-period option to sync/clone”
  1. [git-p4.py] Add --checkpoint-period option to sync/cloneOri Rawlings, Sep 12, 2016
  2. [git-p4.py] Add --checkpoint-period option to sync/cloneOri Rawlings, Sep 12, 2016
  3. Luke DiamandSep 13, 2016
  4. 0/1 git-p4: Add --checkpoint-period option to sync/cloneOri Rawlings, Sep 15, 2016
  5. 1/1 git-p4: Add --checkpoint-period option to sync/cloneOri Rawlings, Sep 15, 2016
  6. Lars SchneiderSep 16, 2016
  7. Ori RawlingsSep 16, 2016

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.