Mercurial > treepkg > treepkg
comparison treepkg/packager.py @ 517:de78084fcbce
rename do_svn_update in do_update because we provide svn and git support now
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Wed, 10 Nov 2010 13:17:32 +0000 |
parents | e5698096f1ec |
children | 9c8e2c05c775 |
comparison
equal
deleted
inserted
replaced
516:f2de1c162d30 | 517:de78084fcbce |
---|---|
687 current_revision) | 687 current_revision) |
688 | 688 |
689 def packager_for_new_revision(self): | 689 def packager_for_new_revision(self): |
690 return self.new_revsision_packager() | 690 return self.new_revsision_packager() |
691 | 691 |
692 def package_if_updated(self, revision=None, do_svn_update=True): | 692 def package_if_updated(self, revision=None, do_update=True): |
693 """Returns a new packager if the working copy has not been packaged yet. | 693 """Returns a new packager if the working copy has not been packaged yet. |
694 If do_svn_update is true -- the default -- update the working | 694 If do_update is true -- the default -- update the working |
695 copy to the revision specified with the revision parameter | 695 copy to the revision specified with the revision parameter |
696 or if revision is None, the latest revision in the repository.""" | 696 or if revision is None, the latest revision in the repository.""" |
697 if not self.do_build: | 697 if not self.do_build: |
698 return None | 698 return None |
699 if do_svn_update: | 699 if do_update: |
700 self.update_checkout(revision=revision) | 700 self.update_checkout(revision=revision) |
701 # TODO: what should happen with the debian checkout, if a | 701 # TODO: what should happen with the debian checkout, if a |
702 # revision for the source checkoute was given? | 702 # revision for the source checkoute was given? |
703 self.rules_working_copy.update_or_checkout() | 703 self.rules_working_copy.update_or_checkout() |
704 return self.packager_for_new_revision() | 704 return self.packager_for_new_revision() |
767 | 767 |
768 | 768 |
769 class PackagerGroup(object): | 769 class PackagerGroup(object): |
770 | 770 |
771 def __init__(self, package_tracks, check_interval, revision=None, | 771 def __init__(self, package_tracks, check_interval, revision=None, |
772 instructions_file=None, do_svn_update=True, | 772 instructions_file=None, do_update=True, |
773 stop_on_error=False, name="", treepkg_dir=None, | 773 stop_on_error=False, name="", treepkg_dir=None, |
774 tracks_dir=None): | 774 tracks_dir=None): |
775 self.package_tracks = package_tracks | 775 self.package_tracks = package_tracks |
776 self.check_interval = check_interval | 776 self.check_interval = check_interval |
777 self.revision = revision | 777 self.revision = revision |
778 self.do_svn_update = do_svn_update | 778 self.do_update = do_update |
779 self.stop_on_error = stop_on_error | 779 self.stop_on_error = stop_on_error |
780 self.instructions_file = instructions_file | 780 self.instructions_file = instructions_file |
781 self.instructions_file_removed = False | 781 self.instructions_file_removed = False |
782 self.name = name | 782 self.name = name |
783 self.treepkg_dir = treepkg_dir | 783 self.treepkg_dir = treepkg_dir |
854 while repeat: | 854 while repeat: |
855 repeat = False | 855 repeat = False |
856 for track in self.package_tracks: | 856 for track in self.package_tracks: |
857 try: | 857 try: |
858 packager = track.package_if_updated(revision=self.revision, | 858 packager = track.package_if_updated(revision=self.revision, |
859 do_svn_update=self.do_svn_update) | 859 do_update=self.do_update) |
860 if packager: | 860 if packager: |
861 packager.package() | 861 packager.package() |
862 repeat = self.install_dependencies(track, packager) | 862 repeat = self.install_dependencies(track, packager) |
863 except: | 863 except: |
864 logging.exception("An error occurred while" | 864 logging.exception("An error occurred while" |