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

[PATCHv1 0/3] git-p4: fixing --changes-block-size support

From
Luke Diamand <luke@diamand.org>
Date
Jun 7, 2015, 10:21 UTC
Message-ID
<1433672505-11940-1-git-send-email-luke@diamand.org>

We recently added support to git-p4 to limit the number of changes it would try to import at a time. That was to help clients who were being limited by the "maxscanrows" limit. This used the "-m maxchanges" argument to "p4 changes" to limit the number of results returned to git-p4.

Unfortunately it turns out that in practice, the server limits the number of results returned *before* the "-m maxchanges" argument is considered. Even supplying a "-m 1" argument doesn't help.

This affects both the "maxscanrows" and "maxresults" group options.

This set of patches updates the t9818 git-p4 tests to show the problem, and then adds a fix which works by iterating over the changes in batches (as at present) but using a revision range to limit the number of changes, rather than "-m $BATCHSIZE".

That means it will in most cases require more transactions with the server, but usually the effect will be small.

Along the way I also found that "p4 print" can fail if you have a file with too many changes in it, but there's unfortunately no way to workaround this. It's fairly unlikely to ever happen in practice.

I think I've covered everything in this fix, but it's possible that there are still bugs to be uncovered; I find the way that these limits interact somewhat tricky to understand.

Thanks, Luke

Luke Diamand (3):
  git-p4: additional testing of --changes-block-size
  git-p4: test with limited p4 server results
  git-p4: fixing --changes-block-size handling
 git-p4.py               | 48 +++++++++++++++++++++++---------
 t/t9818-git-p4-block.sh | 73 +++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 99 insertions(+), 22 deletions(-)
-- 
2.3.4.48.g223ab37
Next: Luke Diamand
Message 1 of 18 in “[PATCHv1 0/3] git-p4: fixing --changes-block-size support”
  1. Luke DiamandJun 7, 2015
  2. 1/3 git-p4: additional testing of --changes-block-sizeLuke Diamand, Jun 7, 2015
  3. Lex SpoonJun 7, 2015
  4. 2/3 git-p4: test with limited p4 server resultsLuke Diamand, Jun 7, 2015
  5. Lex SpoonJun 7, 2015
  6. 3/3 git-p4: fixing --changes-block-size handlingLuke Diamand, Jun 7, 2015
  7. Lex SpoonJun 7, 2015
  8. Luke DiamandJun 7, 2015
  9. 0/3 git-p4: fixing --changes-block-size handlingLuke Diamand, Jun 7, 2015
  10. 1/3 git-p4: additional testing of --changes-block-sizeLuke Diamand, Jun 7, 2015
  11. 2/3 git-p4: test with limited p4 server resultsLuke Diamand, Jun 7, 2015
  12. 3/3 git-p4: fixing --changes-block-size handlingLuke Diamand, Jun 7, 2015
  13. Lex SpoonJun 7, 2015
  14. Junio C HamanoJun 8, 2015
  15. Lex SpoonJun 8, 2015
  16. Lex SpoonJun 7, 2015
  17. Luke DiamandJun 7, 2015
  18. Junio C HamanoJun 8, 2015

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.