From: "Brian Dolbec" <dolsen@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ Date: Mon, 21 Sep 2015 23:47:56 +0000 (UTC) [thread overview] Message-ID: <1442878966.f702bf4c75b03b19e214c6d9f5a376afa647dce5.dolsen@gentoo> (raw) commit: f702bf4c75b03b19e214c6d9f5a376afa647dce5 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sat Sep 19 03:59:10 2015 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Mon Sep 21 23:42:46 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f702bf4c repoman/actions.py: split out a manifest function pym/repoman/actions.py | 110 +++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index d70dd82..405a8c7 100644 --- a/pym/repoman/actions.py +++ b/pym/repoman/actions.py @@ -330,59 +330,7 @@ class Actions(object): level=logging.ERROR, noiselevel=-1) sys.exit(retval) - if True: - myfiles = mymanifests[:] - # If there are no header (SVN/CVS keywords) changes in - # the files, this Manifest commit must include the - # other (yet uncommitted) files. - if not myheaders: - myfiles += myupdates - myfiles += myremoved - myfiles.sort() - - fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") - mymsg = os.fdopen(fd, "wb") - mymsg.write(_unicode_encode(commitmessage)) - mymsg.close() - - commit_cmd = [] - if self.options.pretend and self.vcs_settings.vcs is None: - # substitute a bogus value for pretend output - commit_cmd.append("cvs") - else: - commit_cmd.append(self.vcs_settings.vcs) - commit_cmd.extend(self.vcs_settings.vcs_global_opts) - commit_cmd.append("commit") - commit_cmd.extend(self.vcs_settings.vcs_local_opts) - if self.vcs_settings.vcs == "hg": - commit_cmd.extend(["--logfile", commitmessagefile]) - commit_cmd.extend(myfiles) - else: - commit_cmd.extend(["-F", commitmessagefile]) - commit_cmd.extend(f.lstrip("./") for f in myfiles) - - try: - if self.options.pretend: - print("(%s)" % (" ".join(commit_cmd),)) - else: - retval = spawn(commit_cmd, env=self.repo_settings.commit_env) - if retval != os.EX_OK: - if self.repo_settings.repo_config.sign_commit and self.vcs_settings.vcs == 'git' and \ - not git_supports_gpg_sign(): - # Inform user that newer git is needed (bug #403323). - logging.error( - "Git >=1.7.9 is required for signed commits!") - - writemsg_level( - "!!! Exiting on %s (shell) " - "error code: %s\n" % (self.vcs_settings.vcs, retval), - level=logging.ERROR, noiselevel=-1) - sys.exit(retval) - finally: - try: - os.unlink(commitmessagefile) - except OSError: - pass + self.add_manifest(mymanifests, myheaders, myupdates, myremoved, commitmessage) print() if self.vcs_settings.vcs: @@ -807,3 +755,59 @@ class Actions(object): myupdates += myautoadd return myupdates, broken_changelog_manifests + + + def add_manifest(self, mymanifests, myheaders, myupdates, myremoved, + commitmessage): + myfiles = mymanifests[:] + # If there are no header (SVN/CVS keywords) changes in + # the files, this Manifest commit must include the + # other (yet uncommitted) files. + if not myheaders: + myfiles += myupdates + myfiles += myremoved + myfiles.sort() + + fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") + mymsg = os.fdopen(fd, "wb") + mymsg.write(_unicode_encode(commitmessage)) + mymsg.close() + + commit_cmd = [] + if self.options.pretend and self.vcs_settings.vcs is None: + # substitute a bogus value for pretend output + commit_cmd.append("cvs") + else: + commit_cmd.append(self.vcs_settings.vcs) + commit_cmd.extend(self.vcs_settings.vcs_global_opts) + commit_cmd.append("commit") + commit_cmd.extend(self.vcs_settings.vcs_local_opts) + if self.vcs_settings.vcs == "hg": + commit_cmd.extend(["--logfile", commitmessagefile]) + commit_cmd.extend(myfiles) + else: + commit_cmd.extend(["-F", commitmessagefile]) + commit_cmd.extend(f.lstrip("./") for f in myfiles) + + try: + if self.options.pretend: + print("(%s)" % (" ".join(commit_cmd),)) + else: + retval = spawn(commit_cmd, env=self.repo_settings.commit_env) + if retval != os.EX_OK: + if self.repo_settings.repo_config.sign_commit and self.vcs_settings.vcs == 'git' and \ + not git_supports_gpg_sign(): + # Inform user that newer git is needed (bug #403323). + logging.error( + "Git >=1.7.9 is required for signed commits!") + + writemsg_level( + "!!! Exiting on %s (shell) " + "error code: %s\n" % (self.vcs_settings.vcs, retval), + level=logging.ERROR, noiselevel=-1) + sys.exit(retval) + finally: + try: + os.unlink(commitmessagefile) + except OSError: + pass
WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <dolsen@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ Date: Mon, 21 Sep 2015 23:51:19 +0000 (UTC) [thread overview] Message-ID: <1442878966.f702bf4c75b03b19e214c6d9f5a376afa647dce5.dolsen@gentoo> (raw) Message-ID: <20150921235119.7vivjYks0MkXdY406a23PLr5HdLvGuT4HPTquydTby0@z> (raw) commit: f702bf4c75b03b19e214c6d9f5a376afa647dce5 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sat Sep 19 03:59:10 2015 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Mon Sep 21 23:42:46 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f702bf4c repoman/actions.py: split out a manifest function pym/repoman/actions.py | 110 +++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index d70dd82..405a8c7 100644 --- a/pym/repoman/actions.py +++ b/pym/repoman/actions.py @@ -330,59 +330,7 @@ class Actions(object): level=logging.ERROR, noiselevel=-1) sys.exit(retval) - if True: - myfiles = mymanifests[:] - # If there are no header (SVN/CVS keywords) changes in - # the files, this Manifest commit must include the - # other (yet uncommitted) files. - if not myheaders: - myfiles += myupdates - myfiles += myremoved - myfiles.sort() - - fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") - mymsg = os.fdopen(fd, "wb") - mymsg.write(_unicode_encode(commitmessage)) - mymsg.close() - - commit_cmd = [] - if self.options.pretend and self.vcs_settings.vcs is None: - # substitute a bogus value for pretend output - commit_cmd.append("cvs") - else: - commit_cmd.append(self.vcs_settings.vcs) - commit_cmd.extend(self.vcs_settings.vcs_global_opts) - commit_cmd.append("commit") - commit_cmd.extend(self.vcs_settings.vcs_local_opts) - if self.vcs_settings.vcs == "hg": - commit_cmd.extend(["--logfile", commitmessagefile]) - commit_cmd.extend(myfiles) - else: - commit_cmd.extend(["-F", commitmessagefile]) - commit_cmd.extend(f.lstrip("./") for f in myfiles) - - try: - if self.options.pretend: - print("(%s)" % (" ".join(commit_cmd),)) - else: - retval = spawn(commit_cmd, env=self.repo_settings.commit_env) - if retval != os.EX_OK: - if self.repo_settings.repo_config.sign_commit and self.vcs_settings.vcs == 'git' and \ - not git_supports_gpg_sign(): - # Inform user that newer git is needed (bug #403323). - logging.error( - "Git >=1.7.9 is required for signed commits!") - - writemsg_level( - "!!! Exiting on %s (shell) " - "error code: %s\n" % (self.vcs_settings.vcs, retval), - level=logging.ERROR, noiselevel=-1) - sys.exit(retval) - finally: - try: - os.unlink(commitmessagefile) - except OSError: - pass + self.add_manifest(mymanifests, myheaders, myupdates, myremoved, commitmessage) print() if self.vcs_settings.vcs: @@ -807,3 +755,59 @@ class Actions(object): myupdates += myautoadd return myupdates, broken_changelog_manifests + + + def add_manifest(self, mymanifests, myheaders, myupdates, myremoved, + commitmessage): + myfiles = mymanifests[:] + # If there are no header (SVN/CVS keywords) changes in + # the files, this Manifest commit must include the + # other (yet uncommitted) files. + if not myheaders: + myfiles += myupdates + myfiles += myremoved + myfiles.sort() + + fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") + mymsg = os.fdopen(fd, "wb") + mymsg.write(_unicode_encode(commitmessage)) + mymsg.close() + + commit_cmd = [] + if self.options.pretend and self.vcs_settings.vcs is None: + # substitute a bogus value for pretend output + commit_cmd.append("cvs") + else: + commit_cmd.append(self.vcs_settings.vcs) + commit_cmd.extend(self.vcs_settings.vcs_global_opts) + commit_cmd.append("commit") + commit_cmd.extend(self.vcs_settings.vcs_local_opts) + if self.vcs_settings.vcs == "hg": + commit_cmd.extend(["--logfile", commitmessagefile]) + commit_cmd.extend(myfiles) + else: + commit_cmd.extend(["-F", commitmessagefile]) + commit_cmd.extend(f.lstrip("./") for f in myfiles) + + try: + if self.options.pretend: + print("(%s)" % (" ".join(commit_cmd),)) + else: + retval = spawn(commit_cmd, env=self.repo_settings.commit_env) + if retval != os.EX_OK: + if self.repo_settings.repo_config.sign_commit and self.vcs_settings.vcs == 'git' and \ + not git_supports_gpg_sign(): + # Inform user that newer git is needed (bug #403323). + logging.error( + "Git >=1.7.9 is required for signed commits!") + + writemsg_level( + "!!! Exiting on %s (shell) " + "error code: %s\n" % (self.vcs_settings.vcs, retval), + level=logging.ERROR, noiselevel=-1) + sys.exit(retval) + finally: + try: + os.unlink(commitmessagefile) + except OSError: + pass
next reply other threads:[~2015-09-21 23:48 UTC|newest] Thread overview: 217+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-09-21 23:47 Brian Dolbec [this message] 2015-09-21 23:51 ` [gentoo-commits] proj/portage:master commit in: pym/repoman/ Brian Dolbec -- strict thread matches above, loose matches on Subject: below -- 2016-05-03 9:33 [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-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-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 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=1442878966.f702bf4c75b03b19e214c6d9f5a376afa647dce5.dolsen@gentoo \ --to=dolsen@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: linkBe 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