git-repo/subcmds
Josip Sokcevic 46790229fc sync: Fix sorting for nested projects
The current logic to create checkout layers doesn't work in all cases.
For example, let's assume there are three projects: "foo", "foo/bar" and
"foo-bar". Sorting lexicographical order is incorrect as foo-bar would
be placed between foo and foo/bar, breaking layering logic.

Instead, we split filepaths based using path delimiter (always /) and
then use lexicographical sort.

BUG=b:325119758
TEST=./run_tests, manual sync on chromiumos repository

Change-Id: I76924c3cc6ba2bb860d7a3e48406a6bba8f58c10
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/412338
Tested-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: George Engelbrecht <engeg@google.com>
2024-03-08 17:58:24 +00:00
..
__init__.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
abandon.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
branches.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
checkout.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
cherry_pick.py Update logger.warn to logger.warning 2023-10-13 19:34:26 +00:00
diff.py isort: format codebase 2023-08-22 18:32:22 +00:00
diffmanifests.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
download.py subcmds: Use repo logger 2023-09-14 17:13:37 +00:00
forall.py subcmds: Use repo logger 2023-09-14 17:13:37 +00:00
grep.py subcmds: Use repo logger 2023-09-14 17:13:37 +00:00
help.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
info.py info: Handle undefined mergeBranch 2023-11-20 19:22:53 +00:00
init.py repo: Use the worktree when checking the repo rev. 2023-11-13 18:21:31 +00:00
list.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
manifest.py Update logger.warn to logger.warning 2023-10-13 19:34:26 +00:00
overview.py Format codebase with black and check formatting in CQ 2023-03-22 17:46:28 +00:00
prune.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
rebase.py Update logger.warn to logger.warning 2023-10-13 19:34:26 +00:00
selfupdate.py subcmds: Use repo logger 2023-09-14 17:13:37 +00:00
smartsync.py Format codebase with black and check formatting in CQ 2023-03-22 17:46:28 +00:00
stage.py subcmds: Use repo logger 2023-09-14 17:13:37 +00:00
start.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00
status.py isort: format codebase 2023-08-22 18:32:22 +00:00
sync.py sync: Fix sorting for nested projects 2024-03-08 17:58:24 +00:00
upload.py upload: Add support for setting patchset description 2024-03-04 18:50:24 +00:00
version.py cleanup: Update codebase to expect Python 3.6 2023-10-31 16:03:54 +00:00