OK, within msysgit that gives:

$ git clone g...@gitorious.org:lyx/lyx.git

$ cd lyx

$ git svn init svn://svn.lyx.org/lyx/lyx-devel/ -T trunk -b branches -t tags
Using higher level of URL: svn://svn.lyx.org/lyx/lyx-devel => svn://svn.lyx.org/lyx

$ cp .git/refs/heads/master .git/refs/remotes/trunk

git log says last committed revision is 36939 so:

$ git svn fetch -r 36939
...
Done rebuilding .git/svn/refs/remotes/trunk/.rev_map.a592a061-630c-0410-9148-cb99ea01b6c8

This rebuilt the svn index.

$ git svn fetch

This did nothing as 36939 really was the last revision. So I commit something and then:

$ git svn fetch
        M       src/support/Timeout.cpp
        M       src/support/Timeout.h
r36940 = 78147ade87f93f5e734aa7a39407f2d468de1af6 (refs/remotes/trunk)

$ git svn rebase
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/trunk.

 $ git push origin master
Enter passphrase for key '/c/Users/abdel/.ssh/id_rsa':
Counting objects: 11, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.30 KiB, done.
Total 6 (delta 5), reused 0 (delta 0)
=> Syncing Gitorious... [OK]
To g...@gitorious.org:lyx/lyx.git
   d5ad428..78147ad  master -> master

Conclusion: That seems to work!

Hopefully Pavel migh be able to put a script somewhere that the resync daily.

Good job, thank you.

Abdel.

On 18/12/2010 18:43, Vincent van Ravesteijn wrote:
Abdel, Pavel,

(and other Git-lovers),

The LyX repository on Gitorious now contains the full history. Using
the following steps, you can checkout this repos and connect it to svn
afterwards, so you can sync the repos to svn yourself.


# 1. checkout the git repository from gitorious
git clone g...@gitorious.org:lyx/lyx.git

# or for read-only access:
#git clone git://gitorious.org/lyx/lyx.git

# 2. Initialize git svn, this should be the same as the line with
#    which the repository is created, see http://wiki.lyx.org/Devel/Git
git svn init svn://svn.lyx.org/lyx/lyx-devel/ -T trunk -b branches -t tags

# 3. Set the svn trunk branch to the current master
cd lyx
copy .git\refs\heads\master .git\refs\remotes\trunk

# 4. rebuild rev_map
git svn fetch -r<last_revision>

# 5. retrieve new commits from svn
git svn fetch

# 6. update to svn head, i.e fast-forward master branch to remotes\trunk
git svn rebase

# 7. push new commits to gitorious
git push origin master

# From now on, updating the repository means repeating steps 5--7.

Please, let me know whether this works for you too.

Some links:

http://wiki.lyx.org/Devel/Git,
http://trac.parrot.org/parrot/wiki/git-svn-tutorial,
http://www.kernel.org/pub/software/scm/git/docs/git-svn.html

Vincent

Reply via email to