Multiple repositories in one directory (same level) - is it possible?

前端 未结 7 630
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-06 08:12

My original problem is that I have a directory where I write various scripts. Each of them is independent of others, and usually one-file-long. I want to have some versioning ap

7条回答
  •  [愿得一人]
    2021-02-06 08:53

    These requirements seem pretty "special" to me, so here is a solution on par with them ^^

    You may use two completely different VCS, in the same directory. Even two "instances" of SVN might work: SVN stores its metadata in a directory called .SVN and has (for historical reasons regarding ASP) the option to use _SVN. The Directory listing should look like this

    .SVN    // Metadata for rep1
    _SVN    // Metadata for rep2
    script1 // in rep1
    script2 // in rep2
    ...
    

    Of course, you will need to hide or ignore the foreign scripts or folders from each VCS...

    Added: This only accounts for two scripts in one folder and needs one additional VCS per script beyond that, so if you even consider this route and need more repositories, rename each Metadir and use a script to rename it back before updating:

    MOVE .SVN-script1 .SVN
    svn update
    MOVE .SVN .SVN-script1
    

提交回复
热议问题