[PATCH] Issue916: tag ought to work sanely even when there is no checkout
Jesse Glick
jesse.glick at sun.com
Thu Apr 3 03:05:46 UTC 2008
Matt Mackall wrote:
> The current behavior is perfectly consistent.
Consistent, but almost certainly unwanted.
1. If null is "checked out", it is generally because you just do not
want a checkout (say because you are running a server), not because you
really wanted to start creating a new root. If you really did want a new
root, you could always
hg up null
touch .hgtags
hg add .hgtags
hg ci -m 'starting a fresh root branch for tags, for some odd reason'
2. Checking out tip just to add a tag can be very slow and wasteful of
disk space for a large repository.
> I'd rather have the "creates a new head" sort of warning.
Might be better than nothing, but seems to me like "I just did something
you very likely did not expect or want, so now I am informing you of this".
If the first patch is not acceptable, I would rather go with option #2
from Issue916, i.e. just abort if there is no (real) checkout, rather
than quietly doing something silly.
More information about the Mercurial-devel
mailing list