Is there a plan to suport hg clone -r ?

Dan Christensen jdc at uwo.ca
Thu Sep 1 11:24:40 CDT 2005


Ling, Xiaofeng <xiaofeng.ling at intel.com> writes:

> a more enhanced feature maybe clone from A revision and to B revision.
> So we can save the time to clone from remote.

I agree that this would be nice.  Imagine that in a year, kernel
development switches to hg.  A year later, pulling from an hg
repository is the only cool way to send patches around.  Ten years
later, someone who is not a regular developer wants to submit a patch,
and they want to be cool.  Do they have to clone the entire 2 terabyte
kernel repo (with the advent of quantum computers, development speed
has exponentially increased) in order to provide a pullable source
for their patch?  :-)

Thomas Arendsen Hein <thomas at intevation.de> writes:

> * Ling, Xiaofeng <xiaofeng.ling at intel.com> [20050901 08:50]:
>
>> My thoughs is if there are 10 changesets, 0-9.
>> If we want to create a repository only include 7,8,9.
>> then we need to merge 0-7 to one changeset, and add 8,9.
>> so in the new repository, 0 is a changeset include all the change of 0-7, 
>> 1,2 are the original 8.9.
>> the decription before 7 will lost, but 8,9 are keep.
>> to do this manually:
>> ...
>
> Yes, but now look at the changeset hashes of both tips.

An alternate approach would be to provide a way to mark some
changesets as "hidden", so "hg log" wouldn't show them by default.
(This doesn't address saving download time, but it could be used to
hide uninteresting things from view.)

% hg hide -r 0-6

Along these lines, I've wondered whether it would be reasonable to
allow changesets to be annotated after the fact.  This would address
the frequent question about being able to edit commit messages, and
would allow someone to keep local comments about the commits,
e.g. which versions were stable.  And if security bugs are found in a
version, that information could be added as a note, so people browsing
the repository don't decide to use that version.

% hg commit -m 'Made fixes to function foo().'
% hg note -r tip -m 'Whoops, I meant to say function bar().'
% hg log -r tip
changeset:   abcdeabcdeabcde
tag:         tip
user:        jdc at uwo.ca
date:        Thur Sep 01 11:50:00 2005 -0400
summary:     Made fixes to function foo().
note:        Whoops, I meant to say function bar().

The hidden flag and the notes could be stored in .hgtags, or in a new
file like .hgnotes.

abcdeabcdeabcde note Whoops, I meant to say function bar().
badbadbadbadbad hide
feedfeedfeeeeed tag 1.2 

Dan


More information about the Mercurial mailing list