Mercurial > treepkg > treepkg
comparison treepkg/packager.py @ 499:e44c9c3f69f8
consolidate enterprise packagers
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Wed, 20 Oct 2010 07:51:53 +0000 |
parents | ca95be9d033a |
children | 35759274aeb4 |
comparison
equal
deleted
inserted
replaced
498:1c8cc563ac80 | 499:e44c9c3f69f8 |
---|---|
630 # otherwise it will ignore any parallel=<n> setting in | 630 # otherwise it will ignore any parallel=<n> setting in |
631 # DEB_BUILD_OPTIONS. | 631 # DEB_BUILD_OPTIONS. |
632 env["DEB_BUILD_PARALLEL"] = "true" | 632 env["DEB_BUILD_PARALLEL"] = "true" |
633 return env | 633 return env |
634 | 634 |
635 def packager_for_new_revision(self): | 635 def new_revsision_packager(self): |
636 """ Checks if a new revision is available and returns a new | |
637 revision packager class. Don't override this method in a subclass. | |
638 Use packager_for_new_revision() instead.""" | |
636 current_revision = (self.last_changed_revision(), | 639 current_revision = (self.last_changed_revision(), |
637 self.rules_working_copy.last_changed_revision()) | 640 self.rules_working_copy.last_changed_revision()) |
638 logging.info("New revision is %s", current_revision) | 641 logging.info("New revision is %s", current_revision) |
639 if current_revision not in self.get_revision_numbers(): | 642 if current_revision not in self.get_revision_numbers(): |
640 logging.info("Revision %s has not been packaged yet", | 643 logging.info("Revision %s has not been packaged yet", |
641 current_revision) | 644 current_revision) |
642 return self.revision_packager_cls(self, *current_revision) | 645 return self.revision_packager_cls(self, *current_revision) |
643 else: | 646 else: |
644 logging.info("Revision %s has already been packaged.", | 647 logging.info("Revision %s has already been packaged.", |
645 current_revision) | 648 current_revision) |
649 | |
650 def packager_for_new_revision(self): | |
651 return self.new_revsision_packager() | |
646 | 652 |
647 def package_if_updated(self, revision=None, do_svn_update=True): | 653 def package_if_updated(self, revision=None, do_svn_update=True): |
648 """Returns a new packager if the working copy has not been packaged yet. | 654 """Returns a new packager if the working copy has not been packaged yet. |
649 If do_svn_update is true -- the default -- update the working | 655 If do_svn_update is true -- the default -- update the working |
650 copy to the revision specified with the revision parameter | 656 copy to the revision specified with the revision parameter |