[PATCH] repoman commit: Merge code generating common part of the footer (DCO)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] repoman commit: Merge code generating common part of the footer (DCO)

Michał Górny-5
The DCO Signed-off-by footer looks the same on the git branch, and on
the branch for other VCS-es. Therefore, move the code generating it
above the split branches. This also prepares the code for further footer
elements being added.
---
 repoman/pym/repoman/actions.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 73b44c5f5..00bb5b2ca 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -342,25 +342,26 @@ class Actions(object):
  sys.stderr.write("Failed to insert portage version in message!\n")
  sys.stderr.flush()
  portage_version = "Unknown"
+
+ # Common part of commit footer
+ commit_footer = "\n"
+ if dco_sob:
+ commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
+
  # Use new footer only for git (see bug #438364).
  if self.vcs_settings.vcs in ["git"]:
- commit_footer = "\nPackage-Manager: Portage-%s, Repoman-%s" % (
+ commit_footer += "Package-Manager: Portage-%s, Repoman-%s" % (
  portage.VERSION, VERSION)
  if report_options:
  commit_footer += "\nRepoMan-Options: " + " ".join(report_options)
  if self.repo_settings.sign_manifests:
  commit_footer += "\nManifest-Sign-Key: %s" % (gpg_key, )
- if dco_sob:
- commit_footer += "\nSigned-off-by: %s" % (dco_sob, )
  else:
  unameout = platform.system() + " "
  if platform.system() in ["Darwin", "SunOS"]:
  unameout += platform.processor()
  else:
  unameout += platform.machine()
- commit_footer = "\n"
- if dco_sob:
- commit_footer += "Signed-off-by: %s\n" % (dco_sob, )
  commit_footer += "(Portage version: %s/%s/%s" % \
  (portage_version, self.vcs_settings.vcs, unameout)
  if report_options:
--
2.13.4


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] repoman commit: Merge code generating common part of the footer (DCO)

Zac Medico-2
On Thu, Aug 3, 2017 at 6:55 AM, Michał Górny <[hidden email]> wrote:
> The DCO Signed-off-by footer looks the same on the git branch, and on
> the branch for other VCS-es. Therefore, move the code generating it
> above the split branches. This also prepares the code for further footer
> elements being added.
> ---
>  repoman/pym/repoman/actions.py | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

Looks good.
--
Thanks,
Zac

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] repoman commit: Merge code generating common part of the footer (DCO)

Michał Górny-5
On sob, 2017-08-05 at 22:50 -0700, Zac Medico wrote:

> On Thu, Aug 3, 2017 at 6:55 AM, Michał Górny <[hidden email]> wrote:
> > The DCO Signed-off-by footer looks the same on the git branch, and on
> > the branch for other VCS-es. Therefore, move the code generating it
> > above the split branches. This also prepares the code for further footer
> > elements being added.
> > ---
> >  repoman/pym/repoman/actions.py | 13 +++++++------
> >  1 file changed, 7 insertions(+), 6 deletions(-)
>
> Looks good.
Pushed to master & repoman branches.

--
Best regards,
Michał Górny

signature.asc (1007 bytes) Download Attachment