Strategies for push/merge problem?

Doug Philips dgou at mac.com
Mon Jul 14 10:45:08 CDT 2008


On or about 2008-07-14 10:24:13, Roman Kennke inquired:
> As soon as there are more than 1 developers working on the code, you basically have to always do the push (fail) & pull & merge & commit & push (again) dance, which is a major pain.

Why not simplify it to:
% hg fetch
% hg push

Of course that is assuming a very CVS point of view that you don't need to bother to check/test the result of the fetch. Perhaps if the person doing this is getting emails from the central repo, they can know that things won't break...

[Description of a "one liner quick/emergency fix and the problems doing that with a particular work-flow" elided]
>It was a mess. And all this for a one-liner. I think my coworker was very annoyed and this really doesn't help when trying to adopt mercurial. Most importantly, it sounds very strange when I tell people that HG is made for scalability, but with this kind of problem it really doesn't scale at all.

If you try to shoehorn Mercurial into CVS's shoes, yes, it will be painful at time.

>- Try to always have a clean workspace without uncommitted changes (impossible I think, but you can try).

Clones are easy. Why not have a few -clean- spares sitting around, maybe: "Quick Fixes" and "clean upstream" and so forth.

> - Use clones for each separate work. This is kind of difficult, take the one-liner as example. Cloning a whole repo takes  ~5 minutes in our case (lots of history). So people tend to quickly hack it in an already cloned repository and run into the above situation.

Are you saying that it takes 5 minutes to do a local clone? Or are you making a brand new clone over the network from your server. Sounds like the team hasn't yet internalized that all clones are equal, so you can keep a clean upstream local clone, pulling to which won't take very long, and cloning from locally shouldn't take very long either.

> Also: I know that the centralized approach is not the most HG-ish way to work with HG. But I also think that a lot of people are using it that way, and it shouldn't be so difficult to do. One nice thing about HG is its flexibility, but this needs to be easier.

You can make it as hard as you want. If it takes 5 minutes to do a local clone, it sounds like a performance bug (or a very huge repo)

> Also: I still think that having a server-side automatic merge feature (as discussed in an earlier thread) would be VERY helpful, maybe as an additional command line switch for push, or even as an extension.

Or a hook. But I think that might just be a sign of not thinking fully in the "Mercurial way" yet. It is hard to think outside the CVS box when you've been doing it for a long time. :)

--Doug



More information about the Mercurial mailing list