{"thread":{"id":"21286","subject":"git-svn: add support for merges during 'git svn fetch'","startedAt":"2009-10-20T02:41:58Z","lastAt":"2009-10-28T07:17:47Z","messageCount":12,"participants":["Sam Vilain","Junio C Hamano","Eric Wong","Nanako Shiraishi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125429","messageId":"1256006523-5493-1-git-send-email-sam.vilain@catalyst.net.nz","threadId":"21286","inReplyTo":null,"subject":"git-svn: add support for merges during 'git svn fetch'","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2009-10-20T02:41:58Z","receivedAt":"2009-10-20T02:41:58Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"This series adds support for converting SVN merges - in the two\npopular formats, SVK and SVN 1.5+, into git parents.\n"},{"id":"125430","messageId":"1256006523-5493-2-git-send-email-sam.vilain@catalyst.net.nz","threadId":"21286","inReplyTo":"1256006523-5493-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 1/5] git-svn: add test data for SVK merge, with script.","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2009-10-20T02:41:59Z","receivedAt":"2009-10-20T02:41:59Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Dump generated with SVK 2.0.2 and SVN 1.5.1 (on lenny amd64).\n\nSigned-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n---\n t/t9150/make-svk-dump  |   57 +++++\n t/t9150/svk-merge.dump |  616 ++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 673 insertions(+), 0 deletions(-)\n create mode 100644 t/t9150/make-svk-dump\n create mode 100644 t/t9150/svk-merge.dump\n\ndiff --git a/t/t9150/make-svk-dump b/t/t9150/make-svk-dump\nnew file mode 100644\nindex 0000000..2242f14\n--- /dev/null\n+++ b/t/t9150/make-svk-dump\n@@ -0,0 +1,57 @@\n+#!/bin/sh\n+#\n+# this script sets up a Subversion repository for Makefile in the\n+# first ever git merge, as if it were done with svk.\n+#\n+\n+set -e\n+\n+svk depotmap foo ~/.svk/foo\n+svk co /foo/ foo\n+cd foo\n+mkdir trunk\n+mkdir branches\n+svk add trunk branches\n+svk commit -m \"Setup trunk and branches\"\n+cd trunk\n+\n+git cat-file blob 6683463e:Makefile > Makefile\n+svk add Makefile \n+\n+svk commit -m \"ancestor\"\n+cd ..\n+svk cp trunk branches/left\n+\n+svk commit -m \"make left branch\"\n+cd branches/left/\n+\n+git cat-file blob 5873b67e:Makefile > Makefile\n+svk commit -m \"left update 1\"\n+\n+cd ../../trunk\n+git cat-file blob 75118b13:Makefile > Makefile\n+svk commit -m \"trunk update\"\n+\n+cd ../branches/left\n+git cat-file blob b5039db6:Makefile > Makefile\n+svk commit -m \"left update 2\"\n+\n+cd ../../trunk\n+svk sm /foo/branches/left\n+# in theory we could delete the \"left\" branch here, but it's not\n+# required so don't do it, in case people start getting ideas ;)\n+svk commit -m \"merge branch 'left' into 'trunk'\"\n+\n+git cat-file blob b51ad431:Makefile > Makefile\n+\n+svk diff Makefile && echo \"Hey!  No differences, magic\"\n+\n+cd ../..\n+\n+svnadmin dump ~/.svk/foo > svk-merge.dump\n+\n+svk co -d foo\n+rm -rf foo\n+svk depotmap -d /foo/\n+rm -rf ~/.svk/foo\n+\ndiff --git a/t/t9150/svk-merge.dump b/t/t9150/svk-merge.dump\nnew file mode 100644\nindex 0000000..42f70db\n--- /dev/null\n+++ b/t/t9150/svk-merge.dump\n@@ -0,0 +1,616 @@\n+SVN-fs-dump-format-version: 2\n+\n+UUID: b48289b2-9c08-4d72-af37-0358a40b9c15\n+\n+Revision-number: 0\n+Prop-content-length: 56\n+Content-length: 56\n+\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:03.722969Z\n+PROPS-END\n+\n+Revision-number: 1\n+Prop-content-length: 123\n+Content-length: 123\n+\n+K 7\n+svn:log\n+V 24\n+Setup trunk and branches\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:04.927533Z\n+PROPS-END\n+\n+Node-path: branches\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Node-path: trunk\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Revision-number: 2\n+Prop-content-length: 106\n+Content-length: 106\n+\n+K 7\n+svn:log\n+V 8\n+ancestor\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:05.835585Z\n+PROPS-END\n+\n+Node-path: trunk/Makefile\n+Node-kind: file\n+Node-action: add\n+Prop-content-length: 10\n+Text-content-length: 2401\n+Text-content-md5: bfd8ff778d1492dc6758567373176a89\n+Content-length: 2411\n+\n+PROPS-END\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 3\n+Prop-content-length: 115\n+Content-length: 115\n+\n+K 7\n+svn:log\n+V 16\n+make left branch\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:06.719737Z\n+PROPS-END\n+\n+Node-path: branches/left\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 2\n+Node-copyfrom-path: trunk\n+\n+\n+Revision-number: 4\n+Prop-content-length: 112\n+Content-length: 112\n+\n+K 7\n+svn:log\n+V 13\n+left update 1\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:07.167666Z\n+PROPS-END\n+\n+Node-path: branches/left/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2465\n+Text-content-md5: 16e38d9753b061731650561ce01b1195\n+Content-length: 2465\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 5\n+Prop-content-length: 111\n+Content-length: 111\n+\n+K 7\n+svn:log\n+V 12\n+trunk update\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:07.619633Z\n+PROPS-END\n+\n+Node-path: trunk/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2521\n+Text-content-md5: 0668418a621333f4aa8b6632cd63e2a0\n+Content-length: 2521\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base merge-cache\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+merge-cache: merge-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 6\n+Prop-content-length: 112\n+Content-length: 112\n+\n+K 7\n+svn:log\n+V 13\n+left update 2\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:08.067554Z\n+PROPS-END\n+\n+Node-path: branches/left/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2593\n+Text-content-md5: 5ccff689fb290e00b85fe18ee50c54ba\n+Content-length: 2593\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 7\n+Prop-content-length: 131\n+Content-length: 131\n+\n+K 7\n+svn:log\n+V 32\n+merge branch 'left' into 'trunk'\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-19T23:44:08.971801Z\n+PROPS-END\n+\n+Node-path: trunk\n+Node-kind: dir\n+Node-action: change\n+Prop-content-length: 83\n+Content-length: 83\n+\n+K 9\n+svk:merge\n+V 53\n+b48289b2-9c08-4d72-af37-0358a40b9c15:/branches/left:6\n+PROPS-END\n+\n+\n+Node-path: trunk/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2713\n+Text-content-md5: 0afbe34f244cd662b1f97d708c687f90\n+Content-length: 2713\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base merge-cache\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+merge-cache: merge-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n-- \n1.6.3.3\n"},{"id":"125431","messageId":"1256006523-5493-3-git-send-email-sam.vilain@catalyst.net.nz","threadId":"21286","inReplyTo":"1256006523-5493-2-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 2/5] git-svn: allow test setup script to support PERL env. var","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2009-10-20T02:42:00Z","receivedAt":"2009-10-20T02:42:00Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Possibly the 'perl' in the PATH is not the one to be used for the tests;\nlet PERL set in the environment select it.\n\nSigned-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n---\n  A little unrelated nit\n\n t/lib-git-svn.sh |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex fd8631f..0f7f35c 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -16,6 +16,7 @@ fi\n GIT_DIR=$PWD/.git\n GIT_SVN_DIR=$GIT_DIR/svn/refs/remotes/git-svn\n SVN_TREE=$GIT_SVN_DIR/svn-tree\n+PERL=${PERL:-perl}\n \n svn >/dev/null 2>&1\n if test $? -ne 1\n@@ -29,7 +30,7 @@ export svnrepo\n svnconf=$PWD/svnconf\n export svnconf\n \n-perl -w -e \"\n+$PERL -w -e \"\n use SVN::Core;\n use SVN::Repos;\n \\$SVN::Core::VERSION gt '1.1.0' or exit(42);\n@@ -130,7 +131,7 @@ stop_httpd () {\n }\n \n convert_to_rev_db () {\n-\tperl -w -- - \"$@\" <<\\EOF\n+\t$PERL -w -- - \"$@\" <<\\EOF\n use strict;\n @ARGV == 2 or die \"Usage: convert_to_rev_db <input> <output>\";\n open my $wr, '+>', $ARGV[1] or die \"$!: couldn't open: $ARGV[1]\";\n-- \n1.6.3.3\n"},{"id":"125432","messageId":"1256006523-5493-4-git-send-email-sam.vilain@catalyst.net.nz","threadId":"21286","inReplyTo":"1256006523-5493-3-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 3/5] git-svn: convert SVK merge tickets to extra parents","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2009-10-20T02:42:01Z","receivedAt":"2009-10-20T02:42:01Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"SVK is a simple case to start with, as its idea of merge parents\nmatches git's one.  When a svk:merge ticket is encountered, check each\nof the listed merged revisions to see if they are in the history of\nthis commit; if not, then we have encountered a merge - record it.\n\nSigned-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n---\n   I'm not sure if 'other_gs' is the right method to call here;\n   ideally we should lookup a revmap by UUID and path, that would\n   in principle allow people to import from a bunch of SVK depots all\n   being tracked.  Perhaps however this is sufficient.\n\n git-svn.perl                |   50 ++++++++++++++++++++++++++++++++++++++++++-\n t/t9150-svk-mergetickets.sh |   23 +++++++++++++++++++\n 2 files changed, 72 insertions(+), 1 deletions(-)\n create mode 100644 t/t9150-svk-mergetickets.sh\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex eb4b75a..3c2534c 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2878,14 +2878,62 @@ sub check_author {\n \t$author;\n }\n \n+sub find_extra_svk_parents {\n+\tmy ($self, $ed, $tickets, $parents) = @_;\n+\t# aha!  svk:merge property changed...\n+\tmy @tickets = split \"\\n\", $tickets;\n+\tmy @known_parents;\n+\tfor my $ticket ( @tickets ) {\n+\t\tmy ($uuid, $path, $rev) = split /:/, $ticket;\n+\t\tif ( $uuid eq $self->ra_uuid ) {\n+\t\t\tmy $url = $self->rewrite_root || $self->{url};\n+\t\t\tmy $repos_root = $url;\n+\t\t\tmy $branch_from = $path;\n+\t\t\t$branch_from =~ s{^/}{};\n+\t\t\tmy $gs = $self->other_gs($repos_root.\"/\".$branch_from, $url,\n+\t\t\t\t\t\t $branch_from, $rev, $self->{ref_id});\n+\t\t\t#my $gs = other_gs ( $url, $repos_root, $branch_from,\n+\t\t\t\t#$self->{ref_id} );\n+\t\t\tif ( my $commit = $gs->rev_map_get($rev, $uuid) ) {\n+\t\t\t\t# wahey!  we found it, but it might be\n+\t\t\t\t# an old one (!)\n+\t\t\t\tpush @known_parents, $commit;\n+\t\t\t}\n+\t\t}\n+\t}\n+\tfor my $parent ( @known_parents ) {\n+\t\tmy @cmd = ('rev-list', $parent, map { \"^$_\" } @$parents );\n+\t\tmy ($msg_fh, $ctx) = command_output_pipe(@cmd);\n+\t\tmy $new;\n+\t\twhile ( <$msg_fh> ) {\n+\t\t\t$new=1;last;\n+\t\t}\n+\t\tcommand_close_pipe($msg_fh, $ctx);\n+\t\tif ( $new ) {\n+\t\t\tprint STDERR \"Found merge parent (svk:merge ticket): $parent\\n\";\n+\t\t\tpush @$parents, $parent;\n+\t\t}\n+\t}\n+}\n+\n sub make_log_entry {\n \tmy ($self, $rev, $parents, $ed) = @_;\n \tmy $untracked = $self->get_untracked($ed);\n \n+\tmy @parents = @$parents;\n+\tmy $ps = $ed->{path_strip} || \"\";\n+\tfor my $path ( grep { m/$ps/ } %{$ed->{dir_prop}} ) {\n+\t\tmy $props = $ed->{dir_prop}{$path};\n+\t\tif ( $props->{\"svk:merge\"} ) {\n+\t\t\t$self->find_extra_svk_parents\n+\t\t\t\t($ed, $props->{\"svk:merge\"}, \\@parents);\n+\t\t}\n+\t}\n+\n \topen my $un, '>>', \"$self->{dir}/unhandled.log\" or croak $!;\n \tprint $un \"r$rev\\n\" or croak $!;\n \tprint $un $_, \"\\n\" foreach @$untracked;\n-\tmy %log_entry = ( parents => $parents || [], revision => $rev,\n+\tmy %log_entry = ( parents => \\@parents, revision => $rev,\n \t                  log => '');\n \n \tmy $headrev;\ndiff --git a/t/t9150-svk-mergetickets.sh b/t/t9150-svk-mergetickets.sh\nnew file mode 100644\nindex 0000000..8000c34\n--- /dev/null\n+++ b/t/t9150-svk-mergetickets.sh\n@@ -0,0 +1,23 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2007 Sam Vilain\n+#\n+\n+test_description='git-svn svk merge tickets'\n+\n+. ./lib-git-svn.sh\n+\n+test_expect_success 'load svk depot' \"\n+\tsvnadmin load -q '$rawsvnrepo' < '../t9150/svk-merge.dump' &&\n+\tgit svn init --minimize-url -R svkmerge \\\n+\t  -T trunk -b branches '$svnrepo' &&\n+\tgit svn fetch --all\n+\t\"\n+\n+uuid=b48289b2-9c08-4d72-af37-0358a40b9c15\n+\n+test_expect_success 'svk merges were represented coming in' \"\n+\t[ `git-cat-file commit HEAD | grep parent | wc -l` -eq 2 ]\n+\t\"\n+\n+test_done\n-- \n1.6.3.3\n"},{"id":"125434","messageId":"1256006523-5493-5-git-send-email-sam.vilain@catalyst.net.nz","threadId":"21286","inReplyTo":"1256006523-5493-4-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 4/5] git-svn: add test data for SVN 1.5+ merge, with script.","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2009-10-20T02:42:02Z","receivedAt":"2009-10-20T02:42:02Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Dump generated with SVN 1.5.1 (on lenny amd64).  This test should hopefully\ncover all but a few intermediate versions of the svnmerge.py script.\n\nSigned-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n---\n t/t9151/.gitignore         |    2 +\n t/t9151/make-svnmerge-dump |   73 +++++\n t/t9151/svn-mergeinfo.dump |  736 ++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 811 insertions(+), 0 deletions(-)\n create mode 100644 t/t9151/.gitignore\n create mode 100644 t/t9151/make-svnmerge-dump\n create mode 100644 t/t9151/svn-mergeinfo.dump\n\ndiff --git a/t/t9151/.gitignore b/t/t9151/.gitignore\nnew file mode 100644\nindex 0000000..587c37d\n--- /dev/null\n+++ b/t/t9151/.gitignore\n@@ -0,0 +1,2 @@\n+foo\n+foo.svn\ndiff --git a/t/t9151/make-svnmerge-dump b/t/t9151/make-svnmerge-dump\nnew file mode 100644\nindex 0000000..e35d64d\n--- /dev/null\n+++ b/t/t9151/make-svnmerge-dump\n@@ -0,0 +1,73 @@\n+#!/bin/sh\n+#\n+# this script sets up a Subversion repository for Makefile in the\n+# first ever git merge, as if it were done with svnmerge (SVN 1.5+)\n+#\n+\n+rm -rf foo.svn foo\n+set -e\n+\n+mkdir foo.svn\n+svnadmin create foo.svn\n+svn co file://`pwd`/foo.svn foo\n+\n+cd foo\n+mkdir trunk\n+mkdir branches\n+svn add trunk branches\n+svn commit -m \"Setup trunk and branches\"\n+cd trunk\n+\n+git cat-file blob 6683463e:Makefile > Makefile\n+svn add Makefile \n+\n+echo \"Committing ANCESTOR\"\n+svn commit -m \"ancestor\"\n+cd ..\n+svn cp trunk branches/left\n+\n+echo \"Committing BRANCH POINT\"\n+svn commit -m \"make left branch\"\n+cd branches/left/\n+\n+#$sm init\n+#svn commit -m \"init svnmerge\"\n+\n+git cat-file blob 5873b67e:Makefile > Makefile\n+echo \"Committing BRANCH UPDATE 1\"\n+svn commit -m \"left update 1\"\n+cd ../..\n+\n+cd trunk\n+git cat-file blob 75118b13:Makefile > Makefile\n+echo \"Committing TRUNK UPDATE\"\n+svn commit -m \"trunk update\"\n+\n+cd ../branches/left\n+git cat-file blob ff5ebe39:Makefile > Makefile\n+echo \"Committing BRANCH UPDATE 2\"\n+svn commit -m \"left update 2\"\n+\n+git cat-file blob b5039db6:Makefile > Makefile\n+echo \"Committing BRANCH UPDATE 3\"\n+svn commit -m \"left update 3\"\n+\n+# merge to trunk\n+\n+cd ../..\n+svn update\n+cd trunk\n+\n+svn merge ../branches/left --accept postpone\n+\n+git cat-file blob b51ad431:Makefile > Makefile\n+\n+svn resolved Makefile\n+\n+svn commit -m \"Merge trunk\"\n+\n+cd ../..\n+\n+svnadmin dump foo.svn > svn-mergeinfo.dump\n+\n+rm -rf foo foo.svn\ndiff --git a/t/t9151/svn-mergeinfo.dump b/t/t9151/svn-mergeinfo.dump\nnew file mode 100644\nindex 0000000..2153187\n--- /dev/null\n+++ b/t/t9151/svn-mergeinfo.dump\n@@ -0,0 +1,736 @@\n+SVN-fs-dump-format-version: 2\n+\n+UUID: 1ce241d1-ba54-4eb9-bded-03057fe48a33\n+\n+Revision-number: 0\n+Prop-content-length: 56\n+Content-length: 56\n+\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:37.692723Z\n+PROPS-END\n+\n+Revision-number: 1\n+Prop-content-length: 123\n+Content-length: 123\n+\n+K 7\n+svn:log\n+V 24\n+Setup trunk and branches\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:38.159933Z\n+PROPS-END\n+\n+Node-path: branches\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Node-path: trunk\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Revision-number: 2\n+Prop-content-length: 106\n+Content-length: 106\n+\n+K 7\n+svn:log\n+V 8\n+ancestor\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:39.160059Z\n+PROPS-END\n+\n+Node-path: trunk/Makefile\n+Node-kind: file\n+Node-action: add\n+Prop-content-length: 10\n+Text-content-length: 2401\n+Text-content-md5: bfd8ff778d1492dc6758567373176a89\n+Content-length: 2411\n+\n+PROPS-END\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 3\n+Prop-content-length: 115\n+Content-length: 115\n+\n+K 7\n+svn:log\n+V 16\n+make left branch\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:41.148192Z\n+PROPS-END\n+\n+Node-path: branches/left\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 1\n+Node-copyfrom-path: trunk\n+Prop-content-length: 34\n+Content-length: 34\n+\n+K 13\n+svn:mergeinfo\n+V 0\n+\n+PROPS-END\n+\n+\n+Node-path: branches/left/Makefile\n+Node-kind: file\n+Node-action: add\n+Node-copyfrom-rev: 2\n+Node-copyfrom-path: trunk/Makefile\n+Text-copy-source-md5: bfd8ff778d1492dc6758567373176a89\n+\n+\n+Revision-number: 4\n+Prop-content-length: 112\n+Content-length: 112\n+\n+K 7\n+svn:log\n+V 13\n+left update 1\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:42.148773Z\n+PROPS-END\n+\n+Node-path: branches/left/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2465\n+Text-content-md5: 16e38d9753b061731650561ce01b1195\n+Content-length: 2465\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 5\n+Prop-content-length: 111\n+Content-length: 111\n+\n+K 7\n+svn:log\n+V 12\n+trunk update\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:43.159959Z\n+PROPS-END\n+\n+Node-path: trunk/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2521\n+Text-content-md5: 0668418a621333f4aa8b6632cd63e2a0\n+Content-length: 2521\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base merge-cache\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+merge-cache: merge-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 6\n+Prop-content-length: 112\n+Content-length: 112\n+\n+K 7\n+svn:log\n+V 13\n+left update 2\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:44.164175Z\n+PROPS-END\n+\n+Node-path: branches/left/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2529\n+Text-content-md5: f6b197cc3f2e89a83e545d4bb003de73\n+Content-length: 2529\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 7\n+Prop-content-length: 112\n+Content-length: 112\n+\n+K 7\n+svn:log\n+V 13\n+left update 3\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:45.144214Z\n+PROPS-END\n+\n+Node-path: branches/left/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2593\n+Text-content-md5: 5ccff689fb290e00b85fe18ee50c54ba\n+Content-length: 2593\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n+Revision-number: 8\n+Prop-content-length: 110\n+Content-length: 110\n+\n+K 7\n+svn:log\n+V 11\n+Merge trunk\n+K 10\n+svn:author\n+V 4\n+samv\n+K 8\n+svn:date\n+V 27\n+2009-10-20T01:33:48.176135Z\n+PROPS-END\n+\n+Node-path: trunk\n+Node-kind: dir\n+Node-action: change\n+Prop-content-length: 53\n+Content-length: 53\n+\n+K 13\n+svn:mergeinfo\n+V 18\n+/branches/left:2-7\n+PROPS-END\n+\n+\n+Node-path: trunk/Makefile\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 2713\n+Text-content-md5: 0afbe34f244cd662b1f97d708c687f90\n+Content-length: 2713\n+\n+# -DCOLLISION_CHECK if you believe that SHA1's\n+# 1461501637330902918203684832716283019655932542976 hashes do not give you\n+# enough guarantees about no collisions between objects ever hapenning.\n+#\n+# -DNSEC if you want git to care about sub-second file mtimes and ctimes.\n+# Note that you need some new glibc (at least >2.2.4) for this, and it will\n+# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly\n+# break unless your underlying filesystem supports those sub-second times\n+# (my ext3 doesn't).\n+CFLAGS=-g -O3 -Wall\n+\n+CC=gcc\n+\n+\n+PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \\\n+\tcat-file fsck-cache checkout-cache diff-tree rev-tree show-files \\\n+\tcheck-files ls-tree merge-base merge-cache\n+\n+all: $(PROG)\n+\n+install: $(PROG)\n+\tinstall $(PROG) $(HOME)/bin/\n+\n+LIBS= -lssl -lz\n+\n+init-db: init-db.o\n+\n+update-cache: update-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)\n+\n+show-diff: show-diff.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)\n+\n+write-tree: write-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)\n+\n+read-tree: read-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)\n+\n+commit-tree: commit-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)\n+\n+cat-file: cat-file.o read-cache.o\n+\t$(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)\n+\n+fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+checkout-cache: checkout-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)\n+\n+diff-tree: diff-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS)\n+\n+rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+show-files: show-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS)\n+\n+check-files: check-files.o read-cache.o\n+\t$(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS)\n+\n+ls-tree: ls-tree.o read-cache.o\n+\t$(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS)\n+\n+merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o\n+\t$(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS)\n+\n+merge-cache: merge-cache.o read-cache.o\n+\t$(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS)\n+\n+read-cache.o: cache.h\n+show-diff.o: cache.h\n+\n+clean:\n+\trm -f *.o $(PROG)\n+\n+backup: clean\n+\tcd .. ; tar czvf dircache.tar.gz dir-cache\n+\n+\n-- \n1.6.3.3\n"},{"id":"125433","messageId":"1256006523-5493-6-git-send-email-sam.vilain@catalyst.net.nz","threadId":"21286","inReplyTo":"1256006523-5493-5-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 5/5] git-svn: convert SVN 1.5+ / svnmerge.py svn:mergeinfo props to parents","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2009-10-20T02:42:03Z","receivedAt":"2009-10-20T02:42:03Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"This feature is long overdue; convert SVN's merge representation to git's\nas revisions are imported.  This works by converting the list of revisions\nin each line of the svn:mergeinfo into git revision ranges, and then\nchecking the latest of each of these revision ranges for A) being new and\nB) now being completely merged.\n\nSigned-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>\n---\n   There's much more implemented here than is tested...\n git-svn.perl             |   93 ++++++++++++++++++++++++++++++++++++++++++++++\n t/t9151-svn-mergeinfo.sh |   21 ++++++++++\n 2 files changed, 114 insertions(+), 0 deletions(-)\n create mode 100644 t/t9151-svn-mergeinfo.sh\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 3c2534c..244e40d 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2916,6 +2916,93 @@ sub find_extra_svk_parents {\n \t}\n }\n \n+# note: this function should only be called if the various dirprops\n+# have actually changed\n+sub find_extra_svn_parents {\n+\tmy ($self, $ed, $mergeinfo, $parents) = @_;\n+\t# aha!  svk:merge property changed...\n+\n+\t# We first search for merged tips which are not in our\n+\t# history.  Then, we figure out which git revisions are in\n+\t# that tip, but not this revision.  If all of those revisions\n+\t# are now marked as merge, we can add the tip as a parent.\n+\tmy @merges = split \"\\n\", $mergeinfo;\n+\tmy @merge_tips;\n+\tmy @merged_commit_ranges;\n+\tmy $url = $self->rewrite_root || $self->{url};\n+\tfor my $merge ( @merges ) {\n+\t\tmy ($source, $revs) = split \":\", $merge;\n+\t\tmy $path = $source;\n+\t\t$path =~ s{^/}{};\n+\t\tmy $gs = Git::SVN->find_by_url($url.$source, $url, $path);\n+\t\tif ( !$gs ) {\n+\t\t\twarn \"Couldn't find revmap for $url$source\\n\";\n+\t\t\tnext;\n+\t\t}\n+\t\tmy @ranges = split \",\", $revs;\n+\t\tmy ($tip, $tip_commit);\n+\t\t# find the tip\n+\t\tfor my $range ( @ranges ) {\n+\t\t\tmy ($bottom, $top) = split \"-\", $range;\n+\t\t\t$top ||= $bottom;\n+\t\t\tmy $bottom_commit =\n+\t\t\t\t$gs->rev_map_get($bottom, $self->ra_uuid) ||\n+\t\t\t\t$gs->rev_map_get($bottom+1, $self->ra_uuid);\n+\t\t\tmy $top_commit =\n+\t\t\t\t$gs->rev_map_get($top, $self->ra_uuid);\n+\n+\t\t\tunless ($top_commit and $bottom_commit) {\n+\t\t\t\twarn \"W:unknown path/rev in svn:mergeinfo \"\n+\t\t\t\t\t.\"dirprop: $source:$range\\n\";\n+\t\t\t\tnext;\n+\t\t\t}\n+\n+\t\t\tpush @merged_commit_ranges,\n+\t\t\t\t\"$bottom_commit..$top_commit\";\n+\n+\t\t\tif ( !defined $tip or $top > $tip ) {\n+\t\t\t\t$tip = $top;\n+\t\t\t\t$tip_commit = $top_commit;\n+\t\t\t}\n+\t\t}\n+\t\tunless (!$tip_commit or\n+\t\t\t\tgrep { $_ eq $tip_commit } @$parents ) {\n+\t\t\tpush @merge_tips, $tip_commit;\n+\t\t}\n+\t\telse {\n+\t\t\tpush @merge_tips, undef;\n+\t\t}\n+\t}\n+\tfor my $merge_tip ( @merge_tips ) {\n+\t\tmy $spec = shift @merges;\n+\t\tnext unless $merge_tip;\n+\t\tmy @cmd = ('rev-list', \"-1\", $merge_tip,\n+\t\t\t   \"--not\", @$parents );\n+\t\tmy ($msg_fh, $ctx) = command_output_pipe(@cmd);\n+\t\tmy $new;\n+\t\twhile ( <$msg_fh> ) {\n+\t\t\t$new=1;last;\n+\t\t}\n+\t\tcommand_close_pipe($msg_fh, $ctx);\n+\t\tif ( $new ) {\n+\t\t\tpush @cmd, @merged_commit_ranges;\n+\t\t\tmy ($msg_fh, $ctx) = command_output_pipe(@cmd);\n+\t\t\tmy $unmerged;\n+\t\t\twhile ( <$msg_fh> ) {\n+\t\t\t\t$unmerged=1;last;\n+\t\t\t}\n+\t\t\tcommand_close_pipe($msg_fh, $ctx);\n+\t\t\tif ( $unmerged ) {\n+\t\t\t\twarn \"W:svn cherry-pick ignored ($spec)\\n\";\n+\t\t\t}\n+\t\t\telse {\n+\t\t\t\twarn \"Found merge parent (svn:mergeinfo prop): $merge_tip\\n\";\n+\t\t\t\tpush @$parents, $merge_tip;\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+\n sub make_log_entry {\n \tmy ($self, $rev, $parents, $ed) = @_;\n \tmy $untracked = $self->get_untracked($ed);\n@@ -2928,6 +3015,12 @@ sub make_log_entry {\n \t\t\t$self->find_extra_svk_parents\n \t\t\t\t($ed, $props->{\"svk:merge\"}, \\@parents);\n \t\t}\n+\t\tif ( $props->{\"svn:mergeinfo\"} ) {\n+\t\t\t$self->find_extra_svn_parents\n+\t\t\t\t($ed,\n+\t\t\t\t $props->{\"svn:mergeinfo\"},\n+\t\t\t\t \\@parents);\n+\t\t}\n \t}\n \n \topen my $un, '>>', \"$self->{dir}/unhandled.log\" or croak $!;\ndiff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh\nnew file mode 100644\nindex 0000000..7eb36e5\n--- /dev/null\n+++ b/t/t9151-svn-mergeinfo.sh\n@@ -0,0 +1,21 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2007, 2009 Sam Vilain\n+#\n+\n+test_description='git-svn svn mergeinfo properties'\n+\n+. ./lib-git-svn.sh\n+\n+test_expect_success 'load svn dump' \"\n+\tsvnadmin load -q '$rawsvnrepo' < '../t9151/svn-mergeinfo.dump' &&\n+\tgit svn init --minimize-url -R svnmerge \\\n+\t  -T trunk -b branches '$svnrepo' &&\n+\tgit svn fetch --all\n+\t\"\n+\n+test_expect_success 'svn merges were represented coming in' \"\n+\t[ `git cat-file commit HEAD | grep parent | wc -l` -eq 2 ]\n+\t\"\n+\n+test_done\n-- \n1.6.3.3\n"},{"id":"125436","messageId":"4ADD2480.7070207@vilain.net","threadId":"21286","inReplyTo":"1256006523-5493-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"Re: git-svn: add support for merges during 'git svn fetch'","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2009-10-20T02:46:24Z","receivedAt":"2009-10-20T02:46:24Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Sorry Eric forgot to pass --cc to send-email, I finally got around to\nthis ;-)\n\nSam.\n\nSam Vilain wrote:\n> This series adds support for converting SVN merges - in the two\n> popular formats, SVK and SVN 1.5+, into git parents.\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>   \n"},{"id":"125445","messageId":"7vvdiashhz.fsf@alter.siamese.dyndns.org","threadId":"21286","inReplyTo":"1256006523-5493-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"Re: git-svn: add support for merges during 'git svn fetch'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-20T06:32:08Z","receivedAt":"2009-10-20T06:32:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sam Vilain <sam.vilain@catalyst.net.nz> writes:\n\n> This series adds support for converting SVN merges - in the two\n> popular formats, SVK and SVN 1.5+, into git parents.\n\nNice ;-)\n"},{"id":"125532","messageId":"20091020211637.GA32474@dcvr.yhbt.net","threadId":"21286","inReplyTo":"1256006523-5493-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"Re: git-svn: add support for merges during 'git svn fetch'","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-10-20T21:16:37Z","receivedAt":"2009-10-20T21:16:37Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Sam Vilain <sam.vilain@catalyst.net.nz> wrote:\n> This series adds support for converting SVN merges - in the two\n> popular formats, SVK and SVN 1.5+, into git parents.\n\nThanks Sam,\n\nThere's a couple of whitespace issues with lines being too long (using 8\ncharacter wide tabs).  Otherwise I'm happy to Ack and get them out for\nmore testing/exposure; especially since I'm unlikely to exercise the\nfunctionality myself[1] and doesn't appear to break anything.\n\nThanks again.\n\n\n[1] - I've been finding fewer and fewer reasons to interact with SVN\n      at all as time goes by, a good thing for sure :)\n\n-- \nEric Wong\n"},{"id":"125985","messageId":"20091027124056.6117@nanako3.lavabit.com","threadId":"21286","inReplyTo":"20091020211637.GA32474@dcvr.yhbt.net","subject":"Re: git-svn: add support for merges during 'git svn fetch'","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-10-27T03:40:56Z","receivedAt":"2009-10-27T03:40:56Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Eric Wong <normalperson@yhbt.net>\n\n> Sam Vilain <sam.vilain@catalyst.net.nz> wrote:\n>> This series adds support for converting SVN merges - in the two\n>> popular formats, SVK and SVN 1.5+, into git parents.\n>\n> Thanks Sam,\n>\n> There's a couple of whitespace issues with lines being too long (using 8\n> character wide tabs).  Otherwise I'm happy to Ack and get them out for\n> more testing/exposure; especially since I'm unlikely to exercise the\n> functionality myself[1] and doesn't appear to break anything.\n>\n> Thanks again.\n\nWhat is the status of this series and what should happen now?\n\nWill Eric add his Ack and send you a pull request, or will you fix \nthem up, forge Eric's Ack and start cooking in your 'next' branch?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"125993","messageId":"20091027071405.GA3236@dcvr.yhbt.net","threadId":"21286","inReplyTo":"20091027124056.6117@nanako3.lavabit.com","subject":"Re: git-svn: add support for merges during 'git svn fetch'","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-10-27T07:14:05Z","receivedAt":"2009-10-27T07:14:05Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Nanako Shiraishi <nanako3@lavabit.com> wrote:\n> Quoting Eric Wong <normalperson@yhbt.net>\n> > Sam Vilain <sam.vilain@catalyst.net.nz> wrote:\n> >> This series adds support for converting SVN merges - in the two\n> >> popular formats, SVK and SVN 1.5+, into git parents.\n> >\n> > Thanks Sam,\n> >\n> > There's a couple of whitespace issues with lines being too long (using 8\n> > character wide tabs).  Otherwise I'm happy to Ack and get them out for\n> > more testing/exposure; especially since I'm unlikely to exercise the\n> > functionality myself[1] and doesn't appear to break anything.\n> >\n> > Thanks again.\n> \n> What is the status of this series and what should happen now?\n> \n> Will Eric add his Ack and send you a pull request, or will you fix \n> them up, forge Eric's Ack and start cooking in your 'next' branch?\n\nThanks for the ping, I got sidetracked and forgot about this.  I've\nfixed up minor formatting details, acked and pushed out Sam's changes to\ngit://git.bogomips.org/git-svn along with one I small fix I originally\nsent out a bad patch for.\n\nEric Wong (1):\n      git svn: fix fetch where glob is on the top-level URL\n\nSam Vilain (5):\n      git-svn: add test data for SVK merge, with script.\n      git-svn: allow test setup script to support PERL env. var\n      git-svn: convert SVK merge tickets to extra parents\n      git-svn: add test data for SVN 1.5+ merge, with script.\n      git-svn: convert SVN 1.5+ / svnmerge.py svn:mergeinfo props to parents\n\n(tests pass on the same box where I have my latest code this time :)\n\n-- \nEric Wong\n"},{"id":"126094","messageId":"7vaazcugv8.fsf@alter.siamese.dyndns.org","threadId":"21286","inReplyTo":"20091027071405.GA3236@dcvr.yhbt.net","subject":"Re: git-svn: add support for merges during 'git svn fetch'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-28T07:17:47Z","receivedAt":"2009-10-28T07:17:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Thanks for the ping, I got sidetracked and forgot about this.  I've\n> fixed up minor formatting details, acked and pushed out Sam's changes to\n> git://git.bogomips.org/git-svn along with one I small fix I originally\n> sent out a bad patch for.\n\nThanks; pulled.\n"}]}