* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/
@ 2018-02-27 19:07 99% Michał Górny
0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2018-02-27 19:07 UTC (permalink / raw
To: gentoo-commits
commit: 518d4ec639187fa5c3565eeae05274abbeb7e813
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 17 12:22:01 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 27 19:06:53 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=518d4ec6
repoman: Remove support for getting messages from stdin
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.
Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>
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.
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-02-27 19:07 99% [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/ Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox