support #(branch|tag|changeset) urls

Create issue
Issue #75 resolved
Martijn Pieters created an issue

Currently specifying a branch, tag or revision to use in the url fails. See hg help urls for documentation on how identifiers after a {{{#}}} are interpreted.

For example, specifying {{{hg clone svn+}}} should clone the given subversion repository, then update to the head of the given branch.

Arguably, the #changeset identifier is somewhat difficult to support, as no local revision identifiers exist yet, but perhaps subversion revision numbers can be supported instead?

Comments (3)

  1. Augie Fackler repo owner

    +1 to implementing this. It's relatively low on my priority list, but I'll gladly take patches that include tests for it.

  2. Martijn Pieters reporter

    Here you go, one patch:

    Two things to note:

    1. It builds on top of the other two patches in my mq, fixing issues 74 and 78. Sorry, no rewriting to work without those, there wouldn't be much point. :-)
    2. Normally when using parseurl, hg clone will treat the revision after # as if it was passed in as --rev, treats that rev as a head and won't clone beyond that. This wasn't implemented here, hence all the TODO's in the comments. All my patch does is use the checkout parameter where appropriate to update the wc to that revision.
  3. Log in to comment