2014-01-26 53 views
0

无论如何,无论是使用SVN还是git-svn,克隆我拥有只读访问权限的版本库修订子集?例如,我想拥有一个目前处于修订版200000的巨大存储库的脱机缓存,但不希望在190000之前需要任何修订。svnsync可以处理从1-200000处检查每个修订版,但可能会成为一个多天的过程,占用10个GB的空间。是可以将svn checkout/export修订版190000以及190000-200000的每个修订版的修改组合在一起吗?SVN部分镜像

svnsync似乎没有任何选项来限制的修订版集的拉动,当我尝试使用-r 190000:200000选项与git-svn,它似乎只能做第二部分,从每个版本拉动变化作为提交,但不是在版本190000的存储库的状态。我也尝试创建一个新的git回购,然后svn export <remote_repo_URL>@190000,其次是git svn fetch -r 190000:200000 <remote_repo_url>,但git-svn拒绝在其尚未创建的git回购库上工作。

奖金:我不预见不必回去进一步的修订,但在需要意外发生,是有办法还增加早期版本(即:在给定的例子190000之前版本)?

回答

0

不确定混帐,但善变的svn有一个关键字--startrev所以你可以尝试:

hg clone --startrev 190000 svn+网址

这是值得生成作者名单,并提供与-A。

你也可以克隆一个特定的分支。

hg -v help clone

汞柱克隆[选项] ...源的结果[地址]

使现有资源库的副本

Create a copy of an existing repository in a new directory. 

If no destination directory name is specified, it defaults to the basename 
of the source. 

The location of the source is added to the new repository's ".hg/hgrc" 
file, as the default to be used for future pulls. 

Only local paths and "ssh://" URLs are supported as destinations. For 
"ssh://" destinations, no working directory or ".hg/hgrc" will be created 
on the remote side. 

To pull only a subset of changesets, specify one or more revisions 
identifiers with -r/--rev or branches with -b/--branch. The resulting 
clone will contain only the specified changesets and their ancestors. 
These options (or 'clone src#rev dest') imply --pull, even for local 
source repositories. Note that specifying a tag will include the tagged 
changeset but not the changeset containing the tag. 

If the source repository has a bookmark called '@' set, that revision will 
be checked out in the new repository by default. 

To check out a particular version, use -u/--update, or -U/--noupdate to 
create a clone with no working directory. 

For efficiency, hardlinks are used for cloning whenever the source and 
destination are on the same filesystem (note this applies only to the 
repository data, not to the working directory). Some filesystems, such as 
AFS, implement hardlinking incorrectly, but do not report errors. In these 
cases, use the --pull option to avoid hardlinking. 

In some cases, you can clone repositories and the working directory using 
full hardlinks with 

    $ cp -al REPO REPOCLONE 

This is the fastest way to clone, but it is not always safe. The operation 
is not atomic (making sure REPO is not modified during the operation is up 
to you) and you have to make sure your editor breaks hardlinks (Emacs and 
most Linux Kernel tools do so). Also, this is not compatible with certain 
extensions that place their metadata under the .hg directory, such as mq. 

Mercurial will update the working directory to the first applicable 
revision from this list: 

a) null if -U or the source repository has no changesets 
b) if -u . and the source repository is local, the first parent of the 
    source repository's working directory 
c) the changeset specified with -u (if a branch name, this means the 
    latest head of that branch) 
d) the changeset specified with -r 
e) the tipmost head specified with -b 
f) the tipmost head specified with the url#branch source syntax 
g) the revision marked with the '@' bookmark, if present 
h) the tipmost head of the default branch 
i) tip 

Examples: 

- clone a remote repository to a new directory named hg/: 

    hg clone http://selenic.com/hg 

- create a lightweight local clone: 

    hg clone project/ project-feature/ 

- clone from an absolute path on an ssh server (note double-slash): 

    hg clone ssh://[email protected]//home/projects/alpha/ 

- do a high-speed clone over a LAN while checking out a specified version: 

    hg clone --uncompressed http://server/repo -u 1.5 

- create a repository without changesets after a particular revision: 

    hg clone -r 04e544 experimental/ good/ 

- clone (and track) a particular named branch: 

    hg clone http://selenic.com/hg#stable 

See "hg help urls" for details on specifying URLs. 

Returns 0 on success. 

Subversion sources can be used for clone. See 'hg help hgsubversion' for 
more on the conversion process. 

选项:

-U - 更新克隆将包含一个空的工作副本 (只有一个 存储库)-u --updaterev REV修订版,标记或分支以检出-r --rev REV [+]包括指定的变更集 -b --branch BRANCH [+]仅克隆指定的 分支 --pull使用pull协议复制元数据 --uncompressed使用未压缩传输(通过LAN快速传输)-e --ssh CMD指定要使用的ssh命令 --remotecmd CMD指定hg命令在远程端运行 --insecure不验证服务器证书(忽略网页。cacerts中 配置) --stupid使用慢,但更兼容,协议的路径 颠覆-T --tagpaths VALUE列表来搜索标签的Subversion 库 --branchdir VALUE路径来搜索库颠覆分支 --infix VALUE路径相对于主干,分支标记目录导入-A --authors VALUE文件映射Subversion用户名到 Mercurial作者 - 文件映射包含重映射规则的VALUE文件Subversion 存储路径 - 布局VALUE导入标准布局还是单个目录?可以是 标准,单一或自动。 (默认值:自动) --branchmap包含分支转换规则的VALUE文件 --tagmap包含重命名标签规则的VALUE文件 --startrev VALUE将指定的一个 开头的Subversion版本转换为整数版本或HEAD; HEAD 导致只有最新版本被拉

[+]标记选项可以指定多次

全局选项:

-R --repository REPO覆盖 束的仓库根目录或名称 文件 --cwd DIR更改工作目录-y --noninteractive不提示,自动选择第一个选项 所有提示-q --quiet suppress output -v --verbose启用附加输出 --config CONFIG [+ ]设置/覆盖c onfig选项(使用'section.name = value') --debug启用调试输出 --debugger启动调试器 --encoding ENCODE设置charset编码(默认:UTF-8) --encodingmode MODE设置charset编码模式(默认值:严格) --traceback总是在异常处打印回溯 - 时间命令需要多长时间 --profile打印命令执行配置文件 --version输出版本信息并退出-h --help显示帮助并退出 - 隐藏考虑隐藏的变更集 - 颜色TYPE何时着色(布尔型,始终,自动或从不) (默认:自动)

[+]标记选项可以指定多次

0

您可以尝试svnrdump:为svnrdump dump它接受修订(或修订在通常的Subversion的格式范围),在这种情况下只转储指定范围