-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn: allow subset of branches/tags to be specified in glob spec
For very large projects it is useful to be able to clone a subset of the upstream SVN repo's branches. Allow for this by letting the left-side of the branches and tags glob specs contain a brace-delineated comma-separated list of names. e.g.: branches = branches/{red,green}/src:refs/remotes/branches/* Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
- Loading branch information
Jay Soffian
authored and
Eric Wong
committed
Jan 23, 2010
1 parent
3e18ce1
commit 0757620
Showing
4 changed files
with
320 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2010 Jay Soffian | ||
# | ||
|
||
test_description='git svn fancy glob test' | ||
|
||
. ./lib-git-svn.sh | ||
|
||
test_expect_success 'load svn repo' " | ||
svnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9154/svn.dump' && | ||
git svn init --minimize-url -T trunk '$svnrepo' && | ||
git svn fetch | ||
" | ||
|
||
test_expect_success 'add red branch' " | ||
git config svn-remote.svn.branches 'branches/{red}:refs/remotes/*' && | ||
git svn fetch && | ||
git rev-parse refs/remotes/red && | ||
test_must_fail git rev-parse refs/remotes/green && | ||
test_must_fail git rev-parse refs/remotes/blue | ||
" | ||
|
||
test_expect_success 'add green branch' " | ||
GIT_CONFIG=.git/svn/.metadata git config --unset svn-remote.svn.branches-maxRev && | ||
git config svn-remote.svn.branches 'branches/{red,green}:refs/remotes/*' && | ||
git svn fetch && | ||
git rev-parse refs/remotes/red && | ||
git rev-parse refs/remotes/green && | ||
test_must_fail git rev-parse refs/remotes/blue | ||
" | ||
|
||
test_expect_success 'add all branches' " | ||
GIT_CONFIG=.git/svn/.metadata git config --unset svn-remote.svn.branches-maxRev && | ||
git config svn-remote.svn.branches 'branches/*:refs/remotes/*' && | ||
git svn fetch && | ||
git rev-parse refs/remotes/red && | ||
git rev-parse refs/remotes/green && | ||
git rev-parse refs/remotes/blue | ||
" | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
SVN-fs-dump-format-version: 2 | ||
|
||
UUID: a18093a0-5f0b-44e0-8d88-8911ac7078db | ||
|
||
Revision-number: 0 | ||
Prop-content-length: 56 | ||
Content-length: 56 | ||
|
||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:40:25.660053Z | ||
PROPS-END | ||
|
||
Revision-number: 1 | ||
Prop-content-length: 104 | ||
Content-length: 104 | ||
|
||
K 7 | ||
svn:log | ||
V 7 | ||
initial | ||
K 10 | ||
svn:author | ||
V 3 | ||
jay | ||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:41:33.636365Z | ||
PROPS-END | ||
|
||
Node-path: trunk | ||
Node-kind: dir | ||
Node-action: add | ||
Prop-content-length: 10 | ||
Content-length: 10 | ||
|
||
PROPS-END | ||
|
||
|
||
Node-path: trunk/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 | ||
add branches | ||
K 10 | ||
svn:author | ||
V 3 | ||
jay | ||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:42:37.290694Z | ||
PROPS-END | ||
|
||
Node-path: branches | ||
Node-kind: dir | ||
Node-action: add | ||
Prop-content-length: 10 | ||
Content-length: 10 | ||
|
||
PROPS-END | ||
|
||
|
||
Node-path: branches/blue | ||
Node-kind: dir | ||
Node-action: add | ||
Node-copyfrom-rev: 1 | ||
Node-copyfrom-path: trunk | ||
|
||
|
||
Node-path: branches/green | ||
Node-kind: dir | ||
Node-action: add | ||
Node-copyfrom-rev: 1 | ||
Node-copyfrom-path: trunk | ||
|
||
|
||
Node-path: branches/red | ||
Node-kind: dir | ||
Node-action: add | ||
Node-copyfrom-rev: 1 | ||
Node-copyfrom-path: trunk | ||
|
||
|
||
Revision-number: 3 | ||
Prop-content-length: 108 | ||
Content-length: 108 | ||
|
||
K 7 | ||
svn:log | ||
V 10 | ||
red change | ||
K 10 | ||
svn:author | ||
V 3 | ||
jay | ||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:43:02.208918Z | ||
PROPS-END | ||
|
||
Node-path: branches/red/foo | ||
Node-kind: file | ||
Node-action: change | ||
Text-content-length: 8 | ||
Text-content-md5: 64c3c8cf7d0233ab7627623a68888bd1 | ||
Text-content-sha1: 95a0492027876adfd3891ec71ee37b79ee44d640 | ||
Content-length: 8 | ||
|
||
foo | ||
red | ||
|
||
|
||
Revision-number: 4 | ||
Prop-content-length: 110 | ||
Content-length: 110 | ||
|
||
K 7 | ||
svn:log | ||
V 12 | ||
green change | ||
K 10 | ||
svn:author | ||
V 3 | ||
jay | ||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:43:15.746586Z | ||
PROPS-END | ||
|
||
Node-path: branches/green/foo | ||
Node-kind: file | ||
Node-action: change | ||
Text-content-length: 10 | ||
Text-content-md5: 0209b6450891abc033d5eaaa9d3a8023 | ||
Text-content-sha1: 87fc3bef9faeec48c0cd61dfc9851db377fdccf7 | ||
Content-length: 10 | ||
|
||
foo | ||
green | ||
|
||
|
||
Revision-number: 5 | ||
Prop-content-length: 109 | ||
Content-length: 109 | ||
|
||
K 7 | ||
svn:log | ||
V 11 | ||
blue change | ||
K 10 | ||
svn:author | ||
V 3 | ||
jay | ||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:43:29.364811Z | ||
PROPS-END | ||
|
||
Node-path: branches/blue/foo | ||
Node-kind: file | ||
Node-action: change | ||
Text-content-length: 9 | ||
Text-content-md5: 9fbe4c13d0bae86386ae5209b2e6b275 | ||
Text-content-sha1: cc4575083459a16f9aaef796c4a2456d64691ba0 | ||
Content-length: 9 | ||
|
||
foo | ||
blue | ||
|
||
|
||
Revision-number: 6 | ||
Prop-content-length: 110 | ||
Content-length: 110 | ||
|
||
K 7 | ||
svn:log | ||
V 12 | ||
trunk change | ||
K 10 | ||
svn:author | ||
V 3 | ||
jay | ||
K 8 | ||
svn:date | ||
V 27 | ||
2010-01-23T07:44:01.313130Z | ||
PROPS-END | ||
|
||
Node-path: trunk/foo | ||
Node-kind: file | ||
Node-action: change | ||
Text-content-length: 10 | ||
Text-content-md5: 1c4db977d7a57c3bae582aab87948516 | ||
Text-content-sha1: 469c08df449e702cf2a1fe746244a9ef3f837fad | ||
Content-length: 10 | ||
|
||
foo | ||
trunk | ||
|
||
|