[PATCH] Issue916: tag ought to work sanely even when there is no checkout

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Apr 3 00:39:49 CDT 2008


On Thu, Apr 3, 2008 at 5:05 AM, Jesse Glick <jesse.glick at sun.com> wrote:
> 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.

In addition to aborting, how about adding an option to tag so you can
do what you want to? (Conserve server resources.)
-parren


More information about the Mercurial-devel mailing list