Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2005-08-26 01:23:07
Size: 5480
Editor: waste
Comment:
Revision 6 as of 2005-08-26 07:50:52
Size: 5375
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
   * * {anchorlink: convert Converting a CVS repository}
   * * {anchorlink: rev Revisions}
   * * {anchorlink: disconnect Disconnected operation}
   * * {anchorlink: tag Modules, branching and tagging}
   * * {anchorlink: collab Collaborating with other people}
   * {anchorlink: server Running a server}
   * * {anchorlink: watch Watching files}
   * * {anchorlink: binary Binary files}
   * * {anchorlink: keyword Keywords expansion}
 * [#convert:Converting a CVS repository]
 * [#rev:Revisions]
 * [#disconnect:disconnect Disconnected operation]
 * [#tag:Modules, branching and tagging]
 * [#collab:Collaborating with other people]
   * [#server:Running a server]
 * [#watch:Watching files]
 * [#binary:Binary files]
 * [#keyword:Keywords expansion]
Line 15: Line 15:
== {anchor: convert} Converting a CVS repository == [[Anchor(convert)]]
==
Converting a CVS repository ==
Line 19: Line 20:
== {anchor: rev} Revisions == [[Anchor(rev)]]
==
Revisions ==
Line 23: Line 25:
== {anchor: disconnect} Disconnected operation == [[Anchor(disconnect)]]
==
Disconnected operation ==
Line 27: Line 30:
== {anchor: tag} Modules, branching and tagging == [[Anchor(tag)]]
==
Modules, branching and tagging ==
Line 50: Line 54:
== {anchor: collab} Collaborating with other people == [[Anchor(collab)]]
==
Collaborating with other people ==
Line 56: Line 61:
   * * ["Export"] one or more ["ChangeSet"]s and  * ["Export"] one or more ["ChangeSet"]s and
Line 60: Line 65:
   * * ["Push"] (or rsync) the ["ChangeSet"]s into a ["Repository"] from which other people can ["Pull"] them
   * * ["Clone"] a copy of the ["Repository"] onto a CD-ROM and hand it to someone else
 * ["Push"] (or rsync) the ["ChangeSet"]s into a ["Repository"] from which other people can ["Pull"] them
 * ["Clone"] a copy of the ["Repository"] onto a CD-ROM and hand it to someone else
Line 63: Line 68:
== {anchor: server} Running a server == [[Anchor(server)]]
==
Running a server ==
Line 77: Line 83:
== {anchor: watch} Watching files == [[Anchor(watch)]]
==
Watching files ==
Line 81: Line 88:
== {anchor: binary} Binary files == [[Anchor(binary)]]
==
Binary files ==
Line 85: Line 93:
== {anchor: keyword} Keywords expansion == [[Anchor(keyword)]]
==
Keywords expansion ==

Mercurial for CVS users

(The structure of this topic is borrowed from the [http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ap-a Subversion Book]. Thanks, guys!)

  • [#convert:Converting a CVS repository]
  • [#rev:Revisions]
  • [#disconnect:disconnect Disconnected operation]
  • [#tag:Modules, branching and tagging]
  • [#collab:Collaborating with other people]
    • [#server:Running a server]
  • [#watch:Watching files]
  • [#binary:Binary files]
  • [#keyword:Keywords expansion]

Anchor(convert)

1. Converting a CVS repository

For details of how to convert a ["CVS"] repository to a ["Mercurial"] ["Repository"], see ConvertingRepositories.

Anchor(rev)

2. Revisions

In CVS, revision numbers describe the history of individual files. In ["Mercurial"], ["RevisionNumber"]s describe the history of an entire ["Repository"]. Furthermore, in ["Mercurial"], a RevisionNumber islocal to a repository. To uniquely identify a ChangeSet, use a ChangeSetID.

Anchor(disconnect)

3. Disconnected operation

["CVS"] requires that you have access to the central repository in order to perform any operation other than a simple text edit. By contrast, a ["Repository"] in ["Mercurial"] is a self-contained entity that contains the complete history of all files in the repository. You do not need to be connected to any server in order to perform any operation. You can even share your changes with others using USB memory sticks.

Anchor(tag)

4. Modules, branching and tagging

["CVS"] has a very confused and confusing notion of modules, branching and tagging. I won't even attempt to describe these ideas. Pretend you never heard about any of it.

4.1. Branches

In ["Mercurial"], a branch is a repository. Nothing more or less. A repository is a branch. Repeat the soothing mantra.

Theverb "to branch" simply means "to make a clone of a repository at a particular revision".

If every repository is a branch, how do you keep track of which one is which? That's simply a matter of convention. ["Mercurial"] has no idea which ["Repository"] is the "trunk", or which is a "branch"; it's all a matter of how you use the repositories. See WorkingPractices and CvsLikePractice for some suggestions.

4.2. Tags

A Mercurial ["Tag"] is just a symbolic name for a ChangeSet. See ["Tag"] for a little more discussion.

4.3. Modules

In ["CVS"], a module is a collection of directories that you can check out under one name.

The equivalent Mercurial concept is the ["Repository"], but there's no notion in Mercurial of "bundling" repositories together in the way that CVS bundles modules under the CVSROOT directory.

Anchor(collab)

5. Collaborating with other people

With CVS, the standard way to share changes with other people is simply to check them in. Some projects have a convention of posting UnifiedDiff patches to a mailing listbefore making a checkin.

In ["Mercurial"], collaboration is much more flexible. You can share changes in any number of ways, including (but not limited to) the following:

  • ["Export"] one or more ["ChangeSet"]s and

    • put the exported ["PatchFile"]s on a server for someone to download

    • email the ["PatchFile"]s to a maintainer or mailing list

    • copy the ["PatchFile"]s onto a memory stick and give them to someone else

  • ["Push"] (or rsync) the ["ChangeSet"]s into a ["Repository"] from which other people can ["Pull"] them

  • ["Clone"] a copy of the ["Repository"] onto a CD-ROM and hand it to someone else

Anchor(server)

6. Running a server

With ["CVS"], the common way to manage a server is to provide anonymous access using the pserver command, and authenticated access over ssh.

6.1. Anonymous access

In ["Mercurial"], you can provide anonymous access using HTTP. You can do this either with a CGI script (see the hgweb.cgi script in the distribution) or by running a dedicated server (using the hg serve command).

Mercurial's HTTP server provides no access controls, so anyone who can connect to your web server can clone any repositories you publish, unless you take steps to secure them in some way.

6.2. Authenticated access

Mercurial allows authenticated access to repositories, by tunnelling using the ssh command. To perform an operation over ssh, compatible versions of Mercurial must be installed on both the local and remote sides, and available through your shell's search path on the remote side.

Anchor(watch)

7. Watching files

["CVS"] lets you "put a watch" on files, which requires that other developers run cvs edit before they can edit a file. ["Mercurial"] has no corresponding concept, since a Mercurial ["Repository"] is a single-user entity that is not "connected" to any other.

Anchor(binary)

8. Binary files

The delta algorithm used by ["Mercurial"] handles text and binary files equally well, this meaning that only the differences between revisions are stored. On the other hand, ["CVS"] was designed to work with ASCII text, and stores a full copy of each binary file version, with the consequent waste of space.

Anchor(keyword)

9. Keywords expansion

["CVS"] expands keywords such as $Revision: 1.12 $ by adding information from it.

CvsConcepts (last edited 2012-11-08 16:59:09 by abuehl)