delete unmaintained clone_deps script
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 07 Jul 2015 21:13:23 +0200
changeset 10523 f245d865821e
parent 10522 1660a0fa4f43
child 10524 5392f100c0e3
delete unmaintained clone_deps script Closes #2517580.
bin/clone_deps.py
doc/book/admin/setup.rst
--- a/bin/clone_deps.py	Thu Jul 09 16:43:56 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-#!/usr/bin/python
-import sys
-
-from subprocess import call as sbp_call, Popen, PIPE
-from urllib import urlopen
-import os
-from os import path as osp, pardir, chdir
-
-
-def find_mercurial():
-    print "trying to find mercurial from the command line ..."
-    print '-' * 20
-    tryhg = sbp_call(['hg', '--version'])
-    if tryhg:
-        print 'mercurial seems to be unavailable, please install it'
-        raise
-    print '-' * 20
-    def hg_call(args):
-        return sbp_call(['hg'] + args)
-
-    return hg_call
-
-
-BASE_URL = 'http://www.logilab.org/hg/'
-
-to_clone = ['fyzz', 'yams', 'rql',
-            'logilab/common', 'logilab/constraint', 'logilab/database',
-            'logilab/devtools', 'logilab/mtconverter',
-            'cubes/blog', 'cubes/calendar', 'cubes/card', 'cubes/comment',
-            'cubes/datafeed', 'cubes/email', 'cubes/file', 'cubes/folder',
-            'cubes/forgotpwd', 'cubes/keyword', 'cubes/link', 'cubes/localperms',
-            'cubes/mailinglist', 'cubes/nosylist', 'cubes/person',
-            'cubes/preview', 'cubes/registration', 'cubes/rememberme',
-            'cubes/tag', 'cubes/vcsfile', 'cubes/zone']
-
-# a couple of functions to be used to explore available
-# repositories and cubes
-def list_repos(repos_root):
-    assert repos_root.startswith('http://')
-    hgwebdir_repos = (repo.strip()
-                      for repo in urlopen(repos_root + '?style=raw').readlines()
-                      if repo.strip())
-    prefix = osp.commonprefix(hgwebdir_repos)
-    return (repo[len(prefix):].strip('/')
-            for repo in hgwebdir_repos)
-
-def list_all_cubes(base_url=BASE_URL):
-    all_repos = list_repos(base_url)
-    #search for cubes
-    for repo in all_repos:
-        if repo.startswith('cubes'):
-            to_clone.append(repo)
-
-def get_latest_debian_tag(path):
-    proc = Popen(['hg', '-R', path, 'tags'], stdout=PIPE)
-    out, _err = proc.communicate()
-    for line in out.splitlines():
-        if 'debian-version' in line:
-            return line.split()[0]
-
-def main():
-    if len(sys.argv) == 1:
-        base_url = BASE_URL
-    elif len(sys.argv) == 2:
-        base_url = sys.argv[1]
-    else:
-        sys.stderr.write('usage %s [base_url]\n' %  sys.argv[0])
-        sys.exit(1)
-    hg_call = find_mercurial()
-    print len(to_clone), 'repositories will be cloned'
-    base_dir = osp.normpath(osp.join(osp.dirname(__file__), pardir, pardir))
-    chdir(base_dir)
-    not_updated = []
-    for repo in to_clone:
-        url = base_url + repo
-        if '/' not in repo:
-            target_path = repo
-        else:
-            assert repo.count('/') == 1, repo
-            directory, repo = repo.split('/')
-            if not osp.isdir(directory):
-                os.mkdir(directory)
-                open(osp.join(directory, '__init__.py'), 'w').close()
-            target_path = osp.join(directory, repo)
-        if osp.exists(target_path):
-            print target_path, 'seems already cloned. Skipping it.'
-        else:
-            hg_call(['clone', '-U', url, target_path])
-            tag = get_latest_debian_tag(target_path)
-            if tag:
-                print 'updating to', tag
-                hg_call(['update', '-R', target_path, tag])
-            else:
-                not_updated.append(target_path)
-    print """
-CubicWeb dependencies and standard set of cubes have been fetched and
-update to the latest stable version.
-
-You should ensure your PYTHONPATH contains `%(basedir)s`.
-You might want to read the environment configuration section of the documentation
-at http://docs.cubicweb.org/admin/setup.html#environment-configuration
-
-You can find more cubes at http://www.cubicweb.org.
-Clone them from `%(baseurl)scubes/` into the `%(basedir)s%(sep)scubes%(sep)s` directory.
-
-To get started you may read http://docs.cubicweb.org/tutorials/base/index.html.
-""" % {'basedir': os.getcwd(), 'baseurl': base_url, 'sep': os.sep}
-    if not_updated:
-        sys.stderr.write('WARNING: The following repositories were not updated (no debian tag found):\n')
-        for path in not_updated:
-            sys.stderr.write('\t-%s\n' % path)
-
-if __name__ == '__main__':
-    main()
-
-
-
--- a/doc/book/admin/setup.rst	Thu Jul 09 16:43:56 2015 +0200
+++ b/doc/book/admin/setup.rst	Tue Jul 07 21:13:23 2015 +0200
@@ -242,28 +242,7 @@
 To keep-up with on-going development, clone the :ref:`Mercurial
 <MercurialPresentation>` repository::
 
-  hg clone -u stable http://hg.logilab.org/cubicweb # stable branch
+  hg clone -u 'last(tag())' http://hg.logilab.org/cubicweb # stable version
   hg clone http://hg.logilab.org/cubicweb # development branch
 
-To get many of CubicWeb's dependencies and a nice set of base cubes, run the
-`clone_deps.py` script located in `cubicweb/bin/`::
-
-  python cubicweb/bin/clone_deps.py
-
-(Windows users should replace slashes with antislashes).
-
-This script will clone a set of mercurial repositories into the
-directory containing the ``cubicweb`` repository, and update them to the
-latest published version tag (if any).
-
-.. note::
-
-  In every cloned repositories, a `hg tags` will display a list of
-  tags in reverse chronological order. One reasonnable option is to go to a
-  tagged version: the latest published version or example, as done by
-  the `clone_deps` script)::
-
-   hg update cubicweb-version-3.12.2
-
 Make sure you also have all the :ref:`InstallDependencies`.
-