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
Ori Rawlings <orirawlings@gmail.com>
Date
Sep 16, 2016, 17:43 UTC
Message-ID
<CAPv0x+OB=6ju90unOnChXLK-tbYt0utV5JsguE-Dw9zbd28siA@mail.gmail.com>
In-Reply-To
<9A490197-3220-4AF9-95DA-89B726A91F92@gmail.com>

On Fri, Sep 16, 2016 at 11:19 AM, Lars Schneider <larsxschneider@gmail.com> wrote:

>
>
> 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

I was unaware of the retry flag to the p4 command, that seems like a useful trick too. I think both approaches might pair nicely together (p4 optimistically retrying, but still falling back to the latest git checkpoint if we exhaust our N retry attempts).

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

I was thinking something like this would be a good idea and would certainly aide in usability. Resuming a sync is fairly straight-forward (just re-execute the same command). Resuming a clone is a bit more problematic, today if a depot path argument is provided to the sync or clone command (and it is always required for clone), no attempt is made to examine the existing git branches and limit to only Perforce changes missing from git.

There is a lingering TODO in the script where we check the presence of the depot path argument, with a suggestion that we should always make an attempt to continue building upon existing history when it is available. I think there might be a few edge cases around this behavior that I'd need to think through. But, if I'm able to address the TODO, then printing the command to resume the import should be pretty straight-forward. I'll continue working on that next week.

Previous: Lars Schneider
Message 7 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.