With multiple depot paths (//depot/pathA, //depot/pathB) if there are more changes than the changes-block-size limit, then some of the changes will be skipped. This fixes this by correcting the loop in p4ChangesForPaths() to reset the "start" point for each depot. Suggested-by: James Farwell <jfarwell@xxxxxxxxxx> Signed-off-by: Luke Diamand <luke@xxxxxxxxxxx> --- git-p4.py | 8 +++++--- t/t9818-git-p4-block.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/git-p4.py b/git-p4.py index 7a9dd6a..a8b5278 100755 --- a/git-p4.py +++ b/git-p4.py @@ -829,12 +829,14 @@ def p4ChangesForPaths(depotPaths, changeRange, requestedBlockSize): # Retrieve changes a block at a time, to prevent running # into a MaxResults/MaxScanRows error from the server. + start = changeStart + while True: cmd = ['changes'] if block_size: - end = min(changeEnd, changeStart + block_size) - revisionRange = "%d,%d" % (changeStart, end) + end = min(changeEnd, start + block_size) + revisionRange = "%d,%d" % (start, end) else: revisionRange = "%s,%s" % (changeStart, changeEnd) @@ -850,7 +852,7 @@ def p4ChangesForPaths(depotPaths, changeRange, requestedBlockSize): if end >= changeEnd: break - changeStart = end + 1 + start = end + 1 changelist = changes.keys() changelist.sort() diff --git a/t/t9818-git-p4-block.sh b/t/t9818-git-p4-block.sh index 64510b7..8840a18 100755 --- a/t/t9818-git-p4-block.sh +++ b/t/t9818-git-p4-block.sh @@ -128,7 +128,7 @@ test_expect_success 'Create a repo with multiple depot paths' ' done ' -test_expect_failure 'Clone repo with multiple depot paths' ' +test_expect_success 'Clone repo with multiple depot paths' ' ( cd "$git" && git p4 clone --changes-block-size=4 //depot/pathA@all //depot/pathB@all \ -- 2.6.2.474.g3eb3291 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html