1

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...

designer-trying-coding
  • 5,994
  • 17
  • 70
  • 99
  • What are you using your server at bluehost for? Are you using it as a repository for your code? Are you using it to run your code for visitors to your website? Or both? – Wesley Feb 19 '10 at 09:11
  • bluehost is the main host for my project. visitors see project online from bluehost. I also wanted to install mercurial to bluehost, but i could not manage it. so I dont have any rep at bluehost :/ – designer-trying-coding Feb 19 '10 at 09:19

3 Answers3

5

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
  • 10,652
  • 4
  • 37
  • 52
  • 3
    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 Feb 19 '10 at 10:20
  • 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!! – designer-trying-coding Feb 19 '10 at 10:30
  • the only reason i use Mercurial is having back-up and endless undo possibility in case of I mess with the code. – designer-trying-coding Feb 19 '10 at 10:32
  • 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 Feb 19 '10 at 18:43
  • My main reason for using a hosted Repo is that I can code from any computer, anywhere. I have 4 PCs I use regularly and they all have VS (and Notepad++) on them. When the idea strikes, I can work on my code. Also - backup! – CAD bloke Dec 16 '10 at 23:25
3

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

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
CAD bloke
  • 8,578
  • 7
  • 65
  • 114
2

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
  • 842
  • 1
  • 10
  • 23
  • 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. – designer-trying-coding Feb 19 '10 at 10:26