From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/
Date: Mon, 10 Aug 2015 14:45:31 +0000 (UTC) [thread overview]
Message-ID: <1439217919.975913de2d03753fc2bf7484e68dfbe1014159d4.mgorny@gentoo> (raw)
commit: 975913de2d03753fc2bf7484e68dfbe1014159d4
Author: Tom Wijsman <tomwij <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 3 11:28:44 2014 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug 10 14:45:19 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=975913de
repoman/main.py: Refactor "RepoMan Sez"
pym/repoman/main.py | 27 ++++++++++-----------------
pym/repoman/utilities.py | 8 ++++++--
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/pym/repoman/main.py b/pym/repoman/main.py
index 95af4d4..c183aea 100755
--- a/pym/repoman/main.py
+++ b/pym/repoman/main.py
@@ -981,25 +981,21 @@ if options.mode != 'commit':
if dofull:
print(bold("Note: type \"repoman full\" for a complete listing."))
if dowarn and not dofail:
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"You're only giving me a partial QA payment?\n"
" I'll take it this time, but I'm not happy.\"")
elif not dofail:
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"If everyone were like you, I'd be out of business!\"")
elif dofail:
print(bad("Please fix these important QA issues first."))
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"Make your QA payment on time"
" and you'll never see the likes of me.\"\n")
sys.exit(1)
else:
if dofail and can_force and options.force and not options.pretend:
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
" \"You want to commit even with these QA issues?\n"
" I'll take it this time, but I'm not happy.\"\n")
elif dofail:
@@ -1008,15 +1004,13 @@ else:
"The --force option has been disabled"
" due to extraordinary issues."))
print(bad("Please fix these important QA issues first."))
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"Make your QA payment on time"
" and you'll never see the likes of me.\"\n")
sys.exit(1)
if options.pretend:
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"So, you want to play it safe. Good call.\"\n")
myunadded = []
@@ -1195,7 +1189,8 @@ else:
if vcs_settings.vcs:
if not (mychanged or mynew or myremoved or (vcs_settings.vcs == "hg" and mydeleted)):
- print(green("RepoMan sez:"), "\"Doing nothing is not always good for QA.\"")
+ utilities.repoman_sez(
+ "\"Doing nothing is not always good for QA.\"")
print()
print("(Didn't find any changed files...)")
print()
@@ -1600,8 +1595,7 @@ else:
portage.util.write_atomic(x, b''.join(mylines), mode='wb')
if repolevel == 1:
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"You're rather crazy... "
"doing the entire repository.\"\n")
@@ -1718,7 +1712,6 @@ else:
"repoman was too scared"
" by not seeing any familiar version control file"
" that he forgot to commit anything")
- print(
- green("RepoMan sez:"),
+ utilities.repoman_sez(
"\"If everyone were like you, I'd be out of business!\"\n")
sys.exit(0)
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index 93e8840..2a1f4d9 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -39,9 +39,10 @@ from portage import shutil
from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
+from portage import util
from portage.localization import _
from portage.process import find_binary
-from portage import util
+from portage.output import green
from repoman.copyrights import update_copyright, update_copyright_year
@@ -126,7 +127,6 @@ def FindPackagesToScan(settings, startdir, reposplit):
path = os.path.join(startdir, cat)
if not os.path.isdir(path):
continue
- pkgdirs = os.listdir(path)
scanlist.extend(AddPackagesInDir(path))
elif repolevel == 2: # category level, startdir = catdir
# We only want 1 segment of the directory,
@@ -589,3 +589,7 @@ def UpdateChangeLog(
except OSError:
pass
return None
+
+
+def repoman_sez(msg):
+ print (green("RepoMan sez:"), msg)
next reply other threads:[~2015-08-10 14:45 UTC|newest]
Thread overview: 216+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 14:45 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-03 9:33 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ Brian Dolbec
2016-04-29 17:24 [gentoo-commits] proj/portage:master " Brian Dolbec
2016-04-28 15:05 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-29 17:24 [gentoo-commits] proj/portage:master " Brian Dolbec
2016-04-28 15:05 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-29 17:24 [gentoo-commits] proj/portage:master " Brian Dolbec
2016-04-26 14:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-04-28 15:05 Brian Dolbec
2016-04-27 5:22 Brian Dolbec
2016-04-27 5:22 Brian Dolbec
2016-04-27 5:22 Brian Dolbec
2016-04-26 18:08 Zac Medico
2016-04-25 15:32 Brian Dolbec
2016-04-25 15:32 Brian Dolbec
2016-04-25 15:32 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-04-17 15:42 Brian Dolbec
2016-04-16 20:00 Zac Medico
2016-03-15 19:00 Brian Dolbec
2016-03-12 18:10 Brian Dolbec
2016-03-12 18:10 Brian Dolbec
2016-03-12 18:10 Brian Dolbec
2016-03-11 0:41 Brian Dolbec
2016-03-11 0:41 Brian Dolbec
2016-03-11 0:41 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-03-07 21:53 Brian Dolbec
2016-02-01 7:55 Zac Medico
2016-02-01 7:21 Zac Medico
2016-01-31 20:03 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-31 20:03 Brian Dolbec
2016-01-30 8:00 Brian Dolbec
2016-01-30 8:00 Brian Dolbec
2016-01-30 8:00 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-30 6:58 Brian Dolbec
2016-01-29 5:01 Brian Dolbec
2016-01-29 5:01 Brian Dolbec
2016-01-29 5:01 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-27 23:15 Brian Dolbec
2016-01-23 1:42 Brian Dolbec
2016-01-23 1:42 Brian Dolbec
2016-01-23 1:42 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-22 20:55 Brian Dolbec
2016-01-21 19:42 Brian Dolbec
2016-01-21 19:42 Brian Dolbec
2016-01-21 19:15 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-21 18:30 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-18 19:23 Brian Dolbec
2016-01-11 8:01 Brian Dolbec
2016-01-11 8:01 Brian Dolbec
2016-01-11 6:31 Brian Dolbec
2016-01-11 6:31 Brian Dolbec
2016-01-11 6:31 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 20:17 Brian Dolbec
2016-01-10 3:26 Brian Dolbec
2016-01-10 3:26 Brian Dolbec
2016-01-10 3:26 Brian Dolbec
2016-01-06 4:21 Brian Dolbec
2016-01-06 4:21 Brian Dolbec
2015-12-30 23:38 Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:51 [gentoo-commits] proj/portage:master " Brian Dolbec
2015-09-21 23:47 ` [gentoo-commits] proj/portage:repoman " Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-21 23:47 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 2:06 Brian Dolbec
2015-09-20 0:20 Brian Dolbec
2015-09-19 17:32 Brian Dolbec
2015-09-19 16:48 Brian Dolbec
2015-09-19 16:28 Brian Dolbec
2015-09-19 16:28 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 4:36 Brian Dolbec
2015-09-19 1:22 Brian Dolbec
2015-09-19 1:22 Brian Dolbec
2015-09-17 18:58 Brian Dolbec
2015-09-17 18:58 Brian Dolbec
2015-09-17 15:32 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 4:51 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 3:08 Brian Dolbec
2015-09-17 2:45 Brian Dolbec
2015-09-17 2:45 Brian Dolbec
2015-09-17 2:45 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:48 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-09-05 21:27 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-11 23:54 Brian Dolbec
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 14:45 Michał Górny
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2015-08-10 13:44 Brian Dolbec
2014-11-17 2:08 Brian Dolbec
2014-11-17 0:55 Brian Dolbec
2014-11-17 0:55 Brian Dolbec
2014-11-17 0:55 Brian Dolbec
2014-11-17 0:55 Brian Dolbec
2014-11-17 0:55 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:46 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-10-01 23:02 Brian Dolbec
2014-06-03 19:33 Brian Dolbec
2014-06-03 18:15 Brian Dolbec
2014-06-03 18:15 Brian Dolbec
2014-06-03 11:29 Tom Wijsman
2014-06-02 17:01 Tom Wijsman
2014-06-02 15:44 Brian Dolbec
2014-06-02 15:44 Brian Dolbec
2014-06-02 15:44 Brian Dolbec
2014-06-02 15:01 Tom Wijsman
2014-06-02 14:24 Brian Dolbec
2014-06-02 14:11 Tom Wijsman
2014-06-02 1:10 Brian Dolbec
2014-06-02 1:10 Brian Dolbec
2014-05-30 13:03 Brian Dolbec
2014-05-30 13:03 Brian Dolbec
2014-05-30 13:03 Brian Dolbec
2014-05-27 6:04 Brian Dolbec
2014-05-27 6:04 Brian Dolbec
2014-05-27 6:04 Brian Dolbec
2014-05-27 6:04 Brian Dolbec
2014-05-27 5:04 Brian Dolbec
2014-05-27 5:04 Brian Dolbec
2014-05-27 5:04 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=1439217919.975913de2d03753fc2bf7484e68dfbe1014159d4.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-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