当前位置: 首页>>代码示例>>Python>>正文


Python hg.update函数代码示例

本文整理汇总了Python中util.hg.update函数的典型用法代码示例。如果您正苦于以下问题:Python update函数的具体用法?Python update怎么用?Python update使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了update函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: bump_and_tag

    def bump_and_tag(repo, attempt, config, relbranch, revision, tags,
                     defaultBranch):
        relbranchChangesets = len(tags)
        defaultBranchChangesets = 0

        if relbranch in get_branches(reponame):
            update(reponame, revision=relbranch)
        else:
            update(reponame, revision=revision)
            run_cmd(['hg', 'branch', relbranch], cwd=reponame)

        if len(bumpFiles) > 0:
            # Bump files on the relbranch, if necessary
            bump(reponame, bumpFiles, 'version')
            run_cmd(['hg', 'diff'], cwd=repo)
            try:
                get_output(['hg', 'commit', '-u', config['hgUsername'],
                            '-m', getBumpCommitMessage(config['productName'], config['version'])],
                           cwd=reponame)
                relbranchChangesets += 1
                revision = get_revision(reponame)
            except subprocess.CalledProcessError, e:
                # We only want to ignore exceptions caused by having nothing to
                # commit, which are OK. We still want to raise exceptions caused
                # by any other thing.
                if e.returncode != 1 or "nothing changed" not in e.output:
                    raise
开发者ID:EkkiD,项目名称:build-tools,代码行数:27,代码来源:tag-release.py

示例2: cleanup_wrapper

    def cleanup_wrapper():
        # use an attribute full_clean in order to keep track of
        # whether or not a full cleanup is required.
        # This is done since cleanup_wrapper's scope doesn't let us
        # access process_patchset globals, given the way it is used.
        if not hasattr(cleanup_wrapper, 'full_clean'):
            cleanup_wrapper.full_clean = False
        if not hasattr(cleanup_wrapper, 'branch'):
            cleanup_wrapper.branch = data['branch']
        if cleanup_wrapper.branch != data['branch']:
            cleanup_wrapper.full_clean = False
            cleanup_wrapper.branch = data['branch']
        # only wipe the repositories every second cleanup
        if cleanup_wrapper.full_clean:
            clear_branch(data['branch'])
            log_msg('Wiped repositories for: %s' % data['branch'])
        else:
            active_repo = os.path.join('active', data['branch'])
            update(active_repo)
            log_msg('Update -C on active repo for: %s' % data['branch'])
        cleanup_wrapper.full_clean = not cleanup_wrapper.full_clean

        clone_revision = clone_branch(data['branch'], data['branch_url'])
        if clone_revision == None:
            # TODO: Handle clone error
            log_msg('[HgPusher] Clone error...')
        return
开发者ID:lsblakk,项目名称:tools,代码行数:27,代码来源:hgpusher.py

示例3: process_configs

 def process_configs(repo, attempt):
     """Helper method that encapsulates all of the things necessary
        to run release runner for all releases."""
     log.info("Bumping %s, attempt #%s" % (repo, attempt))
     for release in rr.new_releases:
         rr.update_status(release, 'Writing configs')
         l10nContents = rr.get_release_l10n(release['name'])
         tags.extend(getTags(
             getBaseTag(release['product'], release['version']),
             release['buildNumber'])
         )
         update(configs_workdir, revision='default')
         cfgFile = getReleaseConfigName(
             release['product'], path.basename(release['branch']),
             release['version'], staging)
         bump_configs(release=release, cfgFile=cfgFile,
                      l10nContents=l10nContents, workdir=configs_workdir,
                      hg_username=hg_username,
                      productionBranch=buildbot_configs_branch)
         rr.update_status(release, 'Running release sanity')
         rs_args = get_release_sanity_args(configs_workdir, release,
                                           cfgFile, masters_json,
                                           buildbot_configs_branch)
         release_sanity_script = "%s/buildbot-helpers/release_sanity.py" % tools_workdir
         run_cmd(['python', release_sanity_script] + rs_args +
                 ['--dry-run'])
         rr.update_status(
             release, 'Waiting for other releases to run release sanity'
         )
开发者ID:magnyld,项目名称:build-tools,代码行数:29,代码来源:release-runner.py

示例4: repackLocale

def repackLocale(locale, l10nRepoDir, l10nBaseRepo, revision, localeSrcDir,
                 l10nIni, compareLocalesRepo, env, merge=True,
                 prevMar=None, productName=None, platform=None,
                 version=None, oldVersion=None):
    repo = "/".join([l10nBaseRepo, locale])
    localeDir = path.join(l10nRepoDir, locale)
    retry(mercurial, args=(repo, localeDir))
    update(localeDir, revision=revision)
    
    compareLocales(compareLocalesRepo, locale, l10nRepoDir, localeSrcDir,
                   l10nIni, revision=revision, merge=merge)
    env["AB_CD"] = locale
    env["LOCALE_MERGEDIR"] = path.abspath(path.join(localeSrcDir, "merged"))
    if sys.platform.startswith('win'):
        env["LOCALE_MERGEDIR"] = windows2msys(env["LOCALE_MERGEDIR"])
    if sys.platform.startswith('darwin'):
        env["MOZ_PKG_PLATFORM"] = "mac"
    run_cmd(["make", "installers-%s" % locale], cwd=localeSrcDir, env=env)
    UPLOAD_EXTRA_FILES = []
    if prevMar:
        nativeDistDir = path.normpath(path.abspath(path.join(localeSrcDir,
                                                             '../../dist')))
        posixDistDir = windows2msys(nativeDistDir)
        mar = '%s/host/bin/mar' % posixDistDir
        mbsdiff = '%s/host/bin/mbsdiff' % posixDistDir
        current = '%s/current' % posixDistDir
        previous = '%s/previous' % posixDistDir
        updateDir = 'update/%s/%s' % (buildbot2ftp(platform), locale)
        updateAbsDir = '%s/%s' % (posixDistDir, updateDir)
        current_mar = '%s/%s-%s.complete.mar' % (updateAbsDir, productName, version)
        partial_mar_name = '%s-%s-%s.partial.mar' % (productName, oldVersion,
                                                     version)
        partial_mar = '%s/%s' % (updateAbsDir, partial_mar_name)
        UPLOAD_EXTRA_FILES.append('%s/%s' % (updateDir, partial_mar_name))
        env['MAR'] = mar
        env['MBSDIFF'] = mbsdiff
        run_cmd(['rm', '-rf', previous, current])
        run_cmd(['mkdir', previous, current])
        run_cmd(['perl', '../../../tools/update-packaging/unwrap_full_update.pl',
                 '../../../../%s' % prevMar],
                cwd=path.join(nativeDistDir, 'previous'), env=env)
        run_cmd(['perl', '../../../tools/update-packaging/unwrap_full_update.pl',
                 current_mar], cwd=path.join(nativeDistDir, 'current'), env=env)
        run_cmd(
            ['bash', '../../tools/update-packaging/make_incremental_update.sh',
             partial_mar, previous, current], cwd=nativeDistDir, env=env)
        if os.environ.get('MOZ_SIGN_CMD'):
            run_cmd(['bash', '-c',
                     '%s -f gpg -f mar "%s"' %
                     (os.environ['MOZ_SIGN_CMD'], partial_mar)],
                     env=env)
            UPLOAD_EXTRA_FILES.append('%s/%s.asc' % (updateDir, partial_mar_name))

    retry(run_cmd,
          args=(["make", "upload", "AB_CD=%s" % locale,
                 'UPLOAD_EXTRA_FILES=%s' % ' '.join(UPLOAD_EXTRA_FILES)],),
          kwargs={'cwd': localeSrcDir, 'env': env})
开发者ID:EkkiD,项目名称:build-tools,代码行数:57,代码来源:l10n.py

示例5: tagRepo

def tagRepo(config, repo, reponame, revision, tags, bumpFiles, relbranch,
            pushAttempts, defaultBranch='default'):
    remote = make_hg_url(HG, repo)
    mercurial(remote, reponame)

    def bump_and_tag(repo, attempt, config, relbranch, revision, tags,
                     defaultBranch):
        # set relbranchChangesets=1 because tag() generates exactly 1 commit
        relbranchChangesets = 1
        defaultBranchChangesets = 0

        if relbranch in get_branches(reponame):
            update(reponame, revision=relbranch)
        else:
            update(reponame, revision=revision)
            run_cmd(['hg', 'branch', relbranch], cwd=reponame)

        if len(bumpFiles) > 0:
            # Bump files on the relbranch, if necessary
            bump(reponame, bumpFiles, 'version')
            run_cmd(['hg', 'diff'], cwd=repo)
            try:
                get_output(['hg', 'commit', '-u', config['hgUsername'],
                            '-m', getBumpCommitMessage(config['productName'], config['version'])],
                           cwd=reponame)
                relbranchChangesets += 1
            except subprocess.CalledProcessError, e:
                # We only want to ignore exceptions caused by having nothing to
                # commit, which are OK. We still want to raise exceptions caused
                # by any other thing.
                if e.returncode != 1 or "nothing changed" not in e.output:
                    raise

        # We always want our tags pointing at the tip of the relbranch
        # so we need to grab the current revision after we've switched
        # branches and bumped versions.
        revision = get_revision(reponame)
        # Create the desired tags on the relbranch
        tag(repo, revision, tags, config['hgUsername'])

        # This is the bump of the version on the default branch
        # We do it after the other one in order to get the tip of the
        # repository back on default, thus avoiding confusion.
        if len(bumpFiles) > 0:
            update(reponame, revision=defaultBranch)
            bump(reponame, bumpFiles, 'nextVersion')
            run_cmd(['hg', 'diff'], cwd=repo)
            try:
                get_output(['hg', 'commit', '-u', config['hgUsername'],
                            '-m', getBumpCommitMessage(config['productName'], config['version'])],
                           cwd=reponame)
                defaultBranchChangesets += 1
            except subprocess.CalledProcessError, e:
                if e.returncode != 1 or "nothing changed" not in e.output:
                    raise
开发者ID:SergiosLen,项目名称:browser-f,代码行数:55,代码来源:tag-release.py

示例6: createRepacks

def createRepacks(sourceRepo, revision, l10nRepoDir, l10nBaseRepo,
                  mozconfigPath, objdir, makeDirs, locales, ftpProduct,
                  appName, version, appVersion, buildNumber, stageServer,
                  stageUsername, stageSshKey, compareLocalesRepo, merge,
                  platform, stage_platform, brand, mobileDirName):
    sourceRepoName = path.split(sourceRepo)[-1]
    nightlyDir = "candidates"
    localeSrcDir = path.join(sourceRepoName, objdir, mobileDirName, "locales")
    # Even on Windows we need to use "/" as a separator for this because
    # compare-locales doesn"t work any other way
    l10nIni = "/".join([sourceRepoName, mobileDirName, "locales", "l10n.ini"])

    env = {
        "MOZ_OBJDIR": objdir,
        "MOZ_PKG_VERSION": version,
        "UPLOAD_HOST": stageServer,
        "UPLOAD_USER": stageUsername,
        "UPLOAD_SSH_KEY": stageSshKey,
        "UPLOAD_TO_TEMP": "1",
        # Android signing
        "JARSIGNER": os.path.join(os.getcwd(), "scripts", "release",
                                  "signing", "mozpass.py")
    }
    build.misc.cleanupObjdir(sourceRepoName, objdir, mobileDirName)
    retry(mercurial, args=(sourceRepo, sourceRepoName))
    update(sourceRepoName, revision=revision)
    l10nRepackPrep(sourceRepoName, objdir, mozconfigPath,
                   l10nRepoDir, makeDirs, localeSrcDir, env)
    fullCandidatesDir = makeCandidatesDir(appName, version, buildNumber,
                                      protocol='http', server=stageServer,
                                      nightlyDir=nightlyDir)
    input_env = retry(downloadReleaseBuilds,
                      args=(stageServer, ftpProduct, brand, version,
                            buildNumber, stage_platform, fullCandidatesDir))
    env.update(input_env)
    print "env pre-locale: %s" % str(env)

    failed = []
    for l in locales:
        try:
            # adding locale into builddir
            env["POST_UPLOAD_CMD"] = postUploadCmdPrefix(
                to_mobile_candidates=True,
                product=appName,
                version=version,
                builddir='%s/%s' % (stage_platform, l),
                buildNumber=buildNumber,
                nightly_dir=nightlyDir,)
            print "env post-locale: %s" % str(env)
            repackLocale(str(l), l10nRepoDir, l10nBaseRepo, revision,
                         localeSrcDir, l10nIni, compareLocalesRepo, env, merge)
        except Exception, e:
            failed.append((l, format_exc()))
开发者ID:EkkiD,项目名称:build-tools,代码行数:53,代码来源:release-mobile-repacks.py

示例7: compareLocales

def compareLocales(repo, locale, l10nRepoDir, localeSrcDir, l10nIni,
                   revision="default", merge=True):
    retry(mercurial, args=(repo, "compare-locales"))
    update("compare-locales", revision=revision)
    mergeDir = path.join(localeSrcDir, "merged")
    if path.exists(mergeDir):
        log.info("Deleting %s" % mergeDir)
        shutil.rmtree(mergeDir)
    run_cmd(["python", path.join("compare-locales", "scripts",
                                 "compare-locales"),
             "-m", mergeDir,
             l10nIni,
             l10nRepoDir, locale],
            env={"PYTHONPATH": path.join("compare-locales", "lib")})
开发者ID:bdacode,项目名称:build-tools,代码行数:14,代码来源:l10n.py

示例8: soft_clean

    def soft_clean(self):
        """
        Only does an update -C on the active repository
        to get rid of any applied, not committed patches.
        """
        active_repo = os.path.join('active', self.branch)

        # get rid of any imported and qpush-ed patches
        log.debug('qpop -a and rm -rf .hg/patches')
        (success, err, ret) = run_hg(['qpop', '-a', '-R', active_repo])
        run_cmd(['rm', '-rf', os.path.join(active_repo, '.hg/patches')])

        log.debug('Update -C on active repo for: %s' % (self.branch))
        update(active_repo)
开发者ID:gerva,项目名称:build-autoland,代码行数:14,代码来源:hgpusher.py

示例9: bump_configs

def bump_configs(release, cfgFile, l10nContents, workdir,
                 hg_username, productionBranch, defaultBranch='default'):
    # Update the production branch first, because that's where we want to read
    # the templates from
    update(workdir, productionBranch)
    cfgDir = path.join(workdir, 'mozilla')
    templateFile = path.join(cfgDir, '%s.template' % cfgFile)
    tags = set(getTags(getBaseTag(release['product'], release['version']),
                   release['buildNumber']))
    cfgFile = path.join(cfgDir, cfgFile)
    l10nChangesetsFile = path.join(
        cfgDir,
        readReleaseConfig(cfgFile)['l10nRevisionFile']
    )
    subs = release.copy()
    if 'partials' in release:
        subs['partials'] = getPartials(release)
    # This is true 99% of the time. It's exceedingly rare that we ship a point
    # release that we first push to the beta channel. If we need to, the
    # expectation is that this will be ignored by hardcoding True in the
    # template.
    if isFinalRelease(release["version"]):
        subs["betaChannelEnabled"] = True
    else:
        subs["betaChannelEnabled"] = False

    with open(templateFile) as f:
        template = f.read()
    releaseConfig = substituteReleaseConfig(template, **subs)
    # Write out the new configs on the production branch...
    with open(cfgFile, 'w') as f:
        f.write(releaseConfig)
    with open(l10nChangesetsFile, 'w') as f:
        f.write(l10nContents)
    prodRev = commit(workdir, 'Update release config for %s' % release['name'],
                     user=hg_username)
    # We always force tagging, because it makes it easier to retrigger a
    # release that fails for infrastructure reasons.
    tag(workdir, tags, rev=prodRev, force=True, user=hg_username)

    # And then write the same files to the default branch
    update(workdir, defaultBranch)
    with open(cfgFile, 'w') as f:
        f.write(releaseConfig)
    with open(l10nChangesetsFile, 'w') as f:
        f.write(l10nContents)
    commit(workdir, 'Update release config for %s' % release['name'],
           user=hg_username)
开发者ID:Callek,项目名称:build-tools,代码行数:48,代码来源:release-runner.py

示例10: bump_configs

def bump_configs(release, cfgFile, l10nContents, workdir,
                 hg_username, productionBranch, defaultBranch='default'):
    # Update the production branch first, because that's where we want to read
    # the templates from
    update(workdir, productionBranch)
    cfgDir = path.join(workdir, 'mozilla')
    templateFile = path.join(cfgDir, '%s.template' % cfgFile)
    tags = getTags(getBaseTag(release['product'], release['version']),
                   release['buildNumber'])
    cfgFile = path.join(cfgDir, cfgFile)
    l10nChangesetsFile = path.join(
        cfgDir,
        readReleaseConfig(cfgFile)['l10nRevisionFile']
    )
    subs = release.copy()
    if 'partials' in release:
        subs['partials'] = getPartials(release)

    with open(templateFile) as f:
        template = f.read()
    releaseConfig = substituteReleaseConfig(template, **subs)
    # Write out the new configs on the production branch...
    with open(cfgFile, 'w') as f:
        f.write(releaseConfig)
    with open(l10nChangesetsFile, 'w') as f:
        f.write(l10nContents)
    prodRev = commit(workdir, 'Update release config for %s' % release['name'],
                     user=hg_username)
    # We always force tagging, because it makes it easier to retrigger a
    # release that fails for infrastructure reasons.
    tag(workdir, tags, rev=prodRev, force=True, user=hg_username)

    # And then write the same files to the default branch
    update(workdir, defaultBranch)
    with open(cfgFile, 'w') as f:
        f.write(releaseConfig)
    with open(l10nChangesetsFile, 'w') as f:
        f.write(l10nContents)
    commit(workdir, 'Update release config for %s' % release['name'],
           user=hg_username)
开发者ID:magnyld,项目名称:build-tools,代码行数:40,代码来源:release-runner.py

示例11: tag_and_push

 def tag_and_push(repo, attempt):
     update(workdir, branch)
     tag(workdir, tags, rev=branch, force=True, user=hg_username)
     log.info("Tagged %s, attempt #%s" % (repo, attempt))
开发者ID:magnyld,项目名称:build-tools,代码行数:4,代码来源:release-runner.py

示例12: buildbot2updatePlatforms

    for opt in required_options:
        if not options_dict[opt]:
            parser.error("Required option %s not present" % opt)

    if options.verbose:
        log.setLevel(logging.DEBUG)
    else:
        log.setLevel(logging.INFO)

    update_platform = buildbot2updatePlatforms(options.platform)[0]
    ftp_platform = buildbot2ftp(options.platform)
    full_check_locales = options.full_check_locales

    # Variables from release config
    retry(mercurial, args=(options.buildbot_configs, 'buildbot-configs'))
    update('buildbot-configs', revision=options.release_tag)
    release_config = validate(options)
    product_name = release_config['productName']
    staging_server = FTP_SERVER_TEMPLATE % release_config['stagingServer']
    aus_server_url = release_config['ausServerUrl']
    build_number = release_config['buildNumber']
    previous_releases_staging_server = FTP_SERVER_TEMPLATE % \
        release_config.get('previousReleasesStagingServer',
                           release_config['stagingServer'])

    # Current version data
    pc = PatcherConfig(open(options.config).read())
    app_name = pc['appName']
    to_version = pc['current-update']['to']
    to_ = makeReleaseRepackUrls(
        product_name, app_name, to_version, options.platform,
开发者ID:MaxMillion,项目名称:build-tools,代码行数:31,代码来源:create-update-verify-configs.py

示例13: repackLocale

def repackLocale(locale, l10nRepoDir, l10nBaseRepo, revision, localeSrcDir,
                 l10nIni, compareLocalesRepo, env, absObjdir, merge=True,
                 productName=None, platform=None,
                 version=None, partialUpdates=None,
                 buildNumber=None, stageServer=None,
                 mozillaDir=None, mozillaSrcDir=None):
    repo = "/".join([l10nBaseRepo, locale])
    localeDir = path.join(l10nRepoDir, locale)
    mercurial(repo, localeDir)
    update(localeDir, revision=revision)

    # It's a bad assumption to make, but the source dir is currently always
    # one level above the objdir.
    absSourceRepoPath = path.split(absObjdir)[0]
    use_pymake = env.get("USE_PYMAKE", False)
    make = getMakeCommand(use_pymake, absSourceRepoPath)

    env["AB_CD"] = locale
    env["LOCALE_MERGEDIR"] = path.abspath(path.join(localeSrcDir, "merged"))
    if sys.platform.startswith('win'):
        if use_pymake:
            env["LOCALE_MERGEDIR"] = msys2windows(env["LOCALE_MERGEDIR"])
        else:
            env["LOCALE_MERGEDIR"] = windows2msys(env["LOCALE_MERGEDIR"])
    if sys.platform.startswith('darwin'):
        env["MOZ_PKG_PLATFORM"] = "mac"
    UPLOAD_EXTRA_FILES = []
    if mozillaDir:
        nativeDistDir = path.normpath(path.abspath(
            path.join(localeSrcDir, '../../%s/dist' % mozillaDir)))
    else:
        nativeDistDir = path.normpath(path.abspath(
            path.join(localeSrcDir, '../../dist')))
    posixDistDir = windows2msys(nativeDistDir)
    mar = '%s/host/bin/mar' % posixDistDir
    mbsdiff = '%s/host/bin/mbsdiff' % posixDistDir
    if platform.startswith('win'):
        mar += ".exe"
        mbsdiff += ".exe"
    current = '%s/current' % posixDistDir
    previous = '%s/previous' % posixDistDir
    updateDir = 'update/%s/%s' % (buildbot2ftp(platform), locale)
    updateAbsDir = '%s/%s' % (posixDistDir, updateDir)
    current_mar = '%s/%s-%s.complete.mar' % (
        updateAbsDir, productName, version)
    unwrap_full_update = '../../../tools/update-packaging/unwrap_full_update.pl'
    make_incremental_update = '../../tools/update-packaging/make_incremental_update.sh'
    prevMarDir = '../../../../'
    if mozillaSrcDir:
        # Compensate for having the objdir or not.
        additionalParent = ''
        if mozillaDir:
            additionalParent = '../'

        unwrap_full_update = '../../../%s%s/tools/update-packaging/unwrap_full_update.pl' % (additionalParent, mozillaSrcDir)
        make_incremental_update = '../../%s%s/tools/update-packaging/make_incremental_update.sh' % (additionalParent, mozillaSrcDir)
        prevMarDir = '../../../../%s' % additionalParent
    env['MAR'] = mar
    env['MBSDIFF'] = mbsdiff

    log.info("Download mar tools")
    if stageServer:
        candidates_dir = makeCandidatesDir(productName, version, buildNumber,
                                           protocol="http", server=stageServer)
        if not path.isfile(msys2windows(mar)):
            marUrl = "%(c_dir)s/mar-tools/%(platform)s/%(mar)s" % \
                dict(c_dir=candidates_dir, platform=platform,
                     mar=path.basename(mar))
            run_cmd(['mkdir', '-p', path.dirname(mar)])
            log.info("Downloading %s to %s", marUrl, mar)
            urlretrieve(marUrl, msys2windows(mar))
            if not sys.platform.startswith('win'):
                run_cmd(['chmod', '755', mar])
        if not path.isfile(msys2windows(mbsdiff)):
            mbsdiffUrl = "%(c_dir)s/mar-tools/%(platform)s/%(mbsdiff)s" % \
                dict(c_dir=candidates_dir, platform=platform,
                     mbsdiff=path.basename(mbsdiff))
            run_cmd(['mkdir', '-p', path.dirname(mbsdiff)])
            log.info("Downloading %s to %s", mbsdiffUrl, mbsdiff)
            urlretrieve(mbsdiffUrl, msys2windows(mbsdiff))
            if not sys.platform.startswith('win'):
                run_cmd(['chmod', '755', mbsdiff])
    else:
        log.warning('stageServer not set. mar tools will *not* be downloaded.')

    compareLocales(compareLocalesRepo, locale, l10nRepoDir, localeSrcDir,
                   l10nIni, revision=revision, merge=merge)
    run_cmd(make + ["installers-%s" % locale], cwd=localeSrcDir, env=env)

    # Our Windows-native rm from bug 727551 requires Windows-style paths
    run_cmd(['rm', '-rf', msys2windows(current)])
    run_cmd(['mkdir', current])
    run_cmd(['perl', unwrap_full_update, current_mar],
            cwd=path.join(nativeDistDir, 'current'), env=env)
    for oldVersion in partialUpdates:
        prevMar = partialUpdates[oldVersion]['mar']
        if prevMar:
            partial_mar_name = '%s-%s-%s.partial.mar' % (productName, oldVersion,
                                                         version)
            partial_mar = '%s/%s' % (updateAbsDir, partial_mar_name)
#.........这里部分代码省略.........
开发者ID:lundjordan,项目名称:build-tools,代码行数:101,代码来源:l10n.py

示例14: mercurial

    parser.add_argument("-b", "--buildbot-configs",
                        help="buildbot-configs mercurial repo URL",
                        default=os.environ.get("BUILDBOT_CONFIGS",
                                               DEFAULT_BUILDBOT_CONFIGS_REPO))
    parser.add_argument("-t", "--release-tag", required=True)
    parser.add_argument("--product", help="Override for stage_product")
    parser.add_argument("--ssh-user", required=True)
    parser.add_argument("--ssh-key", required=True)
    parser.add_argument("--overwrite", default=False, action="store_true")
    parser.add_argument("--extra-excludes", action="append")
    parser.add_argument("actions", nargs="+", help="Script actions")

    args = parser.parse_args()
    actions = args.actions
    mercurial(args.buildbot_configs, "buildbot-configs")
    update("buildbot-configs", revision=args.release_tag)

    releaseConfigFile = path.join("buildbot-configs", args.release_config)
    releaseConfig = readReleaseConfig(
        releaseConfigFile, required=REQUIRED_RELEASE_CONFIG)

    productName = args.product or releaseConfig['stage_product']
    version = releaseConfig['version']
    buildNumber = releaseConfig['buildNumber']
    stageServer = releaseConfig['stagingServer']
    stageUsername = args.ssh_user
    stageSshKey = args.ssh_key
    stageSshKey = path.join(os.path.expanduser("~"), ".ssh", stageSshKey)
    createIndexFiles = releaseConfig.get('makeIndexFiles', False) \
        and productName != 'xulrunner'
    syncPartnerBundles = releaseConfig.get('syncPartnerBundles', False) \
开发者ID:lundjordan,项目名称:build-tools,代码行数:31,代码来源:stage-tasks.py

示例15: mercurial

        objdir="obj-l10n"
    )
    parser.add_option("-c", "--configfile", dest="configfile")
    parser.add_option("-B", "--branch", dest="branch")
    parser.add_option("-b", "--buildbot-configs", dest="buildbotConfigs")
    parser.add_option("-p", "--platform", dest="platform")
    parser.add_option("-s", "--stage-platform", dest="stage_platform",
                      default=None)
    parser.add_option("-o", "--objdir", dest="objdir")
    parser.add_option("-l", "--locale", dest="locales", action="append")
    parser.add_option("--chunks", dest="chunks", type="int")
    parser.add_option("--this-chunk", dest="thisChunk", type="int")

    options, args = parser.parse_args()
    mercurial(options.buildbotConfigs, "buildbot-configs")
    update("buildbot-configs", revision="default")
    branchConfig = validate(options, args)
    platformConfig = branchConfig["platforms"][options.platform]
    mobileDirName = platformConfig.get('mobile_dir', 'mobile')

    if options.chunks:
        locales = getNightlyLocalesForChunk(mobileDirName,
            options.branch, options.platform,
            options.chunks, options.thisChunk)
    else:
        locales = options.locales

    mozconfig = path.join("buildbot-configs", "mozilla2",
                          platformConfig["mozconfig"], "l10n-mozconfig")

    ftpProduct = "mobile"
开发者ID:EkkiD,项目名称:build-tools,代码行数:31,代码来源:nightly-mobile-repacks.py


注:本文中的util.hg.update函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。