svn-all-fast-export / svn2git

:octopus: A fast-import based converter for an svn repo to git repos
GNU General Public License v3.0
261 stars 100 forks source link

Export is not a git repository #125

Closed sebastianzillessen closed 3 years ago

sebastianzillessen commented 3 years ago

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

tnyblom commented 3 years ago

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

sebastianzillessen commented 3 years ago

Hi @tnyblom ,

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

Thanks for your help!

Sebastian

tnyblom commented 3 years ago

Hi,

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

/Cheers Torgny

sebastianzillessen commented 3 years ago

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 :/

sebastianzillessen commented 3 years ago

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.

tnyblom commented 3 years ago

Hi,

If nothing else you can simply clone it and push from that. But you should be able to push directly, look at google but something along the lines of "git push --mirror @.***" if my memory serves me.

On Thu, Jun 24, 2021 at 10:04 AM Sebastian Zillessen < @.***> wrote:

Hello @tnyblom https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/svn-all-fast-export/svn2git/issues/125#issuecomment-867430176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHW3ZYWWYTYUQHOWHQLKFTTULRKTANCNFSM465ETJXQ .