Using mercurial while keeping uncomitted changes

Mark Tolonen metolone+gmane at gmail.com
Sat Apr 10 01:35:28 CDT 2010


"Aardwolf" <toiletpot at gmail.com> wrote in message 
news:28196392.post at talk.nabble.com...
>
>
>
> Dirkjan Ochtman wrote:
>>
>> On Fri, Apr 9, 2010 at 19:03, Aardwolf <toiletpot at gmail.com> wrote:
>>> How can I get the "wanted" situation in the image without having to
>>> commit
>>> my uncommitted local changes, or in the least painful way?
>>
>> Pull before you commit twelve. Commit twelve by specifying files with
>> commit or using the record extension. Then push.
>>
>> Cheers,
>>
>> Dirkjan
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial
>>
>>
>
> Hi,
>
> Normally I do pull before I commit & push exactly to avoid this situation.
> But just today it happened that EXACTLY during the minute between I 
> updated
> and pushed, someone did a commit in between! And even though his 
> commit/push
> was related to a file totally unrelated to my files, everything was
> ruined...
>
> So is there anything to cope better with this situation?

Use Mercurial Queues (mq extension).  Put your uncommitted changes in a 
patch, qpop to "hide" it, pull and rebase, qpush the patch.  Keep making 
changes, using qrefresh to update the patch and qfinish to commit it as a 
changeset.

Shelve is easier for your simple case, however.

-Mark




More information about the Mercurial mailing list