[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Debian JP master SVN www commits (rev.938)
=======================================================
Repository: /org/svn.debian.or.jp/repos
Revision: 938
Commiter: kmuto
Date: 2009-10-11 00:13:14 +0900 (日, 11 10月 2009)
=======================================================
Log:
import CVS->git sync routine
=======================================================
Changed:
A webwml-sync/sync
A webwml-sync/webwml-git-committer.rb
Added: webwml-sync/sync
===================================================================
--- webwml-sync/sync (rev 0)
+++ webwml-sync/sync 2009-10-10 15:13:14 UTC (rev 938)
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Copyright 2009 Kenshi Muto <kmuto@debian.org>
+
+# copy from webwml CVS to Git.
+rsync -aqu --delete --exclude CVS --exclude .cvsignore webwml/english webwml-git
+rsync -aqu --delete --exclude CVS --exclude .cvsignore webwml/japanese webwml-git
+
+cd webwml-git
+../webwml-git-committer.rb
Property changes on: webwml-sync/sync
___________________________________________________________________
Name: svn:executable
+ *
Added: webwml-sync/webwml-git-committer.rb
===================================================================
--- webwml-sync/webwml-git-committer.rb (rev 0)
+++ webwml-sync/webwml-git-committer.rb 2009-10-10 15:13:14 UTC (rev 938)
@@ -0,0 +1,27 @@
+#!/usr/bin/ruby
+# Copyright 2009 Kenshi Muto <kmuto@debian.org>
+
+fromaddress = "webwml sync robot <kmuto_webwml@xxxxxxxx>"
+exit(0) if File.exists?("../webwml-git-committer-lock")
+
+File.new("../webwml-git-committer-lock", "w")
+
+lines = nil
+IO.popen("git ls-files -d -m -o -t") {|f| lines = f.readlines }
+lines.each {|l|
+ status, filename = l.chomp.split(/ /, 2)
+ case status
+ when "?" # other (expected as new file)
+ fork { exec("git", "add", filename) }
+ Process.waitall
+ when "C" # modified/changed
+ when "R" # removed/deleted
+ else
+ raise "Unknown status '#{status}' for #{filename}!"
+ end
+}
+if lines.size > 0 || ARGV[0] == "force"
+ fork { exec("git", "commit", "--author", fromaddress, "-m", "* [auto] sync with cvs.", "-a", "-q") }
+ Process.waitall
+end
+File.unlink("../webwml-git-committer-lock")
Property changes on: webwml-sync/webwml-git-committer.rb
___________________________________________________________________
Name: svn:executable
+ *