商业回购中的文件夹结构? [英] folder structure in a mercurial repo?

查看:67
本文介绍了商业回购中的文件夹结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从svn切换到了Merurial,并阅读了一些有关它的教程.
我仍然有些困惑,希望您能帮助我进行梳理.
我想知道我是否已经理解了软件仓库中的文件夹结构.
在svn仓库中,我通常有以下文件夹:

I have just switched from svn to mercurial and have read some tutorials about it.
I've still got some confusions that i hope you could help me to sort out.
I wonder if I have understood the folder structure in a mercurial repo right.
In a svn repo I usually have these folders:

svn:

branches (branches/chat, branches/new_login etc)
tags (version1.0, version2.0 etc)
sandbox
trunk

分支实际上应该是原始的/中央回购中的另一个克隆吗?
当我阅读该手册时,就好像是这样.

Should a branch actually be another clone of the original/central repo in mercurial?
it seemed like that when I read the manual.

标签只是命名的标识符,但是无论何时要创建标签,都应该克隆原始/中央存储库?

And a tag is just a named identifier, but you should clone the original/central repo whenever you want to create a tag?

沙盒怎么样?也应该是另一个克隆吗?

How about the sandbox? should that be another clone too?

因此,基本上,您只是在存储库中拥有了主干文件夹中的所有文件夹/文件?

So basically you just have in a repo all the folders/files that you would have in the trunk folder?

水银:

central repo: projects folders/files (not in any parentfolder)
tag repo: cloned from central repo at a given moment for release 
  (version1.0, version2.0 etc)
branch repo: cloned from central repo for adding features (chat, new_login etc)
sandbox repo: experimental repo (could be pushed to central repo, or just deleted)

这正确吗?

推荐答案

主要要记住的是,分支不再是像Mercurial(或Git)这样的DVCS中的目录.

The main thing to remember is that branches are no longer directories in a DVCS like Mercurial (or Git).

Mercurial提供了4个分支模型(此 SO问题中的详细信息本文):

Mercurial offers 4 branch models (details in this SO question and in this article):

  • 克隆
  • 书签
  • 命名分支
  • 匿名分支

默认情况下, ConvertExtension 使用命名分支(但您可以选择使用克隆的或标记的分支)

The ConvertExtension uses by default named branch (but you have option to use cloned or tagged branches)

尝试一些 SVN到Mercurial转换的案例,然后看看哪种方法最适合您.
将SVN存储库导入到 one Mercurial存储库(其中有命名分支)后,您仍然可以在单独的存储库中克隆所需的任何分支:

Try out some SVN to Mercurial Conversion cases, and see what works best in your case.
Once a SVN repo has been imported in one Mercurial repo (with named branches in it), you still can clone whatever branch you need in a separate repo:

hg clone -r <branch-head-rev> <repo> <new-repo>

这篇关于商业回购中的文件夹结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆