зеркало из https://github.com/microsoft/git.git
Merge branch 'gv/p4-multi-path-commit-fix' into maint
"git p4" that tracks multile p4 paths imported a single changelist that touches files in these multiple paths as one commit, followed by many empty commits. This has been fixed. * gv/p4-multi-path-commit-fix: git-p4: fix multi-path changelist empty commits
This commit is contained in:
Коммит
1d5cb4596d
|
@ -823,7 +823,7 @@ def p4ChangesForPaths(depotPaths, changeRange, requestedBlockSize):
|
||||||
die("cannot use --changes-block-size with non-numeric revisions")
|
die("cannot use --changes-block-size with non-numeric revisions")
|
||||||
block_size = None
|
block_size = None
|
||||||
|
|
||||||
changes = []
|
changes = set()
|
||||||
|
|
||||||
# Retrieve changes a block at a time, to prevent running
|
# Retrieve changes a block at a time, to prevent running
|
||||||
# into a MaxResults/MaxScanRows error from the server.
|
# into a MaxResults/MaxScanRows error from the server.
|
||||||
|
@ -842,7 +842,7 @@ def p4ChangesForPaths(depotPaths, changeRange, requestedBlockSize):
|
||||||
|
|
||||||
# Insert changes in chronological order
|
# Insert changes in chronological order
|
||||||
for line in reversed(p4_read_pipe_lines(cmd)):
|
for line in reversed(p4_read_pipe_lines(cmd)):
|
||||||
changes.append(int(line.split(" ")[1]))
|
changes.add(int(line.split(" ")[1]))
|
||||||
|
|
||||||
if not block_size:
|
if not block_size:
|
||||||
break
|
break
|
||||||
|
|
|
@ -131,6 +131,26 @@ test_expect_success 'clone two dirs, @all, conflicting files' '
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'clone two dirs, each edited by submit, single git commit' '
|
||||||
|
(
|
||||||
|
cd "$cli" &&
|
||||||
|
echo sub1/f4 >sub1/f4 &&
|
||||||
|
p4 add sub1/f4 &&
|
||||||
|
echo sub2/f4 >sub2/f4 &&
|
||||||
|
p4 add sub2/f4 &&
|
||||||
|
p4 submit -d "sub1/f4 and sub2/f4"
|
||||||
|
) &&
|
||||||
|
git p4 clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
|
||||||
|
test_when_finished cleanup_git &&
|
||||||
|
(
|
||||||
|
cd "$git" &&
|
||||||
|
git ls-files >lines &&
|
||||||
|
test_line_count = 4 lines &&
|
||||||
|
git log --oneline p4/master >lines &&
|
||||||
|
test_line_count = 5 lines
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
revision_ranges="2000/01/01,#head \
|
revision_ranges="2000/01/01,#head \
|
||||||
1,2080/01/01 \
|
1,2080/01/01 \
|
||||||
2000/01/01,2080/01/01 \
|
2000/01/01,2080/01/01 \
|
||||||
|
@ -147,7 +167,7 @@ test_expect_success 'clone using non-numeric revision ranges' '
|
||||||
(
|
(
|
||||||
cd "$git" &&
|
cd "$git" &&
|
||||||
git ls-files >lines &&
|
git ls-files >lines &&
|
||||||
test_line_count = 6 lines
|
test_line_count = 8 lines
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
'
|
'
|
||||||
|
|
Загрузка…
Ссылка в новой задаче