1 |
Remove the support for getting commit messages from stdin, in favor |
2 |
of always using external editor. This was never very useful, especially |
3 |
given that was implemented poorly and with commit message verification |
4 |
it will become even more painful to keep. |
5 |
--- |
6 |
repoman/pym/repoman/actions.py | 4 +++- |
7 |
repoman/pym/repoman/utilities.py | 22 +--------------------- |
8 |
2 files changed, 4 insertions(+), 22 deletions(-) |
9 |
|
10 |
diff --git a/repoman/pym/repoman/actions.py b/repoman/pym/repoman/actions.py |
11 |
index 57b528312..cd954223a 100644 |
12 |
--- a/repoman/pym/repoman/actions.py |
13 |
+++ b/repoman/pym/repoman/actions.py |
14 |
@@ -585,7 +585,9 @@ class Actions(object): |
15 |
commitmessage = utilities.get_commit_message_with_editor( |
16 |
editor, message=qa_output, prefix=msg_prefix) |
17 |
else: |
18 |
- commitmessage = utilities.get_commit_message_with_stdin() |
19 |
+ print("EDITOR is unset or invalid. Please set EDITOR to your preferred editor.") |
20 |
+ print(bad("* no EDITOR found for commit message, aborting commit.")) |
21 |
+ sys.exit(1) |
22 |
except KeyboardInterrupt: |
23 |
logging.fatal("Interrupted; exiting...") |
24 |
sys.exit(1) |
25 |
diff --git a/repoman/pym/repoman/utilities.py b/repoman/pym/repoman/utilities.py |
26 |
index c204faa8d..1272f3fb6 100644 |
27 |
--- a/repoman/pym/repoman/utilities.py |
28 |
+++ b/repoman/pym/repoman/utilities.py |
29 |
@@ -1,6 +1,6 @@ |
30 |
# -*- coding:utf-8 -*- |
31 |
# repoman: Utilities |
32 |
-# Copyright 2007-2013 Gentoo Foundation |
33 |
+# Copyright 2007-2018 Gentoo Foundation |
34 |
# Distributed under the terms of the GNU General Public License v2 |
35 |
|
36 |
"""This module contains utility functions to help repoman find ebuilds to |
37 |
@@ -13,7 +13,6 @@ __all__ = [ |
38 |
"FindPackagesToScan", |
39 |
"FindPortdir", |
40 |
"get_commit_message_with_editor", |
41 |
- "get_commit_message_with_stdin", |
42 |
"get_committer_name", |
43 |
"have_ebuild_dir", |
44 |
"have_profile_dir", |
45 |
@@ -226,25 +225,6 @@ def get_commit_message_with_editor(editor, message=None, prefix=""): |
46 |
pass |
47 |
|
48 |
|
49 |
-def get_commit_message_with_stdin(): |
50 |
- """ |
51 |
- Read a commit message from the user and return it. |
52 |
- |
53 |
- @rtype: string or None |
54 |
- @return: A string on success or None if an error occurs. |
55 |
- """ |
56 |
- print( |
57 |
- "Please enter a commit message." |
58 |
- " Use Ctrl-d to finish or Ctrl-c to abort.") |
59 |
- commitmessage = [] |
60 |
- while True: |
61 |
- commitmessage.append(sys.stdin.readline()) |
62 |
- if not commitmessage[-1]: |
63 |
- break |
64 |
- commitmessage = "".join(commitmessage) |
65 |
- return commitmessage |
66 |
- |
67 |
- |
68 |
def FindPortdir(settings): |
69 |
""" Try to figure out what repo we are in and whether we are in a regular |
70 |
tree or an overlay. |
71 |
-- |
72 |
2.16.2 |