Mercurial (and, I guess Git) with Dropbox: any drawbacks?

前端 未结 10 2081
谎友^
谎友^ 2020-11-30 00:18

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 under

10条回答
  •  青春惊慌失措
    2020-11-30 00:43

    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.

提交回复
热议问题