Using mercurial while keeping uncomitted changes

venizio krups 0000.vk at gmail.com
Sun Apr 11 11:09:25 CDT 2010


On Sat, Apr 10, 2010 at 2:35 AM, Mark Tolonen <metolone+gmane at gmail.com> wrote:
>
> "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

or you can poor man's shelve: hg diff > shelf.patch

-venizio


More information about the Mercurial mailing list