开发者

Unification of DVCS commands

When working on mult开发者_开发百科iple (open source) projects, multiple version controll systems start to be problematic. While they share common operations, I often make mistakes by typing hg add instead git add.

I remember seeing project some time ago that made access to different source control software in uniform way by providing basic commands commit/ci add etc. in shell. Depending on repository it would in turn call hg add or git add etc.

I've seen Amp: http://amp.carboni.ca/ (which seems to be down ATM) any other scripts like that?


I think unifications of two (in this case completely different) version control systems is not a sensible thing to attempt. While there are certain commonalities, the differences far outweigh the commonalities. More specifically, while you could map certain commands from one system to a similar command in another system, there will still be semantic differences because Mercurial and Git have completely different internal models. Just consider how branching is represented or git's staging area.

Instead of trying to unify both systems at the "user" level, I think it is much more desirable to stick with one version control system and, if required, backport your changes/history to another system using a bridge (similar to git-svn).

Typing hg add vs. git add is not something that can get really dangerous if your current directory is not a repository managed in both systems, so you'll get a meaningful error message.


Not that I know of.
The two repos for amp (on GitHub, and on bitbucket) are not exactly bursting right now.
And the comments about the project were not all enthusiastic.

So right now, common aliases/commands (able to recognized their context - hg or git repo - and generate the right command) are your best bet.


I think this was one of the goals of anyvcs, but I don't know how far along it is.


There are also Push Me Pull You and Qct project, both are multi-DVCS GUIs.

I have not checked their status, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜