server less collaborative project
Sciss
contact at sciss.de
Fri Apr 11 15:26:29 UTC 2008
hi,
i'm new to mercurial. i have a mental problem understanding the
architecture... in our case we want to use mercurial for a
collaborative project between four persons. we do not have a server
that can act as a central mercurial repository, actually that is why
i began to read about mercurial, as i'm already pretty fluent in SVN.
but although it is stated everywhere that mercurial is
"decentralized", in practically all tutorials and wikis people seem
to assume that there _is_ a server that hosts the repository.
well, i tried to set up the scenario without the server, but found it
very tough and unergonomic. here is my approach:
user A (me) creates the initial repository:
A$ mkdir mercurial-repo
A$ cd mercurial-repo
A$ hg init
A$ hg clone . ../mercurial-work
A$ cd ../mercurial-work
A$ hg pull
A$ hg up
... ok, i will place some file here
A$ cp someOtherPlaces/someBasicInitialFile .
A$ hg addremove
A$ hg commit
A$ hg bundle --base null ../initialFullRepo.hg
A$ hg push // otherwise the repo is out of sync
A$ cd ../mercurial-repo
A$ hg up // otherwise the repo won't accept further unbundles...?
----> sending initialFullRepo.hg to my mates via email. So for
example person B will receive that file and do on their own computer:
B$ mkdir mercurial-repo
B$ cd mercurial-repo
B$ hg init
B$ hg unbundle ../initialFullRepo.hg
B$ hg up
B$ hg clone . ../mercurial-work
B$ cd ../mercurial-work
B$ hg pull
B$ hg up
now B works on some files...
B$ vim someBasicInitialFile
B$ hg commit
B$ hg bundle ../changes2.hg // must be before push, otherwise it
fails with an error?!
B$ hg push // otherwise the repo is out of sync
B$ cd ../mercurial-repo
B$ hg up // otherwise the repo won't accept further unbundles...?
now B sends with file changes2.hg to the mailing list. Now i (A) will
update like this:
A$ cd mercurial-repo
A$ hg unbundle ../changes2.hg
A$ hg up
A$ cd ../mercurial-work
A$ hg pull
A$ hg up
i find this very complicated and error prone -- six lines of code to
update my copy, five lines of code to commit something, and when you
forget one of them, you have to fiddle around a lot). i don't
understand why i am forced to
- have a separate working dir
- unbundle into the repo folder (instead of the working dir)
- needing to call "hg up" after the unbundle in the repo dir
- needing to bundle before calling "push" in the working dir
isn't there an easier approach for dealing with our situation? Maybe
i'm missing something? or should i just write two shell scripts that
collapse all the above commands into a "easyUpdate.sh" and
"easyCommit.sh" that make the thing work more like SVN?
thanks for help! ciao, -sciss-
More information about the Mercurial
mailing list