Using GIT with Apertium SVN

From Apertium
(Redirected from Using GIT with Apertium)
Jump to: navigation, search

If you want to use Git with Apertium, you can check out the modules you want using git-svn:

Say you want to checkout lttoolbox, execute the following command:

git svn clone https://svn.code.sf.net/p/apertium/svn/trunk/lttoolbox


Note that this will look through all the SVN commits from the beginning of time. If you don't need history all the way back, but only from, say, SVN revision 50000, you can do this instead:

git svn clone -r50000:HEAD https://svn.code.sf.net/p/apertium/svn/trunk/lttoolbox

Contents

[edit] Is there a full git mirror?

Originally, some of the Apertium developers hosted a GIT mirror of the Apertium repository (which is currently a Subversion repository) at http://repo.or.cz. This approach had two disadvantages:

  • The GIT repository became outdated rather quickly (although this was easily fixed by running git svn rebase),
  • The GIT mirror contained everything in the repository. Subversion users do not have to checkout the entire repository, since Subversion is one of few SCM systems which allows one to checkout only subdirectories of interest.


[edit] How do I get only some modules, but within the same git repo?

If you don't want the full SVN checkout, but still want to be able to make one commit that includes files from e.g. both languages/apertium-lol and incubator/apertium-lol-wat, then try

git svn clone -r60000:HEAD https://svn.code.sf.net/p/apertium/svn/ \
  --include-paths='^(languages/apertium-(lol|wat)|incubator/apertium-lol-wat)' \
  apertium-gitsvn

[edit] How do I get branches and tags?

To get lttoolbox with the SVN branches and tags represented as such in git, you can do

git svn clone https://svn.code.sf.net/p/apertium/svn/ \
-T trunk/lttoolbox -b branches/lttoolbox -t tags/lttoolbox

Note that this will checkout everything to a directory named apertium; unfortunately there is no flag to change this behaviour.

[edit] Why can't I push/pull?

With git-svn you

  • don't use git push, but git svn dcommit
  • don't use git pull, but git svn rebase

And you shouldn't have uncommitted changes in your repo when you do git svn dcommit/rebase. So if you want to rebase/dcommit but you have uncommitted changes, the typical workflow is:

git stash
git svn rebase
git stash pop

[edit] Can we move everything to git?

No.

[edit] Please?

No.

[edit] Why not?

Weeell, if you write us a detailed proposal and timeline for the changeover, and you contractually bind yourself to travel around and educate all our linguists in solving merge conflicts, then we may consider it. If you've already made several commits to a language pair from before.

See earlier proposal: http://wiki.apertium.org/wiki/PMC_proposals/Move_apertium_to_github

[edit] But sf.net is clunky and github looks good

Fortunately most developers don't need to use sf.net for anything except creating their account (and our users shouldn't use sf.net at all).

[edit] External links

[edit] See Also

Personal tools