views:

40

answers:

1

Hi.

I want to make the same (physically same) Mercurial repository accessible via ssh and https (hgwebdir). Are there transaction problems when ssh users and http users push at the same time?

+5  A: 

No, Mercurial is set up to handle this, and will (write) lock the repo once a transaction begins. The second user will just have to wait a little bit before their push goes through. Simultaneous requests can happen if it is served just by one or the other, so setting up both won't cause any additional problems.

tghw
You need a lock when you write data to the repository and there can be only one writer at a time. Readers need no locks -- there can be an unlimited number of simultaneous readers, even concurrently with a single writer. (Requiring a lock for reads would be very awkward since you often need to clone repositories where you don't have write access.)
Martin Geisler
@Martin Added a mention. Thanks for pointing that out.
tghw