Crazy idea of the day: the '+' revision
Greg Ward
greg-hg at gerg.ca
Tue Jun 1 13:21:19 CDT 2010
On Thu, May 20, 2010 at 2:15 PM, Matt Mackall <mpm at selenic.com> wrote:
> Right now we've got a '.' revision that refers to the parent of the
> working directory. Very handy. But we've got no way to refer to the
> revision in the working directory. Internally, we can use repo[None] to
> get a working context, but there's no way to refer to it except
> implicitly on the command line. So I'm proposing adding a magical '+'
> revision for that purpose.
>
> (Why '+'? In several places like hg id we refer to a modified working
> copy as <hash>+ to indicate "changeset <hash> plus changes".)
This feels deeply right to me. Rationale: I didn't even have to read
your email to know what you were proposing. Just seeing "the '+'
revision" in the subject line, it was immediately obvious that you
were proposing syntax for the working directory. I like it.
However, "hg tag +" currently works. So there could be someone out
there with a tag '+'. We *could* have one release cycle where hg
disallows new '+' tags and warns if you have existing ones. Or we
could just go ahead, implement '+', and warn if there is a '+' line in
.hgtags. You'll just have to rename the tag.
Greg
More information about the Mercurial-devel
mailing list