From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH v3 2/3] repoman: Remove support for getting messages from stdin
Date: Mon, 19 Feb 2018 16:00:56 +0100 [thread overview]
Message-ID: <20180219150057.20338-2-mgorny@gentoo.org> (raw)
In-Reply-To: <20180219150057.20338-1-mgorny@gentoo.org>
Remove the support for getting commit messages from stdin, in favor
of always using external editor. This was never very useful, especially
given that was implemented poorly and with commit message verification
it will become even more painful to keep.
---
repoman/pym/repoman/actions.py | 4 +++-
repoman/pym/repoman/utilities.py | 22 +---------------------
2 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py
index 57b528312..cd954223a 100644
--- a/repoman/pym/repoman/actions.py
+++ b/repoman/pym/repoman/actions.py
@@ -585,7 +585,9 @@ class Actions(object):
commitmessage = utilities.get_commit_message_with_editor(
editor, message=qa_output, prefix=msg_prefix)
else:
- commitmessage = utilities.get_commit_message_with_stdin()
+ print("EDITOR is unset or invalid. Please set EDITOR to your preferred editor.")
+ print(bad("* no EDITOR found for commit message, aborting commit."))
+ sys.exit(1)
except KeyboardInterrupt:
logging.fatal("Interrupted; exiting...")
sys.exit(1)
diff --git a/repoman/pym/repoman/utilities.py b/repoman/pym/repoman/utilities.py
index c204faa8d..1272f3fb6 100644
--- a/repoman/pym/repoman/utilities.py
+++ b/repoman/pym/repoman/utilities.py
@@ -1,6 +1,6 @@
# -*- coding:utf-8 -*-
# repoman: Utilities
-# Copyright 2007-2013 Gentoo Foundation
+# Copyright 2007-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""This module contains utility functions to help repoman find ebuilds to
@@ -13,7 +13,6 @@ __all__ = [
"FindPackagesToScan",
"FindPortdir",
"get_commit_message_with_editor",
- "get_commit_message_with_stdin",
"get_committer_name",
"have_ebuild_dir",
"have_profile_dir",
@@ -226,25 +225,6 @@ def get_commit_message_with_editor(editor, message=None, prefix=""):
pass
-def get_commit_message_with_stdin():
- """
- Read a commit message from the user and return it.
-
- @rtype: string or None
- @return: A string on success or None if an error occurs.
- """
- print(
- "Please enter a commit message."
- " Use Ctrl-d to finish or Ctrl-c to abort.")
- commitmessage = []
- while True:
- commitmessage.append(sys.stdin.readline())
- if not commitmessage[-1]:
- break
- commitmessage = "".join(commitmessage)
- return commitmessage
-
-
def FindPortdir(settings):
""" Try to figure out what repo we are in and whether we are in a regular
tree or an overlay.
--
2.16.2
next prev parent reply other threads:[~2018-02-19 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 15:00 [gentoo-portage-dev] [PATCH v3 1/3] repoman: Add commit message verification Michał Górny
2018-02-19 15:00 ` Michał Górny [this message]
2018-02-19 15:00 ` [gentoo-portage-dev] [PATCH v3 3/3] repoman: Verify commit messages when using EDITOR Michał Górny
2018-02-20 19:56 ` [gentoo-portage-dev] [PATCH v3 1/3] repoman: Add commit message verification Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180219150057.20338-2-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox