Skip to content
Victor Itkin edited this page Aug 10, 2013 · 20 revisions

Conversion from SVN to Git of the Aptoide Client.

For details and issues visit http://aptoide.org

How to get details:

svn log --stop-on-copy http://aptoide.org/repo/aptoide-client

You can see a specific revision by using URLs such as http://aptoide.org/repo/!svn/bc/42

Here is how this repository has been created:

$ mkdir aptoide-client
$ cd aptoide-client
$ git svn init http://aptoide.org/repo
$ vi .git/config

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true

[svn-remote "aptoide-svn"]
    ignore-paths = .p4ignore|.class|.zip|.jar|.war|.apk|.ap_
    url = http://aptoide.org/repo
    fetch = aptoide-client/unstable/trunk/Aptoide:refs/remotes/aptoide-svn/unstable/trunk/Aptoide
    fetch = aptoide-client/unstable/Stable/Aptoide:refs/remotes/aptoide-svn/unstable/Stable/Aptoide
    fetch = aptoide-client/unstable/stable2/Aptoide:refs/remotes/aptoide-svn/unstable/stable2/Aptoide
    fetch = aptoide-client/4.1.1/Aptoide:refs/remotes/aptoide-svn/4.1.1/Aptoide
    fetch = aptoide-client/4.0.2.1/Aptoide:refs/remotes/aptoide-svn/4.0.2.1/Aptoide
    fetch = aptoide-client/unstable/4.0.2/Aptoide:refs/remotes/aptoide-svn/unstable/4.0.2/Aptoide
    fetch = aptoide-client/unstable/4.0.1/Aptoide:refs/remotes/aptoide-svn/unstable/4.0.1/Aptoide
    fetch = aptoide-client/4.0.1/Aptoide:refs/remotes/aptoide-svn/4.0.1/Aptoide
    fetch = aptoide-client/4.0.0/Aptoide:refs/remotes/aptoide-svn/4.0.0/Aptoide
    fetch = aptoide-client/v3/Aptoide:refs/remotes/aptoide-svn/v3/Aptoide
    fetch = aptoide-client/unstable/v3:refs/remotes/aptoide-svn/unstable/v3
    fetch = aptoide-client/unstable/v3facePlayground:refs/remotes/aptoide-svn/unstable/v3facePlayground
    fetch = aptoide-client/unstable/2.8.0/Aptoide:refs/remotes/aptoide-svn/unstable/2.8.0/Aptoide
    fetch = aptoide-client/2.7.1/library:refs/remotes/aptoide-svn/2.7.1/library
    fetch = aptoide-client/2.7.1/com_viewpagerindicator:refs/remotes/aptoide-svn/2.7.1/com_viewpagerindicator
    fetch = aptoide-client/2.7.1/AptoideConcept:refs/remotes/aptoide-svn/2.7.1/AptoideConcept
    fetch = aptoide-client/2.7.1/Aptoide:refs/remotes/aptoide-svn/2.7.1/Aptoide
    #fetch = aptoide-client/unstable/2.7.1:refs/remotes/aptoide-svn/unstable/2.7.1
    #fetch = aptoide-client/unstable/2.7.1/AptoideConcept/AptoideConcept:refs/remotes/aptoide-svn/unstable/2.7.1/AptoideConcept/AptoideConcept
    fetch = aptoide-client/unstable/2.7.1/com_viewpagerindicator:refs/remotes/aptoide-svn/unstable/2.7.1/com_viewpagerindicator
    fetch = aptoide-client/unstable/2.7.1/AptoideConcept2:refs/remotes/aptoide-svn/unstable/2.7.1/AptoideConcept2
    fetch = aptoide-client/unstable/2.7.1/AptoideConcept:refs/remotes/aptoide-svn/unstable/2.7.1/AptoideConcept
    fetch = aptoide-client/unstable/2.7.1/Aptoide:refs/remotes/aptoide-svn/unstable/2.7.1/Aptoide
    fetch = aptoide-client/2.7.0/com_viewpagerindicator:refs/remotes/aptoide-svn/2.7.0/com_viewpagerindicator
    fetch = aptoide-client/2.7.0/AptoideConcept:refs/remotes/aptoide-svn/2.7.0/AptoideConcept
    fetch = aptoide-client/2.7.0/Aptoide:refs/remotes/aptoide-svn/2.7.0/Aptoide
    #fetch = aptoide-client/unstable/2.6.2:refs/remotes/aptoide-svn/unstable/2.6.2
    fetch = aptoide-client/unstable/2.6.2/com_viewpagerindicator:refs/remotes/aptoide-svn/unstable/2.6.2/com_viewpagerindicator
    fetch = aptoide-client/unstable/2.6.2/AptoideConcept:refs/remotes/aptoide-svn/unstable/2.6.2/AptoideConcept
    fetch = aptoide-client/unstable/2.6.2/Aptoide:refs/remotes/aptoide-svn/unstable/2.6.2/Aptoide
    fetch = aptoide-client/2.6.1:refs/remotes/aptoide-svn/2.6.1
    fetch = aptoide-client/unstable/2.6.1/Aptoide:refs/remotes/aptoide-svn/unstable/2.6.1/Aptoide
    fetch = aptoide-client/2.6.0:refs/remotes/aptoide-svn/2.6.0
    fetch = aptoide-client/2.6:refs/remotes/aptoide-svn/2.6
    fetch = aptoide-client/2.5.4/Aptoide:refs/remotes/aptoide-svn/2.5.4/Aptoide
    fetch = aptoide-client/2.5.3/Aptoide:refs/remotes/aptoide-svn/2.5.3/Aptoide
    fetch = aptoide-client/2.5.2/Aptoide:refs/remotes/aptoide-svn/2.5.2/Aptoide
    fetch = aptoide-client/2.5.1/Aptoide:refs/remotes/aptoide-svn/2.5.1/Aptoide
    fetch = aptoide-client/estagioverao2011merged/Aptoide:refs/remotes/aptoide-svn/estagioverao2011merged/Aptoide
    fetch = aptoide-client/estagioverao2011/Aptoide:refs/remotes/aptoide-svn/estagioverao2011/Aptoide
    fetch = aptoide-client/2.5.0:refs/remotes/aptoide-svn/2.5.0
    fetch = aptoide-client/2.4.3:refs/remotes/aptoide-svn/2.4.3
    fetch = aptoide-client/2.4:refs/remotes/aptoide-svn/2.4
    fetch = aptoide-client/v2.0:refs/remotes/aptoide-svn/v2.0
    fetch = aptoide-client/v1.6:refs/remotes/aptoide-svn/v1.6
    fetch = aptoide-client/legacy:refs/remotes/aptoide-svn/legacy
    fetch = aptoide-client/unstable/TestAptoide:refs/remotes/aptoide-svn/unstable/TestAptoide
    fetch = aptoide-client/unstable/Aptoide:refs/remotes/aptoide-svn/unstable/Aptoide
    fetch = unstable/aptoide-cli:refs/remotes/aptoide-svn/unstable/aptoide-cli
    fetch = trunk/aptoide-cli:refs/remotes/aptoide-svn/trunk/aptoide-cli
    fetch = aptoide-cli:refs/remotes/aptoide-svn/aptoide-cli
    fetch = aptoide:refs/remotes/aptoide-svn/aptoide

Add the authors:

$ vi .git/authors.txt

rljoe = Roberto Jacinto <roberto.jacinto@aptoide.com>
teresa.deus = Teresa Futscher de Deus <teresa.deus@aptoide.com>
rui.mateus = Rui Mateus <rui.mateus@aptoide.com>
rafael.campos = Rafael Campos <rafael.campos@aptoide.com>
dsilveira = Duarte Silveira <duarte.silveira@aptoide.com>

$ git svn fetch --authors-file=.git/authors.txt aptoide-svn

In case the fetching is interrupted you can continue from the revision it failed or even replace previously synchronized revisions:

$ git svn fetch --authors-file=.git/authors.txt -r <revision>:HEAD aptoide-svn

You need to create the corresponding branches:

$ for branch in `git branch -a|grep remotes/aptoide-svn/|sed 's|remotes/aptoide-svn/||'`; do git branch --set-upstream svn/$branch remotes/aptoide-svn/$branch; done

Then you can push them all:

$ git remote add origin git@github.com:vitkin/aptoide-client.git
$ git push -u --all

To synchonize with the original subversion repository after you've cloned this repository:

You need to add the SVN reference by adding the [svn-remote "aptoide-svn"] section as described upper:

$ vi .git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true

[svn-remote "aptoide-svn"]
        ignore-paths = .p4ignore|.class|.zip|.jar|.war|.apk|.ap_
        url = http://aptoide.org/repo
        fetch = aptoide-client/unstable/trunk/Aptoide:refs/remotes/aptoide-svn/unstable/trunk/Aptoide
        fetch = aptoide-client/unstable/Stable/Aptoide:refs/remotes/aptoide-svn/unstable/Stable/Aptoide
        ...

To fetch the latest revisions into the "remotes/svn/*" branches directly from the original SVN repository:

$ git svn fetch --authors-file=.git/authors.txt aptoide-svn
$ for branch in `git branch -a|grep remotes/aptoide-svn/|sed 's|remotes/aptoide-svn/||'`; do git branch --set-upstream svn/$branch remotes/aptoide-svn/$branch; done