From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 889DC139357 for ; Mon, 10 Aug 2015 14:45:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A17194057; Mon, 10 Aug 2015 14:45:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 72A84142FA for ; Mon, 10 Aug 2015 14:45:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 97A793409DB for ; Mon, 10 Aug 2015 14:45:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6EDDD14C for ; Mon, 10 Aug 2015 14:45:31 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1439217919.19c2dea02049950720ac0c6efea81f0819314138.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/commit/, pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/argparser.py pym/repoman/copyrights.py pym/repoman/main.py pym/repoman/modules/commit/repochecks.py X-VCS-Directories: pym/repoman/ pym/repoman/modules/commit/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 19c2dea02049950720ac0c6efea81f0819314138 X-VCS-Branch: repoman Date: Mon, 10 Aug 2015 14:45:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0987131f-a98c-497f-8b3a-2f61fda609eb X-Archives-Hash: 1eb432c02ad079b5744a9e8ec7bbb8c1 commit: 19c2dea02049950720ac0c6efea81f0819314138 Author: Tom Wijsman gentoo org> AuthorDate: Mon Jun 2 18:28:34 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Aug 10 14:45:19 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=19c2dea0 repoman: Fix up commit imports and calls pym/repoman/argparser.py | 3 ++- pym/repoman/copyrights.py | 2 +- pym/repoman/main.py | 24 ++++++++++++++---------- pym/repoman/modules/commit/repochecks.py | 3 ++- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/pym/repoman/argparser.py b/pym/repoman/argparser.py index 5378e36..45f65fd 100644 --- a/pym/repoman/argparser.py +++ b/pym/repoman/argparser.py @@ -8,6 +8,7 @@ import logging import sys import portage +from portage import util from portage.util._argparse import ArgumentParser def parse_args(argv, qahelp, repoman_default_opts): @@ -176,7 +177,7 @@ def parse_args(argv, qahelp, repoman_default_opts): opts, args = parser.parse_known_args(argv[1:]) if not opts.ignore_default_opts: - default_opts = portage.util.shlex_split(repoman_default_opts) + default_opts = util.shlex_split(repoman_default_opts) if default_opts: opts, args = parser.parse_known_args(default_opts + sys.argv[1:]) diff --git a/pym/repoman/copyrights.py b/pym/repoman/copyrights.py index 231857f..01ce42f 100644 --- a/pym/repoman/copyrights.py +++ b/pym/repoman/copyrights.py @@ -83,7 +83,7 @@ def update_copyright(fn_path, year, pretend=False): new_header.append(line) break - line = _update_copyright_year(year, line) + line = update_copyright_year(year, line) new_header.append(line) difflines = 0 diff --git a/pym/repoman/main.py b/pym/repoman/main.py index 57b5b40..c75657e 100755 --- a/pym/repoman/main.py +++ b/pym/repoman/main.py @@ -59,7 +59,7 @@ from repoman.checks.ebuilds.misc import bad_split_check, pkg_invalid from repoman.checks.ebuilds.pkgmetadata import PkgMetadata from repoman.ebuild import Ebuild from repoman.errors import err -from repoman.modules import commit +from repoman.modules.commit import repochecks from repoman.profile import check_profiles, dev_keywords, setup_profile from repoman.qa_data import (format_qa_output, format_qa_output_column, qahelp, qawarnings, qacats, max_desc_len, missingvars, @@ -190,8 +190,8 @@ repolevel = len(reposplit) ################### if options.mode == 'commit': - commit.repochecks.commit_check(repolevel, reposplit) - commit.repochecks.conflict_check(vcs_settings, options) + repochecks.commit_check(repolevel, reposplit) + repochecks.conflict_check(vcs_settings, options) ################### @@ -268,7 +268,8 @@ check_ebuild_notadded = not \ effective_scanlist = scanlist if options.if_modified == "y": effective_scanlist = sorted(vcs_files_to_cps( - chain(changed.changed, changed.new, changed.removed))) + chain(changed.changed, changed.new, changed.removed), + repolevel, reposplit, categories)) for xpkg in effective_scanlist: # ebuilds and digests added to cvs respectively. @@ -1278,7 +1279,8 @@ else: else: commitmessage = utilities.get_commit_message_with_stdin() except KeyboardInterrupt: - exithandler() + logging.fatal("Interrupted; exiting...") + sys.exit(1) if (not commitmessage or not commitmessage.strip() or commitmessage.strip() == msg_prefix): print("* no commit message? aborting commit.") @@ -1339,7 +1341,8 @@ else: logging.info("checking for unmodified ChangeLog files") committer_name = utilities.get_committer_name(env=repoman_settings) for x in sorted(vcs_files_to_cps( - chain(myupdates, mymanifests, myremoved))): + chain(myupdates, mymanifests, myremoved), + repolevel, reposplit, categories)): catdir, pkgdir = x.split("/") checkdir = repo_settings.repodir + "/" + x checkdir_relative = "" @@ -1479,7 +1482,7 @@ else: print("%s have headers that will change." % green(str(len(myheaders)))) print( - "* Files with headers will " + "* Files with headers will" " cause the manifests to be changed and committed separately.") logging.info("myupdates: %s", myupdates) @@ -1633,9 +1636,9 @@ else: "doing the entire repository.\"\n") if vcs_settings.vcs in ('cvs', 'svn') and (myupdates or myremoved): - for x in sorted(vcs_files_to_cps( - chain(myupdates, myremoved, mymanifests))): + chain(myupdates, myremoved, mymanifests), + repolevel, reposplit, categories)): repoman_settings["O"] = os.path.join(repo_settings.repodir, x) digestgen(mysettings=repoman_settings, myportdb=portdb) @@ -1649,7 +1652,8 @@ else: signed = True try: for x in sorted(vcs_files_to_cps( - chain(myupdates, myremoved, mymanifests))): + chain(myupdates, myremoved, mymanifests), + repolevel, reposplit, categories)): repoman_settings["O"] = os.path.join(repo_settings.repodir, x) manifest_path = os.path.join(repoman_settings["O"], "Manifest") if not need_signature(manifest_path): diff --git a/pym/repoman/modules/commit/repochecks.py b/pym/repoman/modules/commit/repochecks.py index ac4db6b..d0e2f28 100644 --- a/pym/repoman/modules/commit/repochecks.py +++ b/pym/repoman/modules/commit/repochecks.py @@ -3,7 +3,8 @@ from portage.output import red from repoman.errors import err -from repoman.vcs import detect_vcs_conflicts +from repoman.vcs import vcs +from repoman.vcs.vcs import detect_vcs_conflicts def commit_check(repolevel, reposplit):