[DRE-commits] [pkg-ruby-extras] 02/02: Remove files that were moved to scripts.git

zeha at debian.org zeha at debian.org
Wed Jun 29 20:20:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

zeha pushed a commit to branch master
in repository pkg-ruby-extras.

commit 2ae51bb7653e57886ed5cbd848eb897f50c2daf1
Author: Christian Hofstaedtler <christian at hofstaedtler.name>
Date:   Wed Jun 29 22:20:19 2016 +0200

    Remove files that were moved to scripts.git
---
 find-inactive-contributors | 90 ----------------------------------------------
 pet-cleanup                | 18 ----------
 2 files changed, 108 deletions(-)

diff --git a/find-inactive-contributors b/find-inactive-contributors
deleted file mode 100755
index 16b4982..0000000
--- a/find-inactive-contributors
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/env ruby
-
-# find possibly inactive contributors in pkg-ruby-extras team, by
-# looking at the file ownership for git object files.
-# requires all possible contributors to be part of the unix group
-# named GROUP.
-#
-# NOTE: MUST be run on alioth.debian.org.
-
-require 'json'
-require 'etc'
-require 'time'
-
-GROUP = 'pkg-ruby-extras'
-ROOT = "/srv/git.debian.org/git/#{GROUP}"
-DATAFILE = 'findinactive.data'
-TIME_ZERO = Time.at(0)
-DAYS_INACTIVE = 365 * 2
-
-def walk_git(dirname, newest)
-  puts "Walking #{dirname}"
-  Dir.glob("#{dirname}/objects/*").each do |objdir|
-    Dir.foreach(objdir) do |filename|
-      next if filename.start_with?('.')
-      path = "#{objdir}/#{filename}"
-      stat = File.stat(path)
-      newest[stat.uid] = stat.mtime if stat.mtime > newest[stat.uid]
-#      puts "#{path} #{stat.uid} #{stat.mtime}"
-#      puts "#{newest.inspect}"
-    end
-  end
-end
-
-def build_uid_map
-  uid_map = Hash.new
-  all_users = Etc.getgrnam(GROUP).mem
-  all_users.each do |username|
-    u = Etc.getpwnam(username).uid
-    uid_map[u] = username
-  end
-  uid_map
-end
-
-def build_data
-  data = {
-    :users => build_uid_map,
-    :newest => Hash.new(TIME_ZERO),
-  }
-  repos = Dir.glob(ROOT + '/*.git')
-  #repos = [repos[0]]  # limit work for now
-  repos.each do |r| walk_git(r, data[:newest]) end
-  puts "newest => #{data[:newest].inspect}"
-  File.write(DATAFILE, JSON.generate(data))
-end
-
-def print_info
-  puts "NOTE: Data generated by looking at owner and timestamp of git object files."
-  puts "NOTE: As such, it is likely incomplete."
-  data_json = JSON.parse(File.read(DATAFILE))
-  data = {
-    :users => data_json["users"],
-    :newest => data_json["newest"],
-  }
-  puts "email;last_contribution_date"
-  contribs = []
-  data[:users].each do |uid, username|
-    contrib_date = data[:newest][uid]
-    if contrib_date.nil? or contrib_date == TIME_ZERO then
-      puts "#{username}@users.alioth.debian.org;never"
-    else
-      contribs << [Time.parse(contrib_date), username]
-    end
-  end
-  contribs.sort_by! { |c| c[0] }
-  cutoff = (Date.today - DAYS_INACTIVE).to_time
-  contribs.each do |contrib_date, username|
-    if contrib_date < cutoff then
-      puts "#{username}@users.alioth.debian.org;#{contrib_date}"
-    end
-  end
-end
-
-case ARGV[0]
-when 'build'
-  build_data
-when 'info'
-  print_info
-else
-  puts "usage: findinactive.rb build|info"
-end
diff --git a/pet-cleanup b/pet-cleanup
deleted file mode 100755
index ab62b27..0000000
--- a/pet-cleanup
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/ruby -w
-# 1) Copy this file to git.debian.org
-# 2) cd /srv/home/groups/pet/htdocs/pet2-data/pkg-ruby-extras
-# 3) run ~/pet-cleanup
-# 4) check the .cleansed output file
-# 5) cp git-pkg-ruby-extras.json.cleansed git-pkg-ruby-extras.json
-# 6) /home/groups/pet/PET2/pkg-ruby-extras/pet-git-helper update-all
-
-require 'json'
-
-ROOT = '/git/pkg-ruby-extras'
-
-data = JSON.load File.read('git-pkg-ruby-extras.json')
-data.each do |pkgname|
-  data.delete pkgname if not File.exist?("#{ROOT}/#{pkgname}.git")
-end
-
-File.write('git-pkg-ruby-extras.json.cleansed', JSON.dump(data))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/pkg-ruby-extras.git



More information about the Pkg-ruby-extras-commits mailing list