]> git.pld-linux.org Git - packages/git-core-slug.git/commitdiff
- small fixes auto/th/git-core-slug-0.13.4-6
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Nov 2014 21:35:00 +0000 (22:35 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Nov 2014 21:35:00 +0000 (22:35 +0100)
git-core-slug-parallel.patch

index ace228e9a5f50ef2cdbc5482183d59d0e2134d33..d6266c8f2c774b2df0f95b9b1c102bf4266efba3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/slug.py  2014-10-19 18:07:38.000000000 +0200
-+++ b/slug.py  2014-11-20 22:14:19.182018701 +0100
-@@ -7,26 +7,18 @@
++++ b/slug.py  2014-11-20 22:31:39.005919529 +0100
+@@ -7,26 +7,18 @@ import os
  import shutil
  import subprocess
  import queue
@@ -30,7 +30,7 @@
  class UnquoteConfig(configparser.ConfigParser):
      def get(self, section, option, **kwargs):
          value = super().get(section, option, **kwargs)
-@@ -43,25 +35,15 @@
+@@ -43,25 +35,15 @@ class DelAppend(argparse._AppendAction):
          item.append(values)
          setattr(namespace, self.dest, item)
  
@@ -65,7 +65,7 @@
  
  def readconfig(path):
      config = UnquoteConfig(delimiters='=', interpolation=None, strict=False)
-@@ -114,18 +96,19 @@
+@@ -114,18 +96,19 @@ def getrefs(*args):
          sys.exit(2)
      return refs
  
@@ -94,7 +94,7 @@
      for pkgdir in sorted(refs.heads):
          gitdir = os.path.join(options.packagesdir, pkgdir, '.git')
          if not os.path.isdir(gitdir):
-@@ -143,9 +126,18 @@
+@@ -143,9 +126,18 @@ def fetch_packages(options, return_all=F
                  ref2fetch.append('+{}:{}/{}'.format(ref, REMOTEREFS, ref[len('refs/heads/'):]))
          if ref2fetch:
              ref2fetch.append('refs/notes/*:refs/notes/*')
  
      if options.prune:
          refs = getrefs('*')
-@@ -158,26 +150,60 @@
+@@ -158,26 +150,60 @@ def fetch_packages(options, return_all=F
      if return_all:
          return refs.heads
      else:
 -            repo.checkout(options.checkout)
 -        except GitRepoError as e:
 -            print('Problem with checking branch {} in repo {}: {}'.format(options.checkout, repo.gdir, e), file=sys.stderr)
-+        repos.append((GitRepo(os.path.join(options.packagesdir, pkgdir)), options.checkout))
-+    pool = multiprocessing.Poll(options.jobs)
++        repos.append(GitRepo(os.path.join(options.packagesdir, pkgdir)))
++    pool = WorkerPool(options.jobs)
 +    try:
 +        pool.starmap(checkout_package, zip(repos, [options] * len(repos)))
 +    except KeyboardInterrupt:
 -        except GitRepoError as e:
 -            print('Problem with checking branch master in repo {}: {}'.format(repo.gdir, e), file=sys.stderr)
 +    repos = fetch_packages(options)
-+    pool = multiprocessing.Poll(options.jobs)
++    pool = WorkerPool(options.jobs)
 +    try:
 +        pool.starmap(clone_package, zip(repos, [options] * len(repos)))
 +    except KeyboardInterrupt:
  
  def pull_packages(options):
      repolist = []
-@@ -189,19 +215,14 @@
+@@ -189,19 +215,14 @@ def pull_packages(options):
      else:
          repolist = fetch_packages(options, False)
      print('--------Pulling------------')
  
  def list_packages(options):
      refs = getrefs(options.branch, options.repopattern)
-@@ -213,7 +234,7 @@
+@@ -213,7 +234,7 @@ common_options.add_argument('-d', '--pac
      default=os.path.expanduser('~/rpm/packages'))
  
  common_fetchoptions = argparse.ArgumentParser(add_help=False, parents=[common_options])
This page took 0.095875 seconds and 4 git commands to generate.