"hg up -C" is also evil - ;-)
Kevin Bullock
kbullock+mercurial at ringworld.org
Fri Nov 5 21:13:22 UTC 2010
On 5 Nov 2010, at 1:47 PM, Robert Figura wrote:
> Waldemar <waldemar at beechwoods.com> wrote:
>> On 11/05/2010 07:55 AM, Kevin Bullock wrote:
>>> On 5 Nov 2010, at 7:12 AM, Marko Käning wrote:
>
>>>> Yesterday I issued the command
>>>>
>>>> $ hg up -C
>>>>
>>>> actually believing that local changes would be moved into *.orig prior to
>>>> the clean update of my working copy.
>>>>
>>>> But I was wrong! In many other cases local changes will be preserved with
>>>> *.orig files or additional warning messages will be thrown, but obviously
>>>> not with a clean update...
>>>>
>>> -C == --clean, which would indicate to me that any uncommitted work will at least be at _risk_ of disappearing. It would seem to make sense to write *.orig files though.
>
> Two things come to my mind:
> 1. Your proposal sounds consistent to me as hg up -C would not
> remove .orig (or other unknown) files...
> 2. But as hg up is a very common command i see me removing heaps of
> unwanted files all day.
Well, it wouldn't happen on a normal `hg up`, as that invokes the usual merge machinery. It would only write *.orig files on an `hg up -C`, which is only needed when crossing branches. So I wouldn't see it happening terribly often—unless you're in the habit of leaving uncommitted changes around while switching back & forth between branches in the same clone. (!)
pacem in terris / mir / shanti / salaam / heiwa
Kevin R. Bullock
More information about the Mercurial
mailing list