Correct way to specify multiple revisions in hg clone
Greg Ward
greg at gerg.ca
Sat Feb 18 22:13:47 UTC 2012
On 17 February 2012, Snidely said:
> On Feb 17, 10:23 pm, Snidely <snidely.... at gmail.com> wrote:
> > I'm trying to use hg 2.1 to clone portions of a repository. The
> > revisions I'm interested in are not neatly in a separate branch, and
> > between revision r1 (where I added the first of the files I'm trying
> > to isolate) and r2 (default's tip), there are some revisions that I
> > don't want in the clone.
> >
> > hg help clone has "-r REV [+]" which suggests that I can specify
> > multiple revs, but the various ways I've tried have either given
> > illegal argument or unknown revision.
>
> I was able to use hg convert --filemap to take care of this. It took
> me a couple of tries because I didn't read the wikipage carefully
> enough, but nothing too painful.
Hangonasec. Are you trying to clone or convert here? I.e. do you want
to preserve the exact history up to a particular changeset (or
changesets), or do you want to modify history to drop particular files
or particular changesets?
Sounds to me like you do want a convert (modify history), rather than
a clone (preserve history), so you found the right answer in the end.
But be aware that convert does not yield a clone; it yields a new
repository with different history and different changeset IDs.
Greg
--
Greg Ward http://www.gerg.ca/
"We play *both* kinds of music here -- country *and* western!"
More information about the Mercurial
mailing list