git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luke Diamand <luke@diamand.org>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Lex Spoon <lex@lexspoon.org>,
	Luke Diamand <luke@diamand.org>
Subject: [PATCHv1 0/3] git-p4: fixing --changes-block-size support
Date: Sun,  7 Jun 2015 11:21:42 +0100	[thread overview]
Message-ID: <1433672505-11940-1-git-send-email-luke@diamand.org> (raw)

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

             reply	other threads:[~2015-06-07 10:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-07 10:21 Luke Diamand [this message]
2015-06-07 10:21 ` [PATCHv1 1/3] git-p4: additional testing of --changes-block-size Luke Diamand
2015-06-07 16:06   ` Lex Spoon
2015-06-07 10:21 ` [PATCHv1 2/3] git-p4: test with limited p4 server results Luke Diamand
2015-06-07 16:11   ` Lex Spoon
2015-06-07 10:21 ` [PATCHv1 3/3] git-p4: fixing --changes-block-size handling Luke Diamand
2015-06-07 16:33   ` Lex Spoon
2015-06-07 17:06     ` Luke Diamand
2015-06-07 21:35       ` [PATCHv2 0/3] " Luke Diamand
2015-06-07 21:35         ` [PATCHv2 1/3] git-p4: additional testing of --changes-block-size Luke Diamand
2015-06-07 21:35         ` [PATCHv2 2/3] git-p4: test with limited p4 server results Luke Diamand
2015-06-07 21:35         ` [PATCHv2 3/3] git-p4: fixing --changes-block-size handling Luke Diamand
2015-06-07 22:58           ` Lex Spoon
2015-06-08 16:02             ` Junio C Hamano
2015-06-08 16:36               ` Lex Spoon
     [not found]                 ` <xmqqy4juazkz.fsf@gitster.dls.corp.google.com>
     [not found]                   ` <5575E264.6040601@diamand.org>
2015-06-08 22:32                     ` Junio C Hamano
2015-06-07 16:01 ` [PATCHv1 0/3] git-p4: fixing --changes-block-size support Lex Spoon
2015-06-07 16:58   ` Luke Diamand

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=1433672505-11940-1-git-send-email-luke@diamand.org \
    --to=luke@diamand.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lex@lexspoon.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 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 NNTP newsgroup(s).