Browse Source
In certain situations it may be necessary to manually remap an svn repostitory UUID. For example: o--- [git-svn clone] / [origin svn repo] \ o--- [svnsync clone] Imagine that only "git-svn clone" and "svnsync clone" are made available to external users. Furthur, "git-svn clone" contains only trunk, and for reasons unknown, "svnsync clone" is missing the revision properties that normally provide the origin svn repo's UUID. A git user who has cloned the "git-svn clone" repo now wishes to use git-svn to pull in the missing branches from the "synsync clone" repo. In order for git-svn to get the history correct for those branches, it needs to know the origin svn repo's UUID. Hence rewriteUUID. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>maint


4 changed files with 140 additions and 8 deletions
@ -0,0 +1,25 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# Copyright (c) 2010 Jay Soffian |
||||||
|
# |
||||||
|
|
||||||
|
test_description='git svn --rewrite-uuid test' |
||||||
|
|
||||||
|
. ./lib-git-svn.sh |
||||||
|
|
||||||
|
uuid=6cc8ada4-5932-4b4a-8242-3534ed8a3232 |
||||||
|
|
||||||
|
test_expect_success 'load svn repo' " |
||||||
|
svnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9153/svn.dump' && |
||||||
|
git svn init --minimize-url --rewrite-uuid='$uuid' '$svnrepo' && |
||||||
|
git svn fetch |
||||||
|
" |
||||||
|
|
||||||
|
test_expect_success 'verify uuid' " |
||||||
|
git cat-file commit refs/remotes/git-svn~0 | \ |
||||||
|
grep '^${git_svn_id}: .*@2 $uuid$' && |
||||||
|
git cat-file commit refs/remotes/git-svn~1 | \ |
||||||
|
grep '^${git_svn_id}: .*@1 $uuid$' |
||||||
|
" |
||||||
|
|
||||||
|
test_done |
@ -0,0 +1,75 @@ |
|||||||
|
SVN-fs-dump-format-version: 2 |
||||||
|
|
||||||
|
UUID: b4885626-c94f-4a6c-b179-00c030fc68e8 |
||||||
|
|
||||||
|
Revision-number: 0 |
||||||
|
Prop-content-length: 56 |
||||||
|
Content-length: 56 |
||||||
|
|
||||||
|
K 8 |
||||||
|
svn:date |
||||||
|
V 27 |
||||||
|
2010-01-23T06:41:03.908576Z |
||||||
|
PROPS-END |
||||||
|
|
||||||
|
Revision-number: 1 |
||||||
|
Prop-content-length: 109 |
||||||
|
Content-length: 109 |
||||||
|
|
||||||
|
K 7 |
||||||
|
svn:log |
||||||
|
V 11 |
||||||
|
initial foo |
||||||
|
K 10 |
||||||
|
svn:author |
||||||
|
V 3 |
||||||
|
jay |
||||||
|
K 8 |
||||||
|
svn:date |
||||||
|
V 27 |
||||||
|
2010-01-23T06:41:48.353776Z |
||||||
|
PROPS-END |
||||||
|
|
||||||
|
Node-path: foo |
||||||
|
Node-kind: file |
||||||
|
Node-action: add |
||||||
|
Prop-content-length: 10 |
||||||
|
Text-content-length: 4 |
||||||
|
Text-content-md5: d3b07384d113edec49eaa6238ad5ff00 |
||||||
|
Text-content-sha1: f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 |
||||||
|
Content-length: 14 |
||||||
|
|
||||||
|
PROPS-END |
||||||
|
foo |
||||||
|
|
||||||
|
|
||||||
|
Revision-number: 2 |
||||||
|
Prop-content-length: 110 |
||||||
|
Content-length: 110 |
||||||
|
|
||||||
|
K 7 |
||||||
|
svn:log |
||||||
|
V 12 |
||||||
|
now with bar |
||||||
|
K 10 |
||||||
|
svn:author |
||||||
|
V 3 |
||||||
|
jay |
||||||
|
K 8 |
||||||
|
svn:date |
||||||
|
V 27 |
||||||
|
2010-01-23T06:42:14.214640Z |
||||||
|
PROPS-END |
||||||
|
|
||||||
|
Node-path: foo |
||||||
|
Node-kind: file |
||||||
|
Node-action: change |
||||||
|
Text-content-length: 8 |
||||||
|
Text-content-md5: f47c75614087a8dd938ba4acff252494 |
||||||
|
Text-content-sha1: 4e48e2c9a3d2ca8a708cb0cc545700544efb5021 |
||||||
|
Content-length: 8 |
||||||
|
|
||||||
|
foo |
||||||
|
bar |
||||||
|
|
||||||
|
|
Loading…
Reference in new issue