From 0c635bb42708bb2151a92c39b31464bde1ab46f4 Mon Sep 17 00:00:00 2001 From: Matt Gumbel Date: Fri, 21 Dec 2012 10:14:53 -0800 Subject: [PATCH] Make -notdefault a default manifest group When trying to render manifest with SHAs, projects in group notdefault caused the following crash: Traceback (most recent call last): File ".repo/repo/main.py", line 385, in _Main(sys.argv[1:]) File ".repo/repo/main.py", line 365, in _Main result = repo._Run(argv) or 0 File ".repo/repo/main.py", line 137, in _Run result = cmd.Execute(copts, cargs) File ".repo/repo/subcmds/manifest.py", line 129, in Execute self._Output(opt, manifest) File ".repo/repo/subcmds/manifest.py", line 79, in _Output peg_rev = opt.peg_rev) File ".repo/repo/manifest_xml.py", line 199, in Save p.work_git.rev_parse(HEAD + '^0')) File ".repo/repo/project.py", line 2035, in runner capture_stderr = True) File ".repo/repo/git_command.py", line 215, in __init__ raise GitError('%s: %s' % (command[1], e)) error.GitError: rev-parse: [Errno 2] No such file or directory: 'prebuilts/eclipse-build-deps' This patch resolves the issue by making sure that -notdefault is always used as a default manifest group so that notdefault projects are not rendered out by the manifest subcmd. Change-Id: I4a8bd18ea7600309f39ceff1b1ab6e1ff3adf21d Signed-off-by: Matt Gumbel --- manifest_xml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manifest_xml.py b/manifest_xml.py index 36f8ef87..73f6c428 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -139,9 +139,8 @@ class XmlManifest(object): mp = self.manifestProject groups = mp.config.GetString('manifest.groups') - if not groups: - groups = 'all' - groups = [x for x in re.split(r'[,\s]+', groups) if x] + if groups: + groups = [x for x in re.split(r'[,\s]+', groups) if x] doc = xml.dom.minidom.Document() root = doc.createElement('manifest')