commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[2689] Merge commit-from-log into svn2bzr


From: Robert Millan
Subject: [2689] Merge commit-from-log into svn2bzr
Date: Sat, 07 Nov 2009 14:12:49 +0000

Revision: 2689
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2689
Author:   robertmh
Date:     2009-11-07 14:12:48 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
Merge commit-from-log into svn2bzr

Modified Paths:
--------------
    people/robertmh/svn2bzr/svn2bzr

Removed Paths:
-------------
    people/robertmh/svn2bzr/commit-from-log

Deleted: people/robertmh/svn2bzr/commit-from-log
===================================================================
--- people/robertmh/svn2bzr/commit-from-log     2009-11-07 14:12:20 UTC (rev 
2688)
+++ people/robertmh/svn2bzr/commit-from-log     2009-11-07 14:12:48 UTC (rev 
2689)
@@ -1,65 +0,0 @@
-#!/bin/bash -e
-#
-# Copyright (C) 2009  Robert Millan
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-url="$1"
-dash_line="------------------------------------------------------------------------"
-
-die ()
-{
-  echo "$@" >&2
-  exit 1
-}
-
-process_commit=$(which process_commit || echo `dirname $0`/process_commit)
-
-bzr init
-
-st=0
-while read line ; do
-  case ${st} in
-    0)
-      if [ "${line}" != "${dash_line}" ] ; then
-        die "Unexpected input"
-      fi
-      st=1
-    ;;
-    1)
-      revision=`echo "${line}" | sed -e "s/^r\([0-9]*\) .*/\1/"`
-      username=`echo "${line}" | sed -e "s/^[^|]*| \([^ ]*\) .*/\1/"`
-      date=`echo "${line}" | sed -e "s/^[^|]*|[^|]*| \([^ ]* [^ ]* [^ ]*\) 
.*/\1/"`
-      date=`date +%s -d "${date}"`
-      unset message
-      read # empty line
-      st=2
-    ;;
-    2)
-      if [ "${line}" == "${dash_line}" ] ; then
-        ${process_commit} ${url} ${revision} ${username} "${date}" "${message}"
-        st=1
-        continue
-      fi
-      if [ "${message}" ] ; then
-        message="${message}
-${line}"
-      else
-        message="${line}"
-      fi
-    ;;
-  esac
-done
-
-exit 0

Modified: people/robertmh/svn2bzr/svn2bzr
===================================================================
--- people/robertmh/svn2bzr/svn2bzr     2009-11-07 14:12:20 UTC (rev 2688)
+++ people/robertmh/svn2bzr/svn2bzr     2009-11-07 14:12:48 UTC (rev 2689)
@@ -17,6 +17,7 @@
 
 url="$1"
 out="$2"
+dash_line="------------------------------------------------------------------------"
 
 die ()
 {
@@ -30,8 +31,42 @@
 
 process_commit=$(which process_commit || echo `dirname $0`/process_commit)
 revert_svn_log_order=$(which revert-svn-log-order || echo `dirname 
$0`/revert-svn-log-order)
-commit_from_log=$(which commit-from-log || echo `dirname $0`/commit-from-log)
 
-(cd ${out} && svn log ${url} | ${revert_svn_log_order} | ${commit_from_log} 
${url})
+cd ${out}
+bzr init
 
+st=0
+svn log ${url} | ${revert_svn_log_order} | while read line ; do
+  case ${st} in
+    0)
+      if [ "${line}" != "${dash_line}" ] ; then
+        die "Unexpected input"
+      fi
+      st=1
+    ;;
+    1)
+      revision=`echo "${line}" | sed -e "s/^r\([0-9]*\) .*/\1/"`
+      username=`echo "${line}" | sed -e "s/^[^|]*| \([^ ]*\) .*/\1/"`
+      date=`echo "${line}" | sed -e "s/^[^|]*|[^|]*| \([^ ]* [^ ]* [^ ]*\) 
.*/\1/"`
+      date=`date +%s -d "${date}"`
+      unset message
+      read # empty line
+      st=2
+    ;;
+    2)
+      if [ "${line}" == "${dash_line}" ] ; then
+        ${process_commit} ${url} ${revision} ${username} "${date}" "${message}"
+        st=1
+        continue
+      fi
+      if [ "${message}" ] ; then
+        message="${message}
+${line}"
+      else
+        message="${line}"
+      fi
+    ;;
+  esac
+done
+
 exit 0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]