comparison recipes/kde_enterprise_3_5/base.py @ 280:d2382953b2c8

When building a tagged revision, make sure to explicitly use the revision number when exporting the sources to avoid a race. The repository might change between detection of the tag and the export.
author Bernhard Herzog <bh@intevation.de>
date Mon, 03 Aug 2009 18:57:27 +0000
parents f3dee156e3e3
children cd10b835d9b8
comparison
equal deleted inserted replaced
279:32b09a9b92ba 280:d2382953b2c8
66 logging.info("New revision is %s", revision) 66 logging.info("New revision is %s", revision)
67 if revision not in self.get_revision_numbers(): 67 if revision not in self.get_revision_numbers():
68 logging.info("Revision %s has not been packaged yet", 68 logging.info("Revision %s has not been packaged yet",
69 revision) 69 revision)
70 self.tag_url = tag_url 70 self.tag_url = tag_url
71 self.tag_revision = tag_revision
71 return self.revision_packager_cls(self, tag=tag_url, *revision) 72 return self.revision_packager_cls(self, tag=tag_url, *revision)
72 else: 73 else:
73 logging.info("Revision %s has already been packaged.", 74 logging.info("Revision %s has already been packaged.",
74 revision) 75 revision)
75 76
76 return super(BasePackageTrack, self).packager_for_new_revision() 77 return super(BasePackageTrack, self).packager_for_new_revision()
77 78
78 def export_sources(self, to_dir): 79 def export_sources(self, to_dir):
79 if self.tag_url is not None: 80 if self.tag_url is not None:
80 self.export_tag(self.tag_url, to_dir) 81 self.export_tag(self.tag_url, to_dir, revision=self.tag_revision)
81 else: 82 else:
82 super(BasePackageTrack, self).export_sources(to_dir) 83 super(BasePackageTrack, self).export_sources(to_dir)
83 84
84 def export_tag(self, tag_url, to_dir): 85 def export_tag(self, tag_url, to_dir, revision=None):
85 logging.info("Exporting sources from %s to %r", 86 logging.info("Exporting sources from %s to %r",
86 tag_url, to_dir) 87 tag_url, to_dir)
87 treepkg.subversion.export(tag_url, to_dir) 88 treepkg.subversion.export(tag_url, to_dir, revision=revision)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)