Index: templates/guide/index.html =================================================================== --- templates/guide/index.html +++ templates/guide/index.html @@ -10,7 +10,7 @@ @@ -267,7 +267,7 @@

The second workflow is still very easy: You're a lone developer and you want to use Mercurial to keep track of your own changes and optimize your workflow.

-

It works just like the log keeping workflow, with the difference that you go back to earlier changes at times and work onwards from there.

+

It works just like the log keeping workflow, with the difference that you go back to earlier changes at times and work onward from there.

To start a new project, you initialize a repository, add your files and commit whenever you finished a part of your work.

@@ -320,7 +320,7 @@

Note:

-identify without options gives you the short form of a unique revision ID. That ID is what Mercurial uses internally. If you tell someone about the version you updated to, you should use that ID, since the numbers can be different for other people. If you want to know the reasons behind that, please read up Mercurials [basic concepts]. When you're at the most recent revision, hg identify -n will return "-1". +identify without options gives you the short form of a unique revision ID. That ID is what Mercurial uses internally. If you tell someone about the version you updated to, you should use that ID, since the numbers can be different for other people. If you want to know the reasons behind that, please read up Mercurial's [basic concepts]. When you're at the most recent revision, hg identify -n will return "-1".

To update to the most recent revision, you can use "tip" as revision name.

@@ -655,20 +655,20 @@

The basic requirement for that is that you have to be able to see the changes of others.

-

Mercurial allows you to do that very easily by including a simple webserver from which you can pull changes just as you can pull changes from local clones.

+

Mercurial allows you to do that very easily by including a simple web server from which you can pull changes just as you can pull changes from local clones.

Note:

-There are a few other ways to share changes, though. Instead of using the builtin webserver, you can also send the changes by email or setup a shared repository, to where you push changes instead of pulling them. We'll cover one of those later. +There are a few other ways to share changes, though. Instead of using the builtin web server, you can also send the changes by email or setup a shared repository, to where you push changes instead of pulling them. We'll cover one of those later.

Workflow

-
Using the builtin webserver
+
Using the builtin web server

This is the easiest way to quickly share changes.

-

First the one who wants to share his changes creates the webserver

+

First the one who wants to share his changes creates the web server

$ hg serve
 
@@ -690,7 +690,7 @@
 
 
Sending changes by email
-

Often you won't have direct access to the repository of someone else, be it because he's behind a restrictive firewall, or because you live in different timezones. You might also want to keep your changes confidential and prefer internal email (if you want additional protection, you can also encrypt the emails, for example with GnuPG).

+

Often you won't have direct access to the repository of someone else, be it because he's behind a restrictive firewall, or because you live in different time zones. You might also want to keep your changes confidential and prefer internal email (if you want additional protection, you can also encrypt the emails, for example with GnuPG).

In that case, you can easily export your changes as patches and send them by email.

@@ -756,41 +756,23 @@

Sending changes by email might be the easiest way to reach people when you aren't yet part of the regular development team, but it creates additional workload: You have to bundle the changes, send mails and then import the bundles manually. Luckily there's an easier way which works quite well: The shared push repository.

-

Till now we transferred all changes either via email or via pull. Now we use another option: pushing. As the name suggests it's just the opposite of pulling: You push your changes into another repository.

+

Until now we transferred all changes either via email or via pull. Now we use another option: pushing. As the name suggests it's just the opposite of pulling: You push your changes into another repository.

But to make use of it, we first need something we can push to.

-

By default hg serve doesn't allow pushing, since that would be a major security hole. You can allow pushing in the server, but that's no solution when you live in different timezones, so we'll go with another approach here: Using a shared repository, either on an existing shared server or on a service like BitBucket. Doing so has a bit higher starting cost and takes a bit longer to explain, but it's well worth the effort spent.

+

By default hg serve doesn't allow pushing, since that would be a major security hole. You can allow pushing in the server, but that's no solution when you live in different time zones, so we'll go with another approach here: Using a shared repository, either on an existing shared server or on a service. Doing so can have a bit higher starting cost and takes a bit longer to explain, but it's well worth the effort spent.

If you want to use an existing shared server, you can use serve there and allow pushing. Also there are some other nice ways to allow pushing to a Mercurial repository, including simple access via SSH.

-

Otherwise you first need to setup a BitBucket Account. Just signup at BitBucket. After signing up (and login) hover your mouse over "Repositories". There click the item at the bottom of the opening dialog which say "Create new".

- -

Give it a name and a description. If you want to keep it hidden from the public, select "private"

- -
$ firefox http://bitbucket.org
-
-
- -

Now your repository is created and you see instructions for pushing to it. For that you'll use a command similar to the following (just with a different URL):

+

If you want to use an existing repository sharing service that supports Mercurial, there are a number of publicly hosted services or self-hosted options. -

$ hg push https://bitbucket.org/ArneBab/hello/
-
-
- -

(Replace the URL with the URL of your created repository. If your username is "Foo" and your repository is named "bar", the URL will be https://bitbucket.org/Foo/bar/)

- -

Mercurial will ask for your BitBucket name and password, then push your code.

- -

VoilĂ , your code is online.

- -

To see what you would get if you would push, you can use outgoing. It works with local repositories in the same way as with shared ones, so you can test it with a local one:

+

To see what you would get if you would push to a shared repository, you can use outgoing. It works with local repositories in the same way as with shared ones, so you can test it with a local one:

$ hg outgoing ../feature1
 
 
-
output of hg outgoing ../feature1 (our feature seperation repo): +
output of hg outgoing ../feature1 (our feature separation repo): comparing with ../feature1 searching for changes changeset: 6:3f549b33c7ef @@ -805,45 +787,14 @@

Note:

-You can also use SSH for pushing to BitBucket. +You can often use SSH for pushing to and pulling from publicly hosted shared repository services.
-

Now it's time to tell all your colleagues to sign up at BitBucket, too.

- -

After that you can click the "Admin" tab of your created repository and add the usernames of your colleagues on the right side under "Permission: Writers". Now they are allowed to push code to the repository.

- -

(If you chose to make the repository private, you'll need to add them to "Permission: Readers", too)

- -

If one of you now wants to publish changes, he'll simply push them to the repository, and all others get them by pulling.

- -

Publish your changes

- -
$ hg push https://bitbucket.org/ArneBab/hello/
-
-
- -

Pull others changes into your local repository

- -
$ hg pull https://bitbucket.org/ArneBab/hello/
-
-
- -

People who join you in development can also just clone this repository, as if one of you were using hg serve

- -
$ hg clone https://bitbucket.org/ArneBab/hello/ hello
-
-
- -

That local repository will automatically be configured to pull/push from/to the online repository, so new contributors can just use hg push and hg pull without an URL.

+

When you clone a remote repository to a local repository, it will automatically be configured to pull/push from/to the remote repository, so new contributors can just use hg push and hg pull without an URL.

Note:

-To make this workflow more scalable, each one of you can have his own BitBucket repository and you can simply pull from the others repositories. That way you can easily establish workflows in which certain people act as integrators and finally push checked code to a shared pull repository from which all others pull. -
- -
-

Note:

-You can also use this workflow with a shared server instead of BitBucket, either via SSH or via a shared directory. An example for an SSH URL with Mercurial is be ssh://user@example.com/path/to/repo. When using a shared directory you just push as if the repository in the shared directory were on your local drive. +You can also use this workflow with a self-hosted shared server instead of a public repository hosting service, either via SSH or via a directory that is shared between users on a private network (e.g., NFS or other network file sharing mechanisms). An example for an SSH URL with Mercurial is be ssh://user@example.com//path/to/repo. When using a shared directory you just push as if the repository in the shared directory were on your local drive. Consult the URL Paths documentation (hg help urls) for more information on specifying a path to a shared repository.

Summary

@@ -898,7 +849,7 @@
-

share your repository via the integrated webserver

+

share your repository via the integrated web server

$ hg serve &
 $ cd ..
@@ -930,12 +881,12 @@
 
 
-

Use shared repositories on BitBucket

+

Use shared repositories on a public repository sharing service

-
$ (setup bitbucket repo)
-$ hg push https://bitbucket.org/USER/REPO
-(enter name and password in the prompt)
-$ hg pull https://bitbucket.org/USER/REPO
+
$ (setup repo as documented by the service)
+$ hg push https://example.org/USER/REPO
+(depending on the service, you might be prompted for username and password, and the exact URL will be different than this example)
+$ hg pull https://example.org/USER/REPO