예제 #1
0
 def query_hg_revision(self, path):
     """ Avoid making 'pull' a required action every run, by being able
         to fall back to figuring out the revision from the cloned repo
         """
     m = MercurialVCS(log_obj=self.log_obj, config=self.config)
     revision = m.get_revision_from_path(path)
     return revision
예제 #2
0
    def source(self):
        vcs_obj = None
        if self.config['vcs'] == 'hg':
            vcs_obj = MercurialVCS(
                log_obj=self.log_obj,
                #
                # Torn between creating a smaller, more flexible config per
                # helper object, or passing the read-only master config as
                # vcs_obj.config and creating a smaller vcs_obj.vcs_config.
                #
                # Deciding on the latter for now, while reserving the right
                # to change my mind later.
                config=self.config,
                vcs_config={
                    'repo':
                    self.config['vcs_repo'],
                    'dest':
                    self.config['vcs_dest'],
                    'branch':
                    self.config.get('vcs_branch'),
                    'revision':
                    self.config.get('vcs_revision'),
                    'vcs_share_base':
                    self.config.get('vcs_shared_dir'),
                    'allow_unshared_local_clones':
                    self.config.get('vcs_allow_unshared_local_clones'),
                    'halt_on_failure':
                    self.config.get('halt_on_failure', True),
                })
        else:
            self.fatal("I don't know how to handle vcs '%s'!" %
                       self.config['vcs'])
        got_revision = vcs_obj.ensure_repo_and_revision()

        self.info("Got revision %s\n" % got_revision)
예제 #3
0
 def query_hg_revision(self, path):
     """ Avoid making 'pull' a required action every run, by being able
         to fall back to figuring out the revision from the cloned repo
         """
     m = MercurialVCS(log_obj=self.log_obj, config=self.config)
     revision = m.get_revision_from_path(path)
     return revision
예제 #4
0
    def source(self):
        vcs_obj = None
        if self.config['vcs'] == 'hg':
            vcs_obj = MercurialVCS(
             log_obj=self.log_obj,
             #
             # Torn between creating a smaller, more flexible config per
             # helper object, or passing the read-only master config as
             # vcs_obj.config and creating a smaller vcs_obj.vcs_config.
             #
             # Deciding on the latter for now, while reserving the right
             # to change my mind later.
             config=self.config,
             vcs_config={
              'repo': self.config['vcs_repo'],
              'dest': self.config['vcs_dest'],
              'branch': self.config.get('vcs_branch'),
              'revision': self.config.get('vcs_revision'),
              'vcs_share_base': self.config.get('vcs_shared_dir'),
              'allow_unshared_local_clones': self.config.get('vcs_allow_unshared_local_clones'),
              'halt_on_failure': self.config.get('halt_on_failure', True),
             }
            )
        else:
            self.fatal("I don't know how to handle vcs '%s'!" % self.config['vcs'])
        got_revision = vcs_obj.ensure_repo_and_revision()

        self.info("Got revision %s\n" % got_revision)
 def pull(self):
     dirs = self.query_abs_dirs()
     # bug 1417697 - clone default first, then pull to get the revision.
     # This to deal with relbranches, which don't show up in mozilla-unified.
     super(PostReleaseVersionBump, self).pull(repos=self.query_repos())
     vcs_obj = MercurialVCS(log_obj=self.log_obj, config=self.config)
     vcs_obj.pull(self.config['repo']['repo'],
                  dirs['abs_gecko_dir'],
                  update_dest=False,
                  revision=self.config['revision'])
 def pull(self):
     dirs = self.query_abs_dirs()
     # bug 1417697 - clone default first, then pull to get the revision.
     # This to deal with relbranches, which don't show up in mozilla-unified.
     super(PostReleaseVersionBump, self).pull(
             repos=self.query_repos())
     vcs_obj = MercurialVCS(log_obj=self.log_obj, config=self.config)
     vcs_obj.pull(
         self.config['repo']['repo'],
         dirs['abs_gecko_dir'],
         update_dest=False,
         revision=self.config['revision']
     )
예제 #7
0
    def source(self):
        c = self.config
        vcs_obj = None
        if self.config['vcs'] == 'hg':
            vcs_obj = MercurialVCS(
             log_obj=self.log_obj,
             #
             # Torn between creating a smaller, more flexible config per
             # helper object, or passing the read-only master config as
             # vcs_obj.config and creating a smaller vcs_obj.vcs_config.
             #
             # Deciding on the latter for now, while reserving the right
             # to change my mind later.
             config=self.config,
             vcs_config={
              'repo': self.config['vcs_repo'],
              'dest': self.config['vcs_dest'],
              'branch': self.config.get('vcs_branch'),
              'revision': self.config.get('vcs_revision'),
              'vcs_share_base': self.config.get('vcs_shared_dir'),
              'allow_unshared_local_clones': self.config.get('vcs_allow_unshared_local_clones'),
              'halt_on_failure': self.config.get('halt_on_failure', True),
              'noop': self.config.get('noop'),
             }
            )
        else:
            self.fatal("I don't know how to handle vcs '%s'!" % self.config['vcs'])
        got_revision = vcs_obj.ensure_repo_and_revision()

        self.add_summary("Got revision %s\n" % got_revision)
        if c.get('tbox_output'):
            if c['vcs_repo'].startswith("http"):
                url = "%s/rev/%s" % (c['vcs_repo'], got_revision)
                msg = "<a href=\"%(url)s\">revision: %(got_revision)s</a>" % locals()
                self.add_summary(msg)
            else:
                msg = "revision: %s" % got_revision

            # Print as well as info() to make sure we get the TinderboxPrint
            # sans any log prefixes.
            print "TinderboxPrint: %s" % msg
예제 #8
0
    def pull(self):
        """clone the jetpack repository"""

        MercurialVCS.clone(self, self.config['repo'], self.addon_sdk)