From cd89ec147ad59f19ebe16a4a30b13606102213c0 Mon Sep 17 00:00:00 2001 From: Raman Tenneti Date: Thu, 22 Apr 2021 09:18:14 -0700 Subject: sync: Fix exception in an exsiting clone (without partial-clone). Default the partial_clone_exclude argument to an empty set. Fixes the following report by Emil Medve. With this change (up to v2.14.1), on an existing "normal" clone (without partial-clone options) I'm seeing this traceback during `repo selfupdate`: Traceback (most recent call last): File ".../.repo/repo/main.py", line 630, in _Main(sys.argv[1:]) File ".../.repo/repo/main.py", line 604, in _Main result = run() File ".../.repo/repo/main.py", line 597, in run = lambda: repo._Run(name, gopts, argv) or 0 File ".../.repo/repo/main.py", line 261, in _Run result = cmd.Execute(copts, cargs) File ".../.repo/repo/subcmds/selfupdate.py", line 54, in Execute if not rp.Sync_NetworkHalf(): File ".../.repo/repo/project.py", line 1091, in Sync_NetworkHalf if self.name in partial_clone_exclude: TypeError: argument of type 'NoneType' is not iterable $ ./run_tests -v Change-Id: I71e744e4ef2a37b13aa9ba42eba3935e78c4e40a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304082 Reviewed-by: Mike Frysinger Tested-by: Raman Tenneti --- project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'project.py') diff --git a/project.py b/project.py index 1e31a20a..6679ee31 100644 --- a/project.py +++ b/project.py @@ -1051,7 +1051,7 @@ class Project(object): prune=False, submodules=False, clone_filter=None, - partial_clone_exclude=None): + partial_clone_exclude=set()): """Perform only the network IO portion of the sync process. Local working directory/branch state is not affected. """ -- cgit v1.2.3-54-g00ecf