[projects/git-slug: 108/170] Remove obsoleted GitRemoteRefsData and options.remoterefs

glen glen at pld-linux.org
Mon Sep 21 21:47:53 CEST 2015


commit 5b8ab357acc62855618165f50ca7041e38ff2db5
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Mon Mar 26 12:40:54 2012 +0100

    Remove obsoleted GitRemoteRefsData and options.remoterefs

 git_slug/refsdata.py | 11 -----------
 slug.py              |  8 ++------
 slug.py.txt          |  5 -----
 3 files changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/git_slug/refsdata.py b/git_slug/refsdata.py
index e12a94b..258169a 100644
--- a/git_slug/refsdata.py
+++ b/git_slug/refsdata.py
@@ -35,17 +35,6 @@ class RemoteRefsData:
                 if self.heads[repo][ref] != EMPTYSHA1:
                     stream.write('{} {} {}\n'.format(self.heads[repo][ref], ref, repo))
 
-class GitRemoteRefsData(RemoteRefsData):
-    def __init__(self, path, pattern, dirpattern=('*')):
-        refsrepo = GitRepo(git_dir=path)
-        if not os.path.isdir(refsrepo.gdir):
-            refsrepo.init('git://' + os.path.join(GITSERVER, REFREPO))
-        refsrepo.fetch(depth=1)
-        showfile = refsrepo.showfile(REFFILE)
-        RemoteRefsData.__init__(self, showfile.stdout, pattern, dirpattern)
-        if showfile.wait():
-            raise RemoteRefsError(REFFILE, path)
-
 class GitArchiveRefsData(RemoteRefsData):
     def __init__(self, pattern, dirpattern=('*')):
         fullrefrepo = 'git://{}/{}'.format(GITSERVER, REFREPO)
diff --git a/slug.py b/slug.py
index 40120ba..c76ad5c 100755
--- a/slug.py
+++ b/slug.py
@@ -53,7 +53,7 @@ def readconfig(path):
     for option in ('newpkgs', 'prune'):
         if config.has_option('PLD', option):
             optionslist[option] = config.getboolean('PLD', option)
-    for option in ('depth', 'repopattern', 'packagesdir', 'remoterefs'):
+    for option in ('depth', 'repopattern', 'packagesdir'):
         if config.has_option('PLD', option):
             optionslist[option] = config.get('PLD', option)
     if config.has_option('PLD','branch'):
@@ -62,7 +62,7 @@ def readconfig(path):
         if config.has_option('PLD', option):
             optionslist[option] = config.getint('PLD', option)
 
-    for pathopt in ('packagesdir', 'remoterefs'):
+    for pathopt in ('packagesdir'):
         if pathopt in optionslist:
             optionslist[pathopt] = os.path.expanduser(optionslist[pathopt])
     return optionslist
@@ -158,8 +158,6 @@ common_options.add_argument('-d', '--packagesdir', help='local directory with gi
 
 common_fetchoptions = argparse.ArgumentParser(add_help=False, parents=[common_options])
 common_fetchoptions.add_argument('-j', '--jobs', help='number of threads to use', default=4, type=int)
-common_fetchoptions.add_argument('-r', '--remoterefs', help='repository with list of all refs',
-    default=os.path.expanduser('~/PLD_clone/Refs.git'))
 common_fetchoptions.add_argument('repopattern', nargs='*', default = ['*'])
 
 parser = argparse.ArgumentParser(description='PLD tool for interaction with git repos',
@@ -193,8 +191,6 @@ fetch.set_defaults(func=clone_packages, branch='[*]', prune=False, depth=0, newp
 
 listpkgs = subparsers.add_parser('list', help='list repositories',
         formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-listpkgs.add_argument('-r', '--remoterefs', help='repository with list of all refs',
-    default=os.path.expanduser('~/PLD_clone/Refs.git'))
 listpkgs.add_argument('-b', '--branch', help='show packages with given branch', action=DelAppend, default=['*'])
 listpkgs.add_argument('repopattern', nargs='*', default = ['*'])
 listpkgs.set_defaults(func=list_packages)
diff --git a/slug.py.txt b/slug.py.txt
index 8009135..73c63c3 100644
--- a/slug.py.txt
+++ b/slug.py.txt
@@ -34,11 +34,6 @@ OPTIONS
 -j <threads>::
     Set the number of threads which are used for fetching operations.
 
--r <repository>::
---remoterefs <repository>::
-    The location of special git repository necessary for slug.py operations. By
-    default $HOME/PLD_clone/Refs.git is assumed.
-
 COMMANDS
 --------
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list