ediger@madriska.com>
date: Fri Oct 26 13:10:00 2007 -0500
summary: Merged
Often, cloning a repository in this way can be difficult. Rails applications can accumulate
a good deal of configuration files (in particular, database.yml) that are not
version controlled, and so must be recreated on each clone. There are a few ways
around this:
??? hg clone is basically an atomic recursive copy when working between two repositories
on the same filesystem. So, if you can be sure that the source repository will not
change during the copy, the following two commands are roughly equivalent:
$ hg clone trunk trunk-newcolors
$ cp -R trunk trunk-newcolors
Mercurial Revision Numbers
Note the changeset identifiers in this example; in particular, the changeset we pulled
from trunk-newcolors into trunk has the same hexadecimal ID in both repositories
(18bb8b07ec40), but a different numeric ID (1 versus 2).
Because changesets can be copied somewhat arbitrarily between repositories, their
numeric IDs (which simply reflect the order in which they were added to the repository)
will differ. But the hex IDs, which are SHA-1 hashes of the content of the changeset
and its history, remain the same.
Mercurial shows both identifiers, and either of them can be used to identify a revision,
as can tags (hg update 2, hg update 18bb8b07ec40, and hg update tip are all the same thing
in the preceding example).
Pages:
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464