Return a new release VCS that can release from this source path.
973174
def create_release_vcs(path, vcs_name=None):
    """"""
    from rez.plugin_managers import plugin_manager
    vcs_types = get_release_vcs_types()
    if vcs_name:
        if vcs_name not in vcs_types:
            raise ReleaseVCSError("Unknown version control system: %r" % vcs_name)
        cls = plugin_manager.get_plugin_class('release_vcs', vcs_name)
        return cls(path)

    classes_by_level = {}
    for vcs_name in vcs_types:
        cls = plugin_manager.get_plugin_class('release_vcs', vcs_name)
        result = cls.find_vcs_root(path)
        if not result:
            continue
        vcs_path, levels_up = result
        classes_by_level.setdefault(levels_up, []).append((cls, vcs_path))

    if not classes_by_level:
        raise ReleaseVCSError("No version control system for package "
                      "releasing is associated with the path %s" % path)

    # it's ok to have multiple results, as long as there is only one at the
    # "closest" directory up from this dir - ie, if we start at:
    #    /blah/foo/pkg_root
    # and these dirs exist:
    #    /blah/.hg
    #    /blah/foo/.git
    # ...then this is ok, because /blah/foo/.git is "closer" to the original
    # dir, and will be picked. However, if these two directories exist:
    #    /blah/foo/.git
    #    /blah/foo/.hg
    # ...then we error, because we can't decide which to use

    lowest_level = sorted(classes_by_level)[0]
    clss = classes_by_level[lowest_level]
    if len(clss) > 1:
        clss_str = ", ".join(x[0].name() for x in clss)
        raise ReleaseVCSError("Several version control systems are associated "
                              "with the path %s: %s. Use rez-release --vcs to "
                              "choose." % (path, clss_str))
    else:
        cls, vcs_root = clss[0]
        return cls(pkg_root=path, vcs_root=vcs_root)
514812
def clone(cls, srcpath, destpath):
        """"""
        try:
            os.makedirs(destpath)
        except OSError as e:
            if not e.errno == errno.EEXIST:
                raise
        cmd = [SVNADMIN, 'dump', '--quiet', '.']
        dump = subprocess.Popen(
               cmd, cwd=srcpath, stdout=subprocess.PIPE,
               stderr=subprocess.PIPE,
        )
        repo = cls.create(destpath)
        repo.load(dump.stdout)
        stderr = dump.stderr.read()
        dump.stdout.close()
        dump.stderr.close()
        dump.wait()
        if dump.returncode != 0:
            raise subprocess.CalledProcessError(dump.returncode, cmd, stderr)
        return repo
1317851
def release():
    

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules', '--'))

    if r.return_code != 0:
        abort('There are uncommitted changes, commit or stash them before releasing')

    version = open('VERSION.txt').read().strip()

    print('Releasing %s...' % version)
    local(clom.git.flow.release.start(version))
    local(clom.git.flow.release.finish(version, m='Release-%s' % version))
    local(clom.git.push('origin', 'master', 'develop', tags=True))
    local(clom.python('setup.py', 'sdist', 'upload'))
1051934
def _copy_update(sourcepath, destname):
    """"""
    if sys.platform.startswith('linux'):
        return os.system("/bin/cp -ua '%s' '%s'" % (sourcepath, destname))
    else:
        return os.system("rsync -ua '%s' '%s'" % (sourcepath, destname))
1120632
def bin_path(self, release=None):
        """"""
        if release:
            for r in self.releases:
                if release in r:
                    return self.releases[r]
            raise MongoOrchestrationError("No such release '%s' in %r"
                                          % (release, self.releases))
        if self.default_release:
            return self.releases[self.default_release]
        if self.releases:
            return list(self.releases.values())[0]
        return ''
390952
def init(vcs):
    
    path = os.path.join(vcs.private_dir(), 'locks')
    if not os.path.exists(path):
        os.mkdir(path)
72714
def _release_version():
    '''
    
    '''
    with io.open(os.path.join(SETUP_DIRNAME, 'saltpylint', 'version.py'), encoding='utf-8') as fh_:
        exec_locals = {}
        exec_globals = {}
        contents = fh_.read()
        if not isinstance(contents, str):
            contents = contents.encode('utf-8')
        exec(contents, exec_globals, exec_locals)  # pylint: disable=exec-used
        return exec_locals['__version__']
51919
def pypi_release(self):
        
        meta = self.distribution.metadata
        pypi = ServerProxy(self.pypi_index_url)
        releases = pypi.package_releases(meta.name)
        if releases:
            return next(iter(sorted(releases, reverse=True)))
953334
def release(self, path, fh):
        ""
        #print "release! inpath:", path in self.__newfiles.keys()
        # if the path exists in self.__newfiles.keys(), we have a new version to upload
        try:
            f = self.__newfiles[path] # make a local shortcut to Stringio object
            f.seek(0, os.SEEK_END)
            if f.tell() > 0: # file has length
                self.client.up(path, f) # upload to jottacloud
            del self.__newfiles[path]
            del f
            self._dirty(path)
        except KeyError:
            pass
        return ESUCCESS
448034
def release(path, repository):
    """"""
    upgrader = InvenioUpgrader()
    logger = upgrader.get_logger()

    try:
        endpoints = upgrader.find_endpoints()

        if not endpoints:
            logger.error("No upgrades found.")
            click.Abort()

        depends_on = []
        for repo, upgrades in endpoints.items():
            depends_on.extend(upgrades)

        return recipe(path,
                      repository=repository,
                      depends_on=depends_on,
                      release=True,
                      output_path=output_path)

    except RuntimeError as e:
        for msg in e.args:
            logger.error(unicode(msg))
        raise
1173758
def release(ctx, sdist=True, wheel=True, sign=True, dry_run=False, index=None):
    
    # Build docs first. Use terribad workaround pending invoke #146
    ctx.run("inv docs", pty=True, hide=False)
    # Move the built docs into where Epydocs used to live
    target = "docs"
    rmtree(target, ignore_errors=True)
    # TODO: make it easier to yank out this config val from the docs coll
    copytree("sites/docs/_build", target)
    # Publish
    publish(
        ctx, sdist=sdist, wheel=wheel, sign=sign, dry_run=dry_run, index=index
    )
    # Remind
    print(
        "\n\nDon't forget to update RTD's versions page for new minor "
        "releases!"
    )
305192
def release():
    ""
    sh("paver bdist_wheel")
    wheels = path("dist").files("*.whl")
    if not wheels:
        error("\n*** ERROR: No release wheel was built!")
        sys.exit(1)
    if any(".dev" in i for i in wheels):
        error("\n*** ERROR: You're still using a 'dev' version!")
        sys.exit(1)

    # Check that source distribution can be built and is complete
    print('')
    print("~" * 78)
    print("TESTING SOURCE BUILD")
    sh( "{ command cd dist/ && unzip -q %s-%s.zip && command cd %s-%s/"
        "  && /usr/bin/python setup.py sdist >/dev/null"
        "  && if { unzip -ql ../%s-%s.zip; unzip -ql dist/%s-%s.zip; }"
        "        | cut -b26- | sort | uniq -c| egrep -v '^ +2 +' ; then"
        "       echo '^^^ Difference in file lists! ^^^'; false;"
        "    else true; fi; } 2>&1"
        % tuple([project["name"], version] * 4)
    )
    path("dist/%s-%s" % (project["name"], version)).rmtree()
    print("~" * 78)

    print('')
    print("Created", " ".join([str(i) for i in path("dist").listdir()]))
    print("Use 'paver sdist bdist_wheel' to build the release and")
    print("    'twine upload dist/*.{zip,whl}' to upload to PyPI")
    print("Use 'paver dist_docs' to prepare an API documentation upload")
1356342
def cleanup_releases(limit=5):
    

    init_tasks()

    max_versions = limit + 1

    env.run("ls -dt %s/*/ | tail -n +%s | xargs rm -rf" % (
        paths.get_releases_path(),
        max_versions)
    )
1300011
def release(self, jid, priority=DEFAULT_PRIORITY, delay=0):
        """"""
        self._interact('release %d %d %d\r\n' % (jid, priority, delay),
                       ['RELEASED', 'BURIED'],
                       ['NOT_FOUND'])
507228
def release():
    ""
    version = run('python setup.py --version').stdout.strip()
    assert version, 'No version found in setup.py?'

    print('### Releasing new version: {0}'.format(version))
    run('git tag {0}'.format(version))
    run('git push --tags')

    run('python setup.py sdist bdist_wheel')
    run('twine upload -s dist/*')
28144
function createRelease(endpoint, version) {
  return new Promise(function(resolve, reject) {
    superagent
      .post(endpoint)
      .set(HEADERS)
      .send({ version: version })
      .end(function(err, res) {
        if (!err) {
          console.log('Sentry - Pushed release. Version: ' + version);
          resolve(res);
        } else {
          reject(err);
        }
      });
  });
}
1290954
def get_vc_dir_from_vs_dir(self):
        
        vc_dir = os.path.join(self.vs_dir, 'vc')
        if os.path.isdir(vc_dir):
            logging.info(_('using vc: %s'), vc_dir)
            return vc_dir
        logging.debug(_('vc not found: %s'), vc_dir)
        return ''