* [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2] EdkRepo: Improve output formatting in maintain_submodules()
@ 2019-12-04 1:54 Desimone, Ashley E
2019-12-04 22:11 ` Nate DeSimone
0 siblings, 1 reply; 2+ messages in thread
From: Desimone, Ashley E @ 2019-12-04 1:54 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/common/common_repo_functions.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index c8713dd..d857d09 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -201,26 +201,26 @@ def write_conditional_include(workspace_path, repo_sources, included_configs):
def maintain_submodules(repo_sources, repo, verbose = False):
try:
output_data = repo.git.execute(['git', 'submodule', 'init'], with_extended_output=True, with_stdout=True)
- if verbose:
+ if verbose and output_data[0]:
print(output_data[0])
- print(output_data[1])
- if verbose:
+ if output_data[1]:
+ print(output_data[1])
+ if verbose and output_data[2]:
print(output_data[2])
- print()
output_data = repo.git.execute(['git', 'submodule', 'sync', '--recursive'], with_extended_output=True, with_stdout=True)
- if verbose:
+ if verbose and output_data[0]:
print(output_data[0])
- print(output_data[1])
- if verbose:
+ if output_data[1]:
+ print(output_data[1])
+ if verbose and output_data[2]:
print(output_data[2])
- print()
output_data = repo.git.execute(['git', 'submodule', 'update', '--recursive'], with_extended_output=True, with_stdout=True)
- if verbose:
+ if verbose and output_data[0]:
print(output_data[0])
- print(output_data[1])
- if verbose:
+ if output_data[1]:
+ print(output_data[1])
+ if verbose and output_data[2]:
print(output_data[2])
- print()
except:
raise EdkrepoGitException(SUBMODULE_FAILURE.format(repo_sources.remote_name))
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2] EdkRepo: Improve output formatting in maintain_submodules()
2019-12-04 1:54 [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2] EdkRepo: Improve output formatting in maintain_submodules() Desimone, Ashley E
@ 2019-12-04 22:11 ` Nate DeSimone
0 siblings, 0 replies; 2+ messages in thread
From: Nate DeSimone @ 2019-12-04 22:11 UTC (permalink / raw)
To: devel@edk2.groups.io, Desimone, Ashley E; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Desimone, Ashley E
Sent: Tuesday, December 3, 2019 5:54 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2] EdkRepo: Improve output formatting in maintain_submodules()
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/common/common_repo_functions.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index c8713dd..d857d09 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -201,26 +201,26 @@ def write_conditional_include(workspace_path, repo_sources, included_configs):
def maintain_submodules(repo_sources, repo, verbose = False):
try:
output_data = repo.git.execute(['git', 'submodule', 'init'], with_extended_output=True, with_stdout=True)
- if verbose:
+ if verbose and output_data[0]:
print(output_data[0])
- print(output_data[1])
- if verbose:
+ if output_data[1]:
+ print(output_data[1])
+ if verbose and output_data[2]:
print(output_data[2])
- print()
output_data = repo.git.execute(['git', 'submodule', 'sync', '--recursive'], with_extended_output=True, with_stdout=True)
- if verbose:
+ if verbose and output_data[0]:
print(output_data[0])
- print(output_data[1])
- if verbose:
+ if output_data[1]:
+ print(output_data[1])
+ if verbose and output_data[2]:
print(output_data[2])
- print()
output_data = repo.git.execute(['git', 'submodule', 'update', '--recursive'], with_extended_output=True, with_stdout=True)
- if verbose:
+ if verbose and output_data[0]:
print(output_data[0])
- print(output_data[1])
- if verbose:
+ if output_data[1]:
+ print(output_data[1])
+ if verbose and output_data[2]:
print(output_data[2])
- print()
except:
raise EdkrepoGitException(SUBMODULE_FAILURE.format(repo_sources.remote_name))
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-04 22:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04 1:54 [edk2-devel] [edk2-staging/EdkRepo] [PATCH V2] EdkRepo: Improve output formatting in maintain_submodules() Desimone, Ashley E
2019-12-04 22:11 ` Nate DeSimone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox