git-repo/tests
Xin Li 0e776a5837 Fix an issue when syncing with --use-superproject and clone bundles.
It is possible that a clone bundle contained the object referenced by
the branch in the manifest and in the superproject, but not the branch
itself (for example, the branch may be newly created from an existing
branch, or is not vislble to the user downloading the clone bundle).

When --use-superproject is enabled, because we are overriding
revisionExpr with the SHA1 revision provided by the superproject, the
verification step would succeed, but because the expected branch do not
exist, it would confuse git-repo at a later time, as it is expecting the
remote branch to exist in the local clone.

In project.py, fix this by making SetRevisionId() to always remember
the actual branch name and verify it in _CheckForImmutableRevision()
so that we only skip the fetch step when both objects exists locally.

Bug: [google internal] b/191974277
Change-Id: I49d3ca0667f524c8c45f416492faf95b1dd822fb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/310802
Reviewed-by: Raman Tenneti <rtenneti@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Xin Li <delphij@google.com>
2021-06-30 15:31:15 +00:00
..
fixtures git_config: add GetInt helper 2020-02-19 23:09:05 +00:00
test_editor.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_error.py error: fix pickling of all exceptions 2021-02-19 20:06:03 +00:00
test_git_command.py ssh: move all ssh logic to a common place 2021-05-06 19:09:16 +00:00
test_git_config.py git_config: add SetBoolean helper 2021-02-11 01:48:12 +00:00
test_git_superproject.py Fix an issue when syncing with --use-superproject and clone bundles. 2021-06-30 15:31:15 +00:00
test_git_trace2_event_log.py trace2_event_log: Added logging of error events. 2021-06-09 14:24:20 +00:00
test_hooks.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_manifest_xml.py Fix an issue when syncing with --use-superproject and clone bundles. 2021-06-30 15:31:15 +00:00
test_project.py tests: Make ReviewableBranchTests.test_smoke work with git < 2.28.0 2021-04-14 16:22:52 +00:00
test_ssh.py ssh: rewrite proxy management for multiprocessing usage 2021-05-10 21:16:06 +00:00
test_subcmds_init.py tests: fix init subcmd after url change 2021-02-25 17:07:11 +00:00
test_subcmds.py subcmds: force consistent help text format 2021-05-04 16:40:53 +00:00
test_wrapper.py tests: fix duplicate method from copy & paste error 2021-03-04 16:17:11 +00:00