Process for Managing Revisions
Tycoon uses a revision management process based on Mercurial (hg). The basic idea is that there is a central hg repository on tycoon-dev.hpl.hp.com and each developer has one or more local copies. When developers make local changes, they commit the changes to their local repository. When they want to update their local repositories, they pull changes from the central repository. When they want to share their changes with other developers, they push their local changes to the central repository.
Making Local Changes
Mercurial can detect most local changes automatically, so developers do not have to explicitly notify it that a file has changed. The exceptions are:
- Adding a new file. Do the following:
$ hg add file_name
- Deleting a file. Do the following:
$ hg remove file_name
- Renaming or moving a file. Do the following:
$ hg rename old_file_name new_file_name
- Copying a file. Do the following:
$ hg copy old_file_name new_file_name
Committing Local Changes
Local commits are not visible to other developers, so they should be made as frequently as the developer requires. Here is an example of a local commit:
$ hg commit -m "Comment describing the changes that I made."
Updating a Local Repository
Developers periodically need to pull changes from the central repository to their local one. This process is simple if there are no conflicts and complicated if there are. First, pull the remote changes into the local repository (this will not update the working copy):
$ hg pull
If there were no local changes, then finish the process by updating the working copy with the remote changes:
$ hg update
Otherwise, if there were local changes, then merge them with the remote changes:
$ hg merge
There may be conflicts, which you must resolve manually. Once the conflicts are resolved or if there were none, commit the new merged version to the local repository:
$ hg commit -m "Merge"
Pushing Local Changes to the Central Repository
To share local changes with other developers, push local changes to the central repository. This requires authorization to modify the central repository and that the the local repository is fully updated and merged as described above. To push changes:
$ hg push default
