Death to "hg update -C"
Jelle Herold
jelle at defekt.nl
Thu Jul 23 09:48:23 UTC 2009
On Jul 22, 2009, at 10:58, Hans Meine wrote:
>>> Even if I say '-C', many times I don't mean it.
>>> I suppose I'm not the only one?
>>>
>>> Can this be fixed?
>>
>> No, it cannot be fixed. There are countless users, scripts, and even
>> paper books that know about --clean. It is here forever.
>
> Similar to Greg's suggestion, I would say it could be fixed: Similar
> to strip,
> one could write a backup (e.g. "hg diff --git" output). In contrast
> to Greg,
> I would suggest not to have an option for it, and not to write it
> into the
> home directory, but simply to write it to a fixed name under the .hg/
> directory (potentially overwriting a previous backup). This would
> not lead to
> too much clutter IMO and be similar to the usual rollback data.
> (Actually, it
> would be perfect if "rollback" was the command to undo update -C.)
>
> Does that make sense?
>
> (Yes, I know there are some technical difficulties due to diffing
> w.r.t. --git
> format, renames, and potentially other things, but it looks doable
> to me.)
Right, this is more or less what I had in mind. Maybe mercurial can be
even smart
about which backups to keep: once a change has been committed into the
repository
the relevant backup data can go.
I haven't thoughtabout how this would work in detail nor do I know
enough mercurial
to consider all implications.
Is this feasable? Does Hans' suggestion make sense?
What other options are there? Maybe integration with shelve? .. auto-
shelve?
Thanks.
Jelle
More information about the Mercurial
mailing list