views:

234

answers:

3

Hi friends,

I'm a new Mercurial user, I keep reps offline, and work offline. when everything is done at local, I do upload to server. is this right way?

I dont have any rep at server, because of i couldnot setup mercurial to server [bluehost]. so I have nothing to do with push or pull. am I wrong?

regards...

+3  A: 

A quick note on Mercurial (and distributed revision control systems in general)

If you are the only developer working on your project, and you have no desire to share your development code, you have no need to upload your code to a "Mercurial server". Everything that Mercurial needs to properly track revisions is stored locally.

If you ever want to share your code, it's very easy to take your existing local Mercurial repository and share it using a service like Bitbucket. Once you do that, your entire revision history will be available to anyone you allow to access the repository on the service.


Now let me tackle your question part by part.

Using Mercurial as a local revision-control system: Excellent. This is what very many people do. It's great to have all your code in a revision-control system, even if you're the only developer using it.

Taking production code and copying it to your production system: Correct. If you release infrequently, you can even tag that revision in Mercurial so that you can easily refer back to it. Copy only the code, and not the .hg directory.

Keeping a copy of your development code on your production system: Don't do this. If you really like having your code hosted elsewhere, you can investigate solutions like Bitbucket. Again, this is unnecessary if you're the only one developing this project at this time.

Wesley
Using bitbucket is not unneccessary if youre the only developer: it is a sort of backup! Thats how I use for my one-man projects.
sandos
thanks for cool detailed reply! I'm the only one developer at the project. so i have nothing to do with pull push. one more question. I have an another big project, but I cant run that at localhost. I work directly on bluehost, so I have no chance to keep rep local :( because all files, source is at bluehost. so in such case, I guess I have to install Mercurial to bluehost somehow, is it right? I could not manage to install Mercurial to bluehost and Bluehost doesnt give support. what do you advise for this case? appreciate!!
artmania
the only reason i use Mercurial is having back-up and endless undo possibility in case of I mess with the code.
artmania
Editing the any code directly on a production server seems quite dangerous. However, if you must do that, it's probably not a bad idea to manually copy your code to your local machine's Mercurial repository.
Wesley
+1  A: 

You are basically right, if you only have one repository you will never need to use push or pull.

I would recommend bitbucket for you, its free for small amounts of code/repositories.

sandos
yes, I'm the only one developer working on this project. So I don't need to use any push pull action. thanks! I just do my coding at localhost and than upload to bluehost.
artmania
+1  A: 

If you're a solo try Fogbugz / Kiln. It's private and it's free for 1 or 2 people and they use Mecurial. See http://www.kilnhg.com for details. I'm using it and I like it.

CAD bloke
hmm, looks interesting, basicly is it a hosting for Mercurial like Bitbucket, etc. ?
artmania
Code hosted at Kiln doesn't have to be open source. Actually, at present there isn't a way to offer public access to the code. See http://kiln.stackexchange.com/questions/89/allow-public-cloning-of-repository/
CAD bloke