English 中文(简体)
Mercurial batch 拖拉机
原标题:Mercurial batch pull operation

我有几个供个人使用的储存库,我支持这些储存在我的主服务器上。 有几个地方,在每一个存放处进行拖拉作业需要相当一段时间。

几个储存库的汞支持批号吗? 如果是,我怎么办? 如果没有,解决办法是否比较简单?

我正在使用Windows并使用TortoiseHg(但我没有使用指挥线的问题)。

最佳回答

如果储存库是静态的,那么简单的解决办法是撰写一个批量文件,从这些储存库中提取。 但没有,汞也不直接支持。

问题回答

为什么在总服务器上不使用<条码>hook,以推向奴隶服务器? 在项目<代码>hgrc上添加:

[hooks]
changegroup = hg push -f https://hg.server2.com/TheRepo

缩略语 求助档案:

changegroup: Run after a changegroup has been added via push, pull or unbundle. ID of the first new changeset is in $HG_NODE. URL from which changes came is in $HG_URL.

因此,当一个变化小组出现在服务器上时,它将<条码>hg 推进<>/代码>对另一个服务器的改动。

我有一个最高级的存放处,在那里,我有少数批量档案和一个包含所有存放处的文本档案。

i.e. repolist.txt

Repo1
# Comment
FolderRepo2
Repo3

和批量卷宗。 bat:

REM First pull top level repository to get updated repolist etc
hg pull --update --quiet

REM Find path to server repository
FOR /F %%x IN ( hg showconfig paths.default ) DO SET HGSERVER=%%x

REM Now pull or clone each repository
FOR /F "delims=; eol=#" %%x IN (repolist.txt) DO (
    If EXIST "%%x.hg" (
        ECHO Pull %%x
        hg pull --update --quiet --repository "%%x"
    ) ELSE (
        ECHO Clone %%x
        IF NOT EXIST "%%x" MKDIR "%%x"
        hg clone --pull "%HGSERVER%\%%x" "%%x"
    )
)

我还收到一些批量文件,对所有存放地点采取行动。 (统计/入/出走等)。 它们都以下列方式为基础:

FOR /F "delims=; eol=#" %%x IN (repolist.txt) DO (
    ECHO ** %%x
    hg %1 --repository "%%x" %2 %3 %4 %5 %6
)

Pull/clone all repositories: hgrpull

所有储存地的检查状况:





相关问题
Can I clone part of a Mercurial repository?

Is it possible to clone part of a Mercurial repository? Let s say the repository is quite large, or contains multiple projects, or multiple branches. Can I clone only part of the repository? E.g. in ...

Sync files in Two Different Repos using HG

I ve got a problem when I try to sync files in two different repos. What I want to do is: I ve got 2 repos A and B, and they share some common files, suppose they lie in A/docs/common/ and B/docs/...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

git for mercurial like git-svn

Hello is there a tool for git that allow to work with mercurial repositories F.e. for svn there is a git-svn package, that allows to clone/commit/update from svn and work in a git way.. So is there ...

Useful Mercurial Hooks [closed]

What are some useful Mercurial hooks that you have come across? A few example hooks are located in the Mercurial book: acl bugzilla notify check for whitespace I personally don t find these very ...

热门标签