{"thread":{"id":"22352","subject":"[PATCH 1/2] git-svn: allow UUID to be manually remapped via rewriteUUID","startedAt":"2010-01-23T08:29:59Z","lastAt":"2010-01-24T19:29:05Z","messageCount":5,"participants":["Jay Soffian","Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"132457","messageId":"1264235401-44051-1-git-send-email-jaysoffian@gmail.com","threadId":"22352","inReplyTo":null,"subject":"[PATCH 0/2] two git-svn changes to help work with chromium.org","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-01-23T08:29:59Z","receivedAt":"2010-01-23T08:29:59Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"Google nicely mirrors the subversion chrome repository with git-svn. However,\nthe git-svn mirror has only trunk. I wanted to add in a couple other branches\nto my clone of the git-svn mirror, but to do so I needed the ability to lie\nabout the UUID since the publically accessible subversion repository has a\ndifferent UUID than that which google is cloning from using git-svn.\n\nIn addition, google has a ton of branches in the subversion repository, and\nI only wanted a few. Hence this two-patch series. For posterity, here's what\nmy .git/config looks like:\n\n[remote \"origin\"]\n\turl = git://git.chromium.org/chromium.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n[svn-remote \"svn\"]\n\turl = http://src.chromium.org/svn\n\tfetch = trunk/src:refs/remotes/svn/trunk\n\tbranches = branches/{249,302}/src:refs/remotes/svn/*\n\trewriteRoot = svn://svn.chromium.org/chrome\n\trewriteUUID = 0039d316-1c4b-4281-b951-d872f2087c98\n\nJay Soffian (2):\n  git-svn: allow UUID to be manually remapped via rewriteUUID\n  git-svn: allow subset of branches/tags to be specified in glob spec\n\n Documentation/git-svn.txt       |   31 +++++-\n git-svn.perl                    |   93 ++++++++++++-----\n t/t9153-git-svn-rewrite-uuid.sh |   25 +++++\n t/t9153/svn.dump                |   75 +++++++++++++\n t/t9154-git-svn-fancy-glob.sh   |   42 ++++++++\n t/t9154/svn.dump                |  222 +++++++++++++++++++++++++++++++++++++++\n 6 files changed, 460 insertions(+), 28 deletions(-)\n create mode 100755 t/t9153-git-svn-rewrite-uuid.sh\n create mode 100644 t/t9153/svn.dump\n create mode 100755 t/t9154-git-svn-fancy-glob.sh\n create mode 100644 t/t9154/svn.dump\n"},{"id":"132456","messageId":"1264235401-44051-2-git-send-email-jaysoffian@gmail.com","threadId":"22352","inReplyTo":"1264235401-44051-1-git-send-email-jaysoffian@gmail.com","subject":"[PATCH 1/2] git-svn: allow UUID to be manually remapped via rewriteUUID","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-01-23T08:30:00Z","receivedAt":"2010-01-23T08:30:00Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"In certain situations it may be necessary to manually remap an svn\nrepostitory UUID. For example:\n\n                  o--- [git-svn clone]\n                 /\n[origin svn repo]\n                 \\\n                  o--- [svnsync clone]\n\nImagine that only \"git-svn clone\" and \"svnsync clone\" are made available\nto external users. Furthur, \"git-svn clone\" contains only trunk, and for\nreasons unknown, \"svnsync clone\" is missing the revision properties that\nnormally provide the origin svn repo's UUID.\n\nA git user who has cloned the \"git-svn clone\" repo now wishes to use\ngit-svn to pull in the missing branches from the \"synsync clone\" repo.\nIn order for git-svn to get the history correct for those branches,\nit needs to know the origin svn repo's UUID. Hence rewriteUUID.\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\n---\n Documentation/git-svn.txt       |   15 ++++++--\n git-svn.perl                    |   33 ++++++++++++++---\n t/t9153-git-svn-rewrite-uuid.sh |   25 +++++++++++++\n t/t9153/svn.dump                |   75 +++++++++++++++++++++++++++++++++++++++\n 4 files changed, 140 insertions(+), 8 deletions(-)\n create mode 100755 t/t9153-git-svn-rewrite-uuid.sh\n create mode 100644 t/t9153/svn.dump\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 4cdca0d..98fe439 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -62,6 +62,8 @@ COMMANDS\n \tSet the 'useSvnsyncProps' option in the [svn-remote] config.\n --rewrite-root=<URL>;;\n \tSet the 'rewriteRoot' option in the [svn-remote] config.\n+--rewrite-uuid=<UUID>;;\n+\tSet the 'rewriteUUID' option in the [svn-remote] config.\n --username=<USER>;;\n \tFor transports that SVN handles authentication for (http,\n \thttps, and plain svn), specify the username.  For other\n@@ -616,6 +618,12 @@ svn-remote.<name>.rewriteRoot::\n \tthe repository with a public http:// or svn:// URL in the\n \tmetadata so users of it will see the public URL.\n \n+svn-remote.<name>.rewriteUUID::\n+\tSimilar to the useSvmProps option; this is for users who need\n+\tto remap the UUID manually. This may be useful in situations\n+\twhere the original UUID is not available via either useSvmProps\n+\tor useSvnsyncProps.\n+\n svn.brokenSymlinkWorkaround::\n \tThis disables potentially expensive checks to workaround\n \tbroken symlinks checked into SVN by broken clients.  Set this\n@@ -625,13 +633,14 @@ svn.brokenSymlinkWorkaround::\n \trevision fetched.  If unset, 'git svn' assumes this option to\n \tbe \"true\".\n \n-Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps\n+Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps\n options all affect the metadata generated and used by 'git svn'; they\n *must* be set in the configuration file before any history is imported\n and these settings should never be changed once they are set.\n \n-Additionally, only one of these four options can be used per-svn-remote\n-section because they affect the 'git-svn-id:' metadata line.\n+Additionally, only one of these options can be used per svn-remote\n+section because they affect the 'git-svn-id:' metadata line, except\n+for rewriteRoot and rewriteUUID which can be used together.\n \n \n BASIC EXAMPLES\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 650c9e5..1fab210 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -115,6 +115,7 @@ my %init_opts = ( 'template=s' => \\$_template, 'shared:s' => \\$_shared,\n \t\t  'use-svm-props' => sub { $icv{useSvmProps} = 1 },\n \t\t  'use-svnsync-props' => sub { $icv{useSvnsyncProps} = 1 },\n \t\t  'rewrite-root=s' => sub { $icv{rewriteRoot} = $_[1] },\n+\t\t  'rewrite-uuid=s' => sub { $icv{rewriteUUID} = $_[1] },\n                   %remote_opts );\n my %cmt_opts = ( 'edit|e' => \\$_edit,\n \t\t'rmdir' => \\$SVN::Git::Editor::_rmdir,\n@@ -2189,6 +2190,10 @@ sub svnsync {\n \t\tdie \"Can't have both 'useSvnsyncProps' and 'rewriteRoot' \",\n \t\t    \"options set!\\n\";\n \t}\n+\tif ($self->rewrite_uuid) {\n+\t\tdie \"Can't have both 'useSvnsyncProps' and 'rewriteUUID' \",\n+\t\t    \"options set!\\n\";\n+\t}\n \n \tmy $svnsync;\n \t# see if we have it in our config, first:\n@@ -2470,6 +2475,20 @@ sub rewrite_root {\n \t$self->{-rewrite_root} = $rwr;\n }\n \n+sub rewrite_uuid {\n+\tmy ($self) = @_;\n+\treturn $self->{-rewrite_uuid} if exists $self->{-rewrite_uuid};\n+\tmy $k = \"svn-remote.$self->{repo_id}.rewriteUUID\";\n+\tmy $rwid = eval { command_oneline(qw/config --get/, $k) };\n+\tif ($rwid) {\n+\t\t$rwid =~ s#/+$##;\n+\t\tif ($rwid !~ m#^[a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12}$#) {\n+\t\t\tdie \"$rwid is not a valid UUID (key: $k)\\n\";\n+\t\t}\n+\t}\n+\t$self->{-rewrite_uuid} = $rwid;\n+}\n+\n sub metadata_url {\n \tmy ($self) = @_;\n \t($self->rewrite_root || $self->{url}) .\n@@ -3253,6 +3272,10 @@ sub make_log_entry {\n \t\t\tdie \"Can't have both 'useSvmProps' and 'rewriteRoot' \",\n \t\t\t    \"options set!\\n\";\n \t\t}\n+\t\tif ($self->rewrite_uuid) {\n+\t\t\tdie \"Can't have both 'useSvmProps' and 'rewriteUUID' \",\n+\t\t\t    \"options set!\\n\";\n+\t\t}\n \t\tmy ($uuid, $r) = $headrev =~ m{^([a-f\\d\\-]{30,}):(\\d+)$}i;\n \t\t# we don't want \"SVM: initializing mirror for junk\" ...\n \t\treturn undef if $r == 0;\n@@ -3283,10 +3306,10 @@ sub make_log_entry {\n \t} else {\n \t\tmy $url = $self->metadata_url;\n \t\tremove_username($url);\n-\t\t$log_entry{metadata} = \"$url\\@$rev \" .\n-\t\t                       $self->ra->get_uuid;\n-\t\t$email ||= \"$author\\@\" . $self->ra->get_uuid;\n-\t\t$commit_email ||= \"$author\\@\" . $self->ra->get_uuid;\n+\t\tmy $uuid = $self->rewrite_uuid || $self->ra->get_uuid;\n+\t\t$log_entry{metadata} = \"$url\\@$rev \" . $uuid;\n+\t\t$email ||= \"$author\\@\" . $uuid;\n+\t\t$commit_email ||= \"$author\\@\" . $uuid;\n \t}\n \t$log_entry{name} = $name;\n \t$log_entry{email} = $email;\n@@ -3368,7 +3391,7 @@ sub rebuild {\n \t\t\t\t'--');\n \tmy $metadata_url = $self->metadata_url;\n \tremove_username($metadata_url);\n-\tmy $svn_uuid = $self->ra_uuid;\n+\tmy $svn_uuid = $self->rewrite_uuid || $self->ra_uuid;\n \tmy $c;\n \twhile (<$log>) {\n \t\tif ( m{^commit ($::sha1)$} ) {\ndiff --git a/t/t9153-git-svn-rewrite-uuid.sh b/t/t9153-git-svn-rewrite-uuid.sh\nnew file mode 100755\nindex 0000000..88a2cfa\n--- /dev/null\n+++ b/t/t9153-git-svn-rewrite-uuid.sh\n@@ -0,0 +1,25 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2010 Jay Soffian\n+#\n+\n+test_description='git svn --rewrite-uuid test'\n+\n+. ./lib-git-svn.sh\n+\n+uuid=6cc8ada4-5932-4b4a-8242-3534ed8a3232\n+\n+test_expect_success 'load svn repo' \"\n+\tsvnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9153/svn.dump' &&\n+\tgit svn init --minimize-url --rewrite-uuid='$uuid' '$svnrepo' &&\n+\tgit svn fetch\n+\t\"\n+\n+test_expect_success 'verify uuid' \"\n+\tgit cat-file commit refs/remotes/git-svn~0 | \\\n+\t   grep '^${git_svn_id}: .*@2 $uuid$' &&\n+\tgit cat-file commit refs/remotes/git-svn~1 | \\\n+\t   grep '^${git_svn_id}: .*@1 $uuid$'\n+\t\"\n+\n+test_done\ndiff --git a/t/t9153/svn.dump b/t/t9153/svn.dump\nnew file mode 100644\nindex 0000000..0ddfe70\n--- /dev/null\n+++ b/t/t9153/svn.dump\n@@ -0,0 +1,75 @@\n+SVN-fs-dump-format-version: 2\n+\n+UUID: b4885626-c94f-4a6c-b179-00c030fc68e8\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+2010-01-23T06:41:03.908576Z\n+PROPS-END\n+\n+Revision-number: 1\n+Prop-content-length: 109\n+Content-length: 109\n+\n+K 7\n+svn:log\n+V 11\n+initial foo\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T06:41:48.353776Z\n+PROPS-END\n+\n+Node-path: foo\n+Node-kind: file\n+Node-action: add\n+Prop-content-length: 10\n+Text-content-length: 4\n+Text-content-md5: d3b07384d113edec49eaa6238ad5ff00\n+Text-content-sha1: f1d2d2f924e986ac86fdf7b36c94bcdf32beec15\n+Content-length: 14\n+\n+PROPS-END\n+foo\n+\n+\n+Revision-number: 2\n+Prop-content-length: 110\n+Content-length: 110\n+\n+K 7\n+svn:log\n+V 12\n+now with bar\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T06:42:14.214640Z\n+PROPS-END\n+\n+Node-path: foo\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 8\n+Text-content-md5: f47c75614087a8dd938ba4acff252494\n+Text-content-sha1: 4e48e2c9a3d2ca8a708cb0cc545700544efb5021\n+Content-length: 8\n+\n+foo\n+bar\n+\n+\n-- \n1.6.6.1.515.g288caf\n"},{"id":"132458","messageId":"1264235401-44051-3-git-send-email-jaysoffian@gmail.com","threadId":"22352","inReplyTo":"1264235401-44051-1-git-send-email-jaysoffian@gmail.com","subject":"[PATCH 2/2] git-svn: allow subset of branches/tags to be specified in glob spec","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-01-23T08:30:01Z","receivedAt":"2010-01-23T08:30:01Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"For very large projects it is useful to be able to clone a subset of the\nupstream SVN repo's branches. Allow for this by letting the left-side of\nthe branches and tags glob specs contain a brace-delineated comma-separated\nlist of names. e.g.:\n\n\tbranches = branches/{red,green}/src:refs/remotes/branches/*\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\n---\nThe only part of this I don't like is asking the user to manually edit\n.git/svn/.metadata, but I couldn't think of a clean way to invalidate\nthe cached maxRev property. Further, if you know the starting point\nof your branches, it can speed things up quite a bit to just set maxRev\nto the appropriate value, esp for repos with a long history.\n\n Documentation/git-svn.txt     |   16 +++\n git-svn.perl                  |   60 ++++++++----\n t/t9154-git-svn-fancy-glob.sh |   42 ++++++++\n t/t9154/svn.dump              |  222 +++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 320 insertions(+), 20 deletions(-)\n create mode 100755 t/t9154-git-svn-fancy-glob.sh\n create mode 100644 t/t9154/svn.dump\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 98fe439..190a62a 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -825,6 +825,22 @@ independent path component (surrounded by '/' or EOL).   This\n type of configuration is not automatically created by 'init' and\n should be manually entered with a text-editor or using 'git config'.\n \n+It is also possible to fetch a subset of branches or tags by using a\n+comma-separated list of names within braces. For example:\n+\n+------------------------------------------------------------------------\n+[svn-remote \"huge-project\"]\n+\turl = http://server.org/svn\n+\tfetch = trunk/src:refs/remotes/trunk\n+\tbranches = branches/{red,green}/src:refs/remotes/branches/*\n+\ttags = tags/{1.0,2.0}/src:refs/remotes/tags/*\n+------------------------------------------------------------------------\n+\n+Note that git-svn keeps track of the highest revision in which a branch\n+or tag has appeared. If the subset of branches or tags is changed after\n+fetching, then .git/svn/.metadata must be manually edited to remove (or\n+reset) branches-maxRev and/or tags-maxRev as appropriate.\n+\n SEE ALSO\n --------\n linkgit:git-rebase[1]\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 1fab210..80bdef7 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1807,8 +1807,8 @@ sub read_all_remotes {\n \t\t\tmy $rs = {\n \t\t\t    t => $t,\n \t\t\t    remote => $remote,\n-\t\t\t    path => Git::SVN::GlobSpec->new($local_ref),\n-\t\t\t    ref => Git::SVN::GlobSpec->new($remote_ref) };\n+\t\t\t    path => Git::SVN::GlobSpec->new($local_ref, 1),\n+\t\t\t    ref => Git::SVN::GlobSpec->new($remote_ref, 0) };\n \t\t\tif (length($rs->{ref}->{right}) != 0) {\n \t\t\t\tdie \"The '*' glob character must be the last \",\n \t\t\t\t    \"character of '$remote_ref'\\n\";\n@@ -5180,6 +5180,7 @@ sub match_globs {\n \t\t\tnext if (length $g->{path}->{right} &&\n \t\t\t\t ($self->check_path($p, $r) !=\n \t\t\t\t  $SVN::Node::dir));\n+\t\t\tnext unless $p =~ /$g->{path}->{regex}/;\n \t\t\t$exists->{$p} = Git::SVN->init($self->{url}, $p, undef,\n \t\t\t\t\t $g->{ref}->full_path($de), 1);\n \t\t}\n@@ -5953,29 +5954,48 @@ use strict;\n use warnings;\n \n sub new {\n-\tmy ($class, $glob) = @_;\n+\tmy ($class, $glob, $pattern_ok) = @_;\n \tmy $re = $glob;\n \t$re =~ s!/+$!!g; # no need for trailing slashes\n-\t$re =~ m!^([^*]*)(\\*(?:/\\*)*)(.*)$!;\n-\tmy $temp = $re;\n-\tmy ($left, $right) = ($1, $3);\n-\t$re = $2;\n-\tmy $depth = $re =~ tr/*/*/;\n-\tif ($depth != $temp =~ tr/*/*/) {\n-\t\tdie \"Only one set of wildcard directories \" .\n-\t\t\t\"(e.g. '*' or '*/*/*') is supported: '$glob'\\n\";\n+\tmy (@left, @right, @patterns);\n+\tmy $state = \"left\";\n+\tmy $die_msg = \"Only one set of wildcard directories \" .\n+\t\t\t\t\"(e.g. '*' or '*/*/*') is supported: '$glob'\\n\";\n+\tfor my $part (split(m|/|, $glob)) {\n+\t\tif ($part =~ /\\*/ && $part ne \"*\") {\n+\t\t\tdie \"Invalid pattern in '$glob': $part\\n\";\n+\t\t} elsif ($pattern_ok && $part =~ /[{}]/ &&\n+\t\t\t $part !~ /^\\{[^{}]+\\}/) {\n+\t\t\tdie \"Invalid pattern in '$glob': $part\\n\";\n+\t\t}\n+\t\tif ($part eq \"*\") {\n+\t\t\tdie $die_msg if $state eq \"right\";\n+\t\t\t$state = \"pattern\";\n+\t\t\tpush(@patterns, \"[^/]*\");\n+\t\t} elsif ($pattern_ok && $part =~ /^\\{(.*)\\}$/) {\n+\t\t\tdie $die_msg if $state eq \"right\";\n+\t\t\t$state = \"pattern\";\n+\t\t\tmy $p = quotemeta($1);\n+\t\t\t$p =~ s/\\\\,/|/g;\n+\t\t\tpush(@patterns, \"(?:$p)\");\n+\t\t} else {\n+\t\t\tif ($state eq \"left\") {\n+\t\t\t\tpush(@left, $part);\n+\t\t\t} else {\n+\t\t\t\tpush(@right, $part);\n+\t\t\t\t$state = \"right\";\n+\t\t\t}\n+\t\t}\n \t}\n+\tmy $depth = @patterns;\n \tif ($depth == 0) {\n-\t\tdie \"One '*' is needed for glob: '$glob'\\n\";\n-\t}\n-\t$re =~ s!\\*!\\[^/\\]*!g;\n-\t$re = quotemeta($left) . \"($re)\" . quotemeta($right);\n-\tif (length $left && !($left =~ s!/+$!!g)) {\n-\t\tdie \"Missing trailing '/' on left side of: '$glob' ($left)\\n\";\n-\t}\n-\tif (length $right && !($right =~ s!^/+!!g)) {\n-\t\tdie \"Missing leading '/' on right side of: '$glob' ($right)\\n\";\n+\t\tdie \"One '*' is needed in glob: '$glob'\\n\";\n \t}\n+\tmy $left = join('/', @left);\n+\tmy $right = join('/', @right);\n+\t$re = join('/', @patterns);\n+\t$re = join('\\/',\n+\t\t   grep(length, quotemeta($left), \"($re)\", quotemeta($right)));\n \tmy $left_re = qr/^\\/\\Q$left\\E(\\/|$)/;\n \tbless { left => $left, right => $right, left_regex => $left_re,\n \t        regex => qr/$re/, glob => $glob, depth => $depth }, $class;\ndiff --git a/t/t9154-git-svn-fancy-glob.sh b/t/t9154-git-svn-fancy-glob.sh\nnew file mode 100755\nindex 0000000..a6a56a6\n--- /dev/null\n+++ b/t/t9154-git-svn-fancy-glob.sh\n@@ -0,0 +1,42 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2010 Jay Soffian\n+#\n+\n+test_description='git svn fancy glob test'\n+\n+. ./lib-git-svn.sh\n+\n+test_expect_success 'load svn repo' \"\n+\tsvnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9154/svn.dump' &&\n+\tgit svn init --minimize-url -T trunk '$svnrepo' &&\n+\tgit svn fetch\n+\t\"\n+\n+test_expect_success 'add red branch' \"\n+\tgit config svn-remote.svn.branches 'branches/{red}:refs/remotes/*' &&\n+\tgit svn fetch &&\n+\tgit rev-parse refs/remotes/red &&\n+\ttest_must_fail git rev-parse refs/remotes/green &&\n+\ttest_must_fail git rev-parse refs/remotes/blue\n+\t\"\n+\n+test_expect_success 'add green branch' \"\n+\tGIT_CONFIG=.git/svn/.metadata git config --unset svn-remote.svn.branches-maxRev &&\n+\tgit config svn-remote.svn.branches 'branches/{red,green}:refs/remotes/*' &&\n+\tgit svn fetch &&\n+\tgit rev-parse refs/remotes/red &&\n+\tgit rev-parse refs/remotes/green &&\n+\ttest_must_fail git rev-parse refs/remotes/blue\n+\t\"\n+\n+test_expect_success 'add all branches' \"\n+\tGIT_CONFIG=.git/svn/.metadata git config --unset svn-remote.svn.branches-maxRev &&\n+\tgit config svn-remote.svn.branches 'branches/*:refs/remotes/*' &&\n+\tgit svn fetch &&\n+\tgit rev-parse refs/remotes/red &&\n+\tgit rev-parse refs/remotes/green &&\n+\tgit rev-parse refs/remotes/blue\n+\t\"\n+\n+test_done\ndiff --git a/t/t9154/svn.dump b/t/t9154/svn.dump\nnew file mode 100644\nindex 0000000..3dfabb6\n--- /dev/null\n+++ b/t/t9154/svn.dump\n@@ -0,0 +1,222 @@\n+SVN-fs-dump-format-version: 2\n+\n+UUID: a18093a0-5f0b-44e0-8d88-8911ac7078db\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+2010-01-23T07:40:25.660053Z\n+PROPS-END\n+\n+Revision-number: 1\n+Prop-content-length: 104\n+Content-length: 104\n+\n+K 7\n+svn:log\n+V 7\n+initial\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T07:41:33.636365Z\n+PROPS-END\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+Node-path: trunk/foo\n+Node-kind: file\n+Node-action: add\n+Prop-content-length: 10\n+Text-content-length: 4\n+Text-content-md5: d3b07384d113edec49eaa6238ad5ff00\n+Text-content-sha1: f1d2d2f924e986ac86fdf7b36c94bcdf32beec15\n+Content-length: 14\n+\n+PROPS-END\n+foo\n+\n+\n+Revision-number: 2\n+Prop-content-length: 110\n+Content-length: 110\n+\n+K 7\n+svn:log\n+V 12\n+add branches\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T07:42:37.290694Z\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: branches/blue\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 1\n+Node-copyfrom-path: trunk\n+\n+\n+Node-path: branches/green\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 1\n+Node-copyfrom-path: trunk\n+\n+\n+Node-path: branches/red\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 1\n+Node-copyfrom-path: trunk\n+\n+\n+Revision-number: 3\n+Prop-content-length: 108\n+Content-length: 108\n+\n+K 7\n+svn:log\n+V 10\n+red change\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T07:43:02.208918Z\n+PROPS-END\n+\n+Node-path: branches/red/foo\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 8\n+Text-content-md5: 64c3c8cf7d0233ab7627623a68888bd1\n+Text-content-sha1: 95a0492027876adfd3891ec71ee37b79ee44d640\n+Content-length: 8\n+\n+foo\n+red\n+\n+\n+Revision-number: 4\n+Prop-content-length: 110\n+Content-length: 110\n+\n+K 7\n+svn:log\n+V 12\n+green change\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T07:43:15.746586Z\n+PROPS-END\n+\n+Node-path: branches/green/foo\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 10\n+Text-content-md5: 0209b6450891abc033d5eaaa9d3a8023\n+Text-content-sha1: 87fc3bef9faeec48c0cd61dfc9851db377fdccf7\n+Content-length: 10\n+\n+foo\n+green\n+\n+\n+Revision-number: 5\n+Prop-content-length: 109\n+Content-length: 109\n+\n+K 7\n+svn:log\n+V 11\n+blue change\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T07:43:29.364811Z\n+PROPS-END\n+\n+Node-path: branches/blue/foo\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 9\n+Text-content-md5: 9fbe4c13d0bae86386ae5209b2e6b275\n+Text-content-sha1: cc4575083459a16f9aaef796c4a2456d64691ba0\n+Content-length: 9\n+\n+foo\n+blue\n+\n+\n+Revision-number: 6\n+Prop-content-length: 110\n+Content-length: 110\n+\n+K 7\n+svn:log\n+V 12\n+trunk change\n+K 10\n+svn:author\n+V 3\n+jay\n+K 8\n+svn:date\n+V 27\n+2010-01-23T07:44:01.313130Z\n+PROPS-END\n+\n+Node-path: trunk/foo\n+Node-kind: file\n+Node-action: change\n+Text-content-length: 10\n+Text-content-md5: 1c4db977d7a57c3bae582aab87948516\n+Text-content-sha1: 469c08df449e702cf2a1fe746244a9ef3f837fad\n+Content-length: 10\n+\n+foo\n+trunk\n+\n+\n-- \n1.6.6.1.515.g288caf\n"},{"id":"132479","messageId":"20100123112626.GA21553@dcvr.yhbt.net","threadId":"22352","inReplyTo":"1264235401-44051-1-git-send-email-jaysoffian@gmail.com","subject":"Re: [PATCH 0/2] two git-svn changes to help work with chromium.org","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-01-23T11:26:26Z","receivedAt":"2010-01-23T11:26:26Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jay Soffian <jaysoffian@gmail.com> wrote:\n> Google nicely mirrors the subversion chrome repository with git-svn. However,\n> the git-svn mirror has only trunk. I wanted to add in a couple other branches\n> to my clone of the git-svn mirror, but to do so I needed the ability to lie\n> about the UUID since the publically accessible subversion repository has a\n> different UUID than that which google is cloning from using git-svn.\n\nThanks Jay, pushed out to git://git.bogomips.org/git-svn\nalong with a few other changes I've been forgetting about:\n\n> Jay Soffian (2):\n>   git-svn: allow UUID to be manually remapped via rewriteUUID\n>   git-svn: allow subset of branches/tags to be specified in glob spec\n\nAndrew Myrick (3):\n      git-svn: ignore changeless commits when checking for a cherry-pick\n      git-svn: handle merge-base failures\n      git-svn: update svn mergeinfo test suite\n\nIgor Mironov (4):\n      git-svn: fix mismatched src/dst errors for branch/tag\n      git-svn: respect commiturl option for branch/tag\n      git-svn: add --username/commit-url options for branch/tag\n      git-svn: document --username/commit-url for branch/tag\n\n-- \nEric Wong\n"},{"id":"132555","messageId":"7vbpgj714u.fsf@alter.siamese.dyndns.org","threadId":"22352","inReplyTo":"20100123112626.GA21553@dcvr.yhbt.net","subject":"Re: [PATCH 0/2] two git-svn changes to help work with chromium.org","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-24T19:29:05Z","receivedAt":"2010-01-24T19:29:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, pulled.\n"}]}