Mercurial(和,我猜Git)与Dropbox:任何缺点? [英] Mercurial (and, I guess Git) with Dropbox: any drawbacks?

查看:89
本文介绍了Mercurial(和,我猜Git)与Dropbox:任何缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于个人项目的Mercurial存储库,并且我已经将主存储库存储在我的Dropbox中几周(现在 this line ;我明白这也是>可能与Git )。

这个想法是它既可以用作多台机器的工作方式,也可以用作远程备份。我克隆存储库并在非Dropbox副本上工作,并且只在一段时间内推送更新,就像我想的那样,我会用Bitbucket。



与使用专用托管(在Mercurial情况下使用BitBucket)相比,您是否可以想到这个想法的任何缺点?我知道Bitbucket为单个用户提供了免费账户,这非常棒,但它们仅限于150M,这不是一个巨大的。

特别是,Dropbox的同步过程可能会损坏存储库吗?我必须在主存储库上运行一次 hg recover ,但它可能不相关(并且无论如何它都很快恢复)。有没有人有这个想法不好的经历?有没有人有更好的经验,可以减轻我的担忧?有没有人有基于对这些东西内部的更好的理解的意见?



编辑:我补充说明了一些问题。它们在斜体中。

解决方案

由于上述原因,我会提出反对意见,但更加强烈地声明。 mercurial和git都有自己的协议来移动仓库之间的变更集。这些协议已针对以下方面进行了优化/构建:


  • 效率

  • 一致性(永远不能从repo处于半更新状态)

  • 钩子/触发器 - 在包括品质(不允许使用标签等)的过滤器上执行推/拉操作


当您只让一个目录同步处理保持.hg(或.git)目录同步时,那么在该同步过程中,您将获得一个位于不一致的状态,并不知道它。



另外,hg和git在它们的磁盘状态内有本地和远程的区别。他们知道要分享什么信息(例如:提交的变更集)和什么不能(例如:当前,本地工作目录父母版本)。

在其他答案中,人们说你可能会好起来的或者我从来没有遇到过问题,这很可能是真实的,但这并不是真实的,并且版本控制不是一个可能。为您的源代码管理系统使用适当,更好,更安全,更高效,更全面的同步协议。


I have a Mercurial repository for a personal project, and I have been storing the master repository in my Dropbox for a few weeks now (something along this line; and I understand it's also possible with git).

The idea is that it serves both as a way to work with multiple machines and as a remote backup. I clone the repository and work on the non-Dropbox copy, and only push updates once in a while, the same way I would, I suppose, work with Bitbucket.

Can you think of any drawbacks to this idea, compared to using dedicating hosting (BitBucket in the case of Mercurial)? I know Bitbucket has free accounts for single users, which is great, but they are limited to 150M, which isn't a huge.

In particular, is it possible that Dropbox's sync process would corrupt the repository? I had to run hg recover once on the master repository, but it might be unrelated (and anyway it happily recovered). Does anyone have a bad experience with the idea? Does anyone have a longer good experience and can alleviate my worries? Does anyone have an opinion based on better understanding of the internals of these things?

edit: I added some clarifications to the questions. They are in italics.

解决方案

I'd advise against it for the reasons stated above, but more strenuously stated. Both mercurial and git have their own protocols for moving changesets between repositories. These protocols are optimized/built for:

  • efficiency
  • consistency (never can you pull from a repo in a half-updated state)
  • hooks/triggers -- doing things on push/pull including quality (no tabs allowed, etc.) filters

When you just let a directory sync handle the keeping of the .hg (or .git) directories in sync then during that sync you've got a remote store that's in an inconsistent state and doesn't know it.

Additionally both hg and git have a separation of what's local-only and what's remote-okay within their disk state. They know what info to share (example: commited changesets) and what not to (example: current, local working directory parent revision).

In other answers folks are saying "you'll probably be fine" or "I've never had a problem" and that's likely true, but it's not guaranteed true, and revision control isn't a place to play the odds. Use the proper, better, safer, more efficient, more full featured synchronization protocol for your source control system.

这篇关于Mercurial(和,我猜Git)与Dropbox:任何缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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