[PATCH] Fix -r option in 'hg help clone'

timeless timeless at gmail.com
Thu Nov 19 05:44:39 CST 2009


On Thu, Nov 19, 2009 at 11:57 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> We do have in the main part of clone's help text:
>
> '''
>    A set of changesets (tags, or branch names) to pull may be specified by
>    listing each changeset (tag, or branch name) with -r/--rev. If -r/--rev is
>    used, the cloned repository will contain only a subset of the changesets
>    of the source repository. Only the set of changesets defined by all

Ouch. I think now might be a time to flag "all" as problematic, is
this a union or intersection? (we mean intersection, but as a reader
I'd at least half expect it to mean intersection)

>    -r/--rev options (including all their ancestors) will be pulled into the
>    destination repository. No subsequent changesets (including subsequent
>    tags) will be present in the destination.

And this is problematic for the case where i have:

hg init; touch 0; hg add; hg commit -m 0; hg up -r null; touch 1; hg
add; hg commit -m 1; touch 2; hg add; hg commit -m 2;
hg clone -r 1 -r 2 . x

"2" is a subsequent changeset of "1" which was specified as one of the
-r's for my clone :)

> But it's hard to find a text for the --rev option that fits into such
> a small space and is still correct.

> Maybe:
> +           _('exclusive revision, tag or branch to pull')),

exclusive is problematic.

> or without 'exclusive':

> +           _('revision, tag or branch to pull')),

'include changesets up to this revision, tag, or branch' ?


More information about the Mercurial-devel mailing list