Git SVN does not extract anything

Added .git / config branches to sgn branches.

[svn-remote "svnb02"]
        url = https: // svn / repos / Project / branches / b02
        fetch =: refs / remotes / git-svn-b02
[svn-remote "svnb03"]
        url = https: // svn / repos / Project / branches / b03
        fetch =: refs / remotes / git-svn-b03

But only "svnb03" can be extracted using the following command:

git svn fetch -R svnb03 -r HEAD

For "svnb02" below, the command will return calmly without extracting anything.

git svn fetch -R svnb02 -r HEAD

Any sent will be welcome.

+3
source share
4 answers

, HEAD . .git/remotes/svnb02/HEAD. , .

Git HEAD , , -, git svn ; patch .

, svn. remote.svn. - .git/remotes.

. . .

- , svnb02 , . svn, .

+2

git svn clone , subversion , . , git svn clone .

+3

, (HEAD) . , svn - , . script :


#! /bin/sh
URL=$1
# git-svn fails to pull files if specified revision is not in path specified
# so find the last changed revision and use that
REV=$(svn info ${URL}trunk | grep "Last Changed Rev:" | awk '{print $NF}')
[ -n "$REV" ] || {
  echo "Revision not found. Check URL"
  exit 1
}
git svn init "$URL" -s --prefix svn/
git svn fetch -r $REV
+2

. , . , BASE " https://svn/repos/Project".

, .

, SVN git. , git (1.6+) git. git . , , .

trunk - {BASE}/trunk/ - {BASE}// - {BASE}/tags/

b02 b03 , , , . 1.5.x , , 1.6.x( 1.6.x) .

- URLS:

git svn init -T {BASE}/branches/b03 -b {BASE}/anydir -t {BASE}/tags git svn fetch -r33666 # 33666 - .

There after I suggest using git svn rebase.

+1
source

Source: https://habr.com/ru/post/1703455/


All Articles