How to configure subgit to mirror an svn repository that looks like a Windows Explorer hierarchy?

As users of Windows, we created one svn repo with a folder hierarchy. The lower nodes contain the standard svn layout:

ProjectA/
    ApplicationOne/
        ModuleX/
            trunk/
            branches/
            tags/
    ApplicationTwo/
        ModuleY/
            trunk/
            branches/
            tags/

... etc. to infinity. The repo now contains about 100+ real svn projects with the structure of connecting lines / branches / tags, but almost none of them are at the top level.

How do I configure subgit to handle this?

+4
source share
1 answer

SubGit can work in two different modes: local mirror mode and remote mirroring mode. Below you can find a general overview of these modes and some recommendations for your specific case.

  • Subversion Git , SubGit SVN Git.

    . , SubGit 'Local Mode' Book.

    • subgit configure <SVN_REPO>
      SubGit version <VERSION> build #<BUILD_NUMBER>
      
      Detecting paths eligible for translation... done.
      Subversion to Git mapping has been configured:
        /ProjectA/ApplicationOne/ModuleX : <SVN_REPO>/git/ProjectA/ApplicationOne/ModuleX.git
        /ProjectA/ApplicationTwo/ModuleY : <SVN_REPO>/git/ProjectA/ApplicationTwo/ModuleY.git
        ...
      
      CONFIGURATION SUCCESSFUL
      ...
      

      <SVN_REPO>/conf/subgit.conf. Subversion, .

      , , : :

      ...
      [git "ProjectA/ApplicationOne/ModuleX"]
        translationRoot = /ProjectA/ApplicationOne/ModuleX
        repository = git//ProjectA/ApplicationOne/ModuleX.git
        pathEncoding = UTF-8
        trunk = trunk:refs/heads/master
        branches = branches/*:refs/heads/*
        shelves = shelves/*:refs/shelves/*
        tags = tags/*:refs/tags/*
      ...
      
    • ,

      /conf/authors.txt, SVN Git. . .

    • , Subversion Git , subgit install:

      subgit install repo
      SubGit version <VERSION> build #<BUILD_NUMBER>
      
      Subversion to Git mapping has been found:
        /ProjectA/ApplicationOne/ModuleX : <SVN_REPO>/git/ProjectA/ApplicationOne/ModuleX.git
        /ProjectA/ApplicationTwo/ModuleY : <SVN_REPO>/git/ProjectA/ApplicationTwo/ModuleY.git
        ...
      
      Processing '/ProjectA/ApplicationOne/ModuleX'
        Translating Subversion revisions to Git commits...
      Processing '/ProjectA/ApplicationTwo/ModuleY'
        Translating Subversion revisions to Git commits...
        ...
      
        Subversion revisions translated: <REVISIONS_NUMBER>.
        Total time: <TIME_SPENT> seconds.
      
      INSTALLATION SUCCESSFUL
      
    • Git

      , Subversion Git, Git ( HTTP- Apache). , :


  • SubGit Git Subversion .

    . . SubGit 'Remote Mode' Book.

    • SubGit , subgit configure --svn-url <SVN_URL> Subversion:

      subgit configure --svn-url <SVN_ROOT_URL>/ProjectA/ApplicationOne/ModuleX <GIT_ROOT_DIR>/ProjectA/ApplicationOne/ModuleX.git
      SubGit version <VERSION> build #<BUILD_NUMBER>
      
      Configuring writable Git mirror of remote Subversion repository:
        Subversion repository URL : <SVN_ROOT_URL>/ProjectA/ApplicationOne/ModuleX
        Git repository location   : <GIT_ROOT_DIR>/ProjectA/ApplicationOne/ModuleX.git
      
      CONFIGURATION SUCCESSFUL
      ...
      

      SubGit <GIT_REPO>/subgit/config Git. :

      ...
      [svn]
        url = <SVN_ROOT_URL>/ProjectA/ApplicationOne/ModuleX
        trunk = trunk:refs/heads/master
        branches = branches/*:refs/heads/*
        tags = tags/*:refs/tags/*
        shelves = shelves/*:refs/shelves/*
        fetchInterval = 60
        connectTimeout = 30
        readTimeout = 60
        keepGitCommitTime = false
        auth = default
      
      [auth "default"]
        passwords = subgit/passwd
        useDefaultSubversionConfigurationDirectory = false
        subversionConfigurationDirectory = <SVN_CONFIG_DIR>
      ...
      
    • ,

      /subgit/authors.txt, SVN Git. . .

    • SVN

      file://, , SubGit Subversion. , , SubGit.

      hook pre-revprop-change Subversion, , . SubGit Book.

    • , Subversion Git , subgit install:

      subgit install git
      SubGit version <VERSION> build #<BUILD_NUMBER>
      
      Translating Subversion revisions to Git commits...
      
        Subversion revisions translated: <REVISIONS_NUMBER>.
        Total time: <TIME_SPENT> seconds.
      
      INSTALLATION SUCCESSFUL
      

      , SVN , . , SubGit Git. - .

    • Git

      , , .

      , Atlassian Stash Git, SVN Mirror Plugin, SubGit .

, :

  • Subversion SubGit , SVN .

  • Subversion file://, .

    , 100 , post-commit SVN-hook, , , Git .

, , " ", : support @subgit.com.

+7

All Articles