[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[2693] Handle first pointfull revision properly without reliing on svn d
From: |
Robert Millan |
Subject: |
[2693] Handle first pointfull revision properly without reliing on svn diff exit status |
Date: |
Sat, 07 Nov 2009 16:04:41 +0000 |
Revision: 2693
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2693
Author: robertmh
Date: 2009-11-07 16:04:39 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
Handle first pointfull revision properly without reliing on svn diff exit status
Modified Paths:
--------------
people/robertmh/svn2bzr/process_commit
people/robertmh/svn2bzr/svn2bzr
Modified: people/robertmh/svn2bzr/process_commit
===================================================================
--- people/robertmh/svn2bzr/process_commit 2009-11-07 15:41:48 UTC (rev
2692)
+++ people/robertmh/svn2bzr/process_commit 2009-11-07 16:04:39 UTC (rev
2693)
@@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+first="$1"
+shift
url="$1"
shift
revision="$1"
@@ -40,7 +42,17 @@
echo
echo "r${revision} | ${username} | `date -d @${date}`"
-if svn diff -r ${previous}:${revision} ${url} > ${tmp} ; then
+if ${first} ; then
+ echo "First revision, exporting complete source tree ..." >&2
+ svn export -r ${revision} ${url} ${tmpdir}/export > /dev/null
+ if [ "`ls ${tmpdir}/export`" == "" ] ; then
+ echo "Nothing to be found, skipping r${revision}" >&2
+ exit 0
+ else
+ cp -a ${tmpdir}/export/* ./
+ fi
+else
+ svn diff -r ${previous}:${revision} ${url} > ${tmp}
if ! log="`LANG=C diffstat ${tmp}`" ; then
trap - EXIT
die "${tmp} doesn't look like a patch"
@@ -53,20 +65,6 @@
trap - EXIT
die "Patch failed to apply: ${tmp}"
fi
-else
- cat << EOF >&2
-
-It's OK, will assume ${revision} is the first revision.
-
-Exporting complete source tree for r${revision} ...
-EOF
- svn export -r ${revision} ${url} ${tmpdir}/export > /dev/null
- if [ "`ls ${tmpdir}/export`" == "" ] ; then
- echo "Nothing to be found, skipping r${revision}" >&2
- exit 0
- else
- cp -a ${tmpdir}/export/* ./
- fi
fi
# This excludes zero-size files, but I can't think of a better way
Modified: people/robertmh/svn2bzr/svn2bzr
===================================================================
--- people/robertmh/svn2bzr/svn2bzr 2009-11-07 15:41:48 UTC (rev 2692)
+++ people/robertmh/svn2bzr/svn2bzr 2009-11-07 16:04:39 UTC (rev 2693)
@@ -36,6 +36,7 @@
bzr init
st=0
+first=true
svn log ${url} | ${revert_svn_log_order} | (set -e ; while read line ; do
case ${st} in
0)
@@ -55,7 +56,8 @@
;;
2)
if [ "${line}" == "${dash_line}" ] ; then
- ${process_commit} ${url} ${revision} ${username} "${date}" "${message}"
+ ${process_commit} ${first} ${url} ${revision} ${username} "${date}"
"${message}"
+ first=false
st=1
continue
fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [2693] Handle first pointfull revision properly without reliing on svn diff exit status,
Robert Millan <=