2011-08-15 6 views
2

J'essaie de vérifier un dépôt SVN via git-svn et j'ai des problèmes pour que git joue bien avec les répertoires trunk/branches/tags.git-svn checkout projet ne fonctionne pas avec -s

Cela fonctionne très bien:

git svn clone https://svn-repo-base/projects/path/to/my/project/trunk 

mais lorsque je tente:

git svn clone -s --no-minimize-url https://svn-repo-base/projects/path/to/my/project/ 

Je viens d'obtenir un répertoire vide sans fichiers clonés. (le --no-minimize-url est là parce que git essayait de faire une caisse sur https://svn-repo-base/ sans elle)

Des idées de ce que je fais mal ici?

Répondre

0
  1. Utilisez git svn init et git svn fetch ultérieure plutôt que git svn clone. Cette approche est beaucoup plus stable que git svn clone
  2. Si votre dépôt Subversion suit la norme Subversion /trunk, /branches, système /tags, le commutateur -s devrait fonctionner. OMMISSIONS parc à résidus miniers /trunk/ dans votre URL:

    git svn init -s https://svn-repo-base/projects/path/to/my/project project.git 
    git svn fetch 
    
  3. Pour moi assez souvent avorté svn fetch mais continue en toute transparence à rappeler à nouveau. Par conséquent, j'ai même écrit un script complet qui met à jour/actualise tous les repositionnements Git-on-SVN en utilisant un Windows Batchfile. J'utilise ce git-fetch-all tous les jours pour aller chercher toutes les dernières SVN de tous les dépôts git (dans des répertoires .git nommé):

    @Echo Off 
    
    IF "%1"=="" GOTO noparams 
    
    IF "%1"=="fetch" GOTO fetch 
    
    goto end 
    
    :fetch 
    IF NOT exist .git\svn\refs\remotes goto nosvnwc 
    git svn fetch 
    if ERRORLEVEL 1 goto fetch 
    git svn rebase -l 
    goto end 
    
    :nosvnwc 
    ECHO --- Directory seems not to be a SVN bound Git Repository. Doing plain fetch 
    git fetch --all 
    goto end 
    
    :noparams 
    FOR /d %%f IN (.\*.git) DO (
    cd %%f 
    ECHO --- Fetching %%f SVN Commits ------------------------------------------ 
    call ..\%0 fetch 
    ECHO --- Calling 'git gc --auto' in %%f 
    git gc --auto 
    cd .. 
    ECHO --- Leaving %%f 
    ECHO. 
    ECHO. 
    ) 
    
    :end 
    ECHO Update finished. 
    
Questions connexes