[Assorted-commits] SF.net SVN: assorted:[1057] sandbox/trunk/src/git/gitsvn.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-11-05 19:07:32
|
Revision: 1057 http://assorted.svn.sourceforge.net/assorted/?rev=1057&view=rev Author: yangzhang Date: 2008-11-05 19:07:18 +0000 (Wed, 05 Nov 2008) Log Message: ----------- showing the real problem Modified Paths: -------------- sandbox/trunk/src/git/gitsvn.bash Modified: sandbox/trunk/src/git/gitsvn.bash =================================================================== --- sandbox/trunk/src/git/gitsvn.bash 2008-11-05 18:50:30 UTC (rev 1056) +++ sandbox/trunk/src/git/gitsvn.bash 2008-11-05 19:07:18 UTC (rev 1057) @@ -32,30 +32,31 @@ sed -i s/line1/Line1/ svn/myfile sed -i s/line4/Line4/ gitsvn/myfile svn ci -m 'munge line1' svn/ -(cd gitsvn; git commit -a -m 'munge line4'; git svn rebase) # XXX problem here +(cd gitsvn; git commit -a -m 'munge line4'; git svn rebase) # clone the git repo elsewhere and commit something there git clone file://$basedir/gitsvn gitsvn2 sed -i s/line6/Line6/ gitsvn2/myfile (cd gitsvn2; git commit -a -m 'munge line6') -# make concurrent change to svn +# make concurrent change to svn, and original git repo sed -i s/line2/Line2/ svn/myfile svn ci -m 'munge line2' svn/ +(cd gitsvn; git svn rebase) -# pull those changes back into the original git repo -(cd gitsvn; git pull file://$basedir/gitsvn2; git svn rebase) # XXX problem here +# make another concurrent change to svn, then pull gitsvn2 changes into the +# original git repo, then update gitsvn from svn +sed -i s/line3/Line3/ svn/myfile +svn ci -m 'munge line3' svn/ +(cd gitsvn; git pull file://$basedir/gitsvn2; git svn rebase) # XXX problem here! -# Sample output: -# -# $ bash -x gitsvn.bash /tmp/test # + set -o errexit -o nounset -# + basedir=/tmp/test -# + mkdir -p /tmp/test -# + cd /tmp/test +# + basedir=/tmp/test2 +# + mkdir -p /tmp/test2 +# + cd /tmp/test2 # + mkdir svnrepo # + svnadmin create svnrepo -# + svn co file:///tmp/test/svnrepo svn +# + svn co file:///tmp/test2/svnrepo svn # Checked out revision 0. # + echo -e 'line1\nline2\nline3' # + svn add svn/myfile @@ -64,12 +65,12 @@ # Adding svn/myfile # Transmitting file data . # Committed revision 1. -# + git svn clone file:///tmp/test/svnrepo gitsvn +# + git svn clone file:///tmp/test2/svnrepo gitsvn # Initialized empty Git repository in .git/ # A myfile -# r1 = f9c96692b0244e1793f14de0cf6cb3d72efac32a (git-svn) +# r1 = e03653693de0cfebfcfb1ed7d9d3db896421ee7a (git-svn) # Checked out HEAD: -# file:///tmp/test/svnrepo r1 +# file:///tmp/test2/svnrepo r1 # + echo -e 'line4\nline5\nline6' # + svn ci -m 'added more lines' svn/ # Sending svn/myfile @@ -78,9 +79,9 @@ # + cd gitsvn # + git svn rebase # M myfile -# r2 = 141185b6945d81b866db2258a902d5bdc5d6c8a4 (git-svn) +# r2 = c8f7e4bc4a623abcabf27d34c6716c1f13c37da2 (git-svn) # First, rewinding head to replay your work on top of it... -# HEAD is now at 141185b... added more lines +# HEAD is now at c8f7e4b... added more lines # Fast-forwarded master to refs/remotes/git-svn. # + sed -i s/line1/Line1/ svn/myfile # + sed -i s/line4/Line4/ gitsvn/myfile @@ -90,25 +91,25 @@ # Committed revision 3. # + cd gitsvn # + git commit -a -m 'munge line4' -# Created commit 82a13bf: munge line4 +# Created commit 4efa529: munge line4 # 1 files changed, 1 insertions(+), 1 deletions(-) # + git svn rebase # M myfile -# r3 = 22e5d634f29dbfa70e4586a8d7e958e01489a8ff (git-svn) +# r3 = 76ffe8259f02910393f7f03fdfd0c81b12cfbcee (git-svn) # First, rewinding head to replay your work on top of it... -# HEAD is now at 22e5d63... munge line1 +# HEAD is now at 76ffe82... munge line1 # Applying munge line4 # error: patch failed: myfile:1 # error: myfile: patch does not apply # Using index info to reconstruct a base tree... # Falling back to patching base and 3-way merge... # Auto-merged myfile -# + git clone file:///tmp/test/gitsvn gitsvn2 -# Initialized empty Git repository in /tmp/test/gitsvn2/.git/ +# + git clone file:///tmp/test2/gitsvn gitsvn2 +# Initialized empty Git repository in /tmp/test2/gitsvn2/.git/ # + sed -i s/line6/Line6/ gitsvn2/myfile # + cd gitsvn2 # + git commit -a -m 'munge line6' -# Created commit 8f8a660: munge line6 +# Created commit 33eebd0: munge line6 # 1 files changed, 1 insertions(+), 1 deletions(-) # + sed -i s/line2/Line2/ svn/myfile # + svn ci -m 'munge line2' svn/ @@ -116,22 +117,51 @@ # Transmitting file data . # Committed revision 4. # + cd gitsvn -# + git pull file:///tmp/test/gitsvn2 -# remote: Counting objects: 5, done.[K -# remote: Total 3 (delta 0), reused 0 (delta 0)[K -# Updating fd0dc9b..8f8a660 -# Fast forward +# + git svn rebase +# M myfile +# r4 = 3923d574137132addd9f32ca40170f62aae0c456 (git-svn) +# First, rewinding head to replay your work on top of it... +# HEAD is now at 3923d57... munge line2 +# Applying munge line4 +# error: patch failed: myfile:1 +# error: myfile: patch does not apply +# Using index info to reconstruct a base tree... +# Falling back to patching base and 3-way merge... +# Auto-merged myfile +# + sed -i s/line3/Line3/ svn/myfile +# + svn ci -m 'munge line3' svn/ +# Sending svn/myfile +# Transmitting file data . +# Committed revision 5. +# + cd gitsvn +# + git pull file:///tmp/test2/gitsvn2 +# remote: Counting objects: 8, done.[K +# remote: Compressing objects: 50% (1/2) [K +remote: Compressing objects: 100% (2/2) [K +remote: Compressing objects: 100% (2/2[K)remote: , done.[K +# remote: Total 6 (delta 0), reused 3 (delta 0)[K +# Auto-merged myfile +# Merge made by recursive. # myfile | 2 +- # 1 files changed, 1 insertions(+), 1 deletions(-) # + git svn rebase # M myfile -# r4 = 22f9c8564ccbd4195c3c609c8149ef7bf33eec64 (git-svn) +# r5 = c90dcc08fb3cc07f714662d6e1d1054ba1678b75 (git-svn) # First, rewinding head to replay your work on top of it... -# HEAD is now at 22f9c85... munge line2 +# HEAD is now at c90dcc0... munge line3 # Applying munge line4 # error: patch failed: myfile:1 # error: myfile: patch does not apply # Using index info to reconstruct a base tree... # Falling back to patching base and 3-way merge... # Auto-merged myfile -# Applying munge line6 +# CONFLICT (content): Merge conflict in myfile +# Failed to merge in the changes. +# Patch failed at 0001. +# +# When you have resolved this problem run "git rebase --continue". +# If you would prefer to skip this patch, instead run "git rebase --skip". +# To restore the original branch and stop rebasing run "git rebase --abort". +# +# rebase refs/remotes/git-svn: command returned error: 1 +# This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |