public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
Date: Tue, 24 May 2011 14:28:32 +0000 (UTC)	[thread overview]
Message-ID: <b019699e803878b0cc0de07f272367a6d56aa76e.mgorny@gentoo> (raw)

commit:     b019699e803878b0cc0de07f272367a6d56aa76e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 24 14:25:00 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 24 14:25:00 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=b019699e

Actually support writing files in the repo.

---
 PMSTestSuite/repository/__init__.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 5ace740..3cb101a 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -31,3 +31,13 @@ class EbuildRepository(object):
 
 		if not self.repo_name:
 			raise ValueError('Repository %s has invalid name.' % path)
+
+	def write_files(self, files):
+		""" Write files from files dict to the repository. """
+		for fn, c in files.items():
+			fp = os.path.join(self.path, fn)
+			if not os.path.exists(os.path.dirname(fp)):
+				os.makedirs(os.path.dirname(fp))
+			f = open(fp, 'w')
+			f.write(bytes(c))
+			f.close()



             reply	other threads:[~2011-05-24 14:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 14:28 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03 18:59 [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/repository/ Michał Górny
2011-06-23 21:14 [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/ Michał Górny
2011-06-14 12:35 Michał Górny
2011-06-07 15:20 Michał Górny
2011-06-03  5:54 Michał Górny
2011-06-03  5:54 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-05-24  8:11 Michał Górny

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=b019699e803878b0cc0de07f272367a6d56aa76e.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