svn-all-fast-export/svn2git

Export is not a git repository

Closed this issue · 6 comments

Hi,

I have the following setup:

Rules:

create repository devops-documentation
end repository

# ignore tags
match /tags/
end match

# ignore branches
match /branches/
end match

#match trunk to master
match /trunk/
  repository devops-documentation
  branch master
end match

I'm executing the commands via Docker container:

docker run --rm -it   -v `pwd`/workdir:/workdir:Z   -v `pwd`/conf:/tmp/conf:Z   -v /var/devops/devops-sync:/tmp/svn:Z   svn2git   /usr/local/svn2git/svn-all-fast-export   --identity-map /tmp/conf/authors.txt   --rules /tmp/conf/devops.rules --add-metadata --svn-branches --debug-rules --svn-ignore --empty-dirs /tmp/svn/

The output looks promising:

...
Exporting revision 1934 rev 1934 /trunk/jenkins-doc/src/asciidoc/jenkins-slaves-dev.asciidoc matched rule: "/tmp/conf/devops.rules:21 /trunk/"    exporting. 
.add/change file ( /trunk/jenkins-doc/src/asciidoc/jenkins-slaves-dev.asciidoc -> "master" "jenkins-doc/src/asciidoc/jenkins-slaves-dev.asciidoc" ) 
 1 modifications from SVN /trunk/ to devops-documentation/master done
Exporting revision 1935 rev 1935 /trunk/jenkins-doc/src/asciidoc/jenkins-slaves.asciidoc matched rule: "/tmp/conf/devops.rules:21 /trunk/"    exporting. 
.add/change file ( /trunk/jenkins-doc/src/asciidoc/jenkins-slaves.asciidoc -> "master" "jenkins-doc/src/asciidoc/jenkins-slaves.asciidoc" ) 
 1 modifications from SVN /trunk/ to devops-documentation/master done
Exporting revision 1936 rev 1936 /trunk/jenkins-doc/src/asciidoc/jenkins-slaves-dev.asciidoc matched rule: "/tmp/conf/devops.rules:21 /trunk/"    exporting. 
.add/change file ( /trunk/jenkins-doc/src/asciidoc/jenkins-slaves-dev.asciidoc -> "master" "jenkins-doc/src/asciidoc/jenkins-slaves-dev.asciidoc" ) 
 1 modifications from SVN /trunk/ to devops-documentation/master done
Exporting revision 1937 rev 1937 /trunk/jenkins-doc/src/asciidoc/jenkins-slaves.asciidoc matched rule: "/tmp/conf/devops.rules:21 /trunk/"    exporting. 
.add/change file ( /trunk/jenkins-doc/src/asciidoc/jenkins-slaves.asciidoc -> "master" "jenkins-doc/src/asciidoc/jenkins-slaves.asciidoc" ) 
 1 modifications from SVN /trunk/ to devops-documentation/master done
Waiting 30 seconds for fast-import to finish. 

However, when I cd into the workdir I see the following:

# ls -la
total 1704
drwxr-xr-x. 3 root  root      101 Jun 18 09:25 .
drwxr-x---. 6 nnnn nnnn     102 Jun 18 09:25 ..
drwxr-xr-x. 7 root  root      153 Jun 18 09:25 devops-documentation
-rw-r--r--. 1 root  root  1662849 Jun 18 09:25 gitlog-devops-documentation
-rw-r--r--. 1 root  root    78289 Jun 18 09:25 log-devops-documentation

# cd devops-documentation
# ls -la
total 116
drwxr-xr-x. 7 root root    153 Jun 18 09:25 .
drwxr-xr-x. 3 root root    101 Jun 18 09:25 ..
drwxr-xr-x. 2 root root      6 Jun 18 09:25 branches
-rwxr--r--. 1 root root     86 Jun 18 09:25 config
-rw-r--r--. 1 root root     73 Jun 18 09:25 description
-rw-r--r--. 1 root root     23 Jun 18 09:25 HEAD
drwxr-xr-x. 2 root root    242 Jun 18 09:25 hooks
drwxr-xr-x. 2 root root     21 Jun 18 09:25 info
-rw-r--r--. 1 root root 105841 Jun 18 09:25 marks-devops-documentation
drwxr-xr-x. 4 root root     30 Jun 18 09:25 objects
drwxr-xr-x. 4 root root     31 Jun 18 09:25 refs

This is not a valid git repository.

What am I missing?

Thanks so much and all the best,
Sebastian

Hi,
The produced repository is a "basre" one, think of it as the content of the .git folder.
You should push/move this to where you'd like to host it and then use git clone as normal.
/Cheers
Torgny

Hi @tnyblom ,

I would like to push the repository to e.g Github. How to proceed with it?

Thanks for your help!

Sebastian

Hi,

Like normally, ie git remote add ... and git push ....

/Cheers
Torgny

No, this doesn't work as the generated folders are not even git repositories. As you might have seen there is no .git folder in the generated output :/

Hello @tnyblom ,
can you assist on this further? The generated folder is not a git repository for me, so I cannot run commands like git remote add ... in the output folder.

It is rather urgent, so any help would be very much appreciated.