Manual merge for some files during rebase (using TortoiseHg)

View: New views
5 Messages — Rating Filter:   Alert me  

Manual merge for some files during rebase (using TortoiseHg)

by Afriza N. Arief :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have project files within my repository (let's say *.proj), unfortunately, the order of the (text) content is not consistent and if I use Kdiff3 (which is the default since I'm using TortoiseHg's installer) to merge, it can easily lead to corrupted project file. So what I do during a merge is to take a good copy from one side, try to compile the projects, and fix the project's settings using IDE.

However, when I do rebase, it automatically commits when I "Choose B everywhere", save, and close KDiff3. Is there any settings or flags I can pass to hg rebase such that I can review and fix some stuffs before committing it?

Best Regards,

Afriza N. Arief

_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: Manual merge for some files during rebase (using TortoiseHg)

by Benoit Boissinot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 26, 2009 at 10:56:55AM +0800, Afriza N. Arief wrote:

> Hi,
>
> I have project files within my repository (let's say *.proj), unfortunately,
> the order of the (text) content is not consistent and if I use Kdiff3 (which
> is the default since I'm using TortoiseHg's installer) to merge, it can
> easily lead to corrupted project file. So what I do during a merge is to
> take a good copy from one side, try to compile the projects, and fix the
> project's settings using IDE.
>
> However, when I do rebase, it automatically commits when I "Choose B
> everywhere", save, and close KDiff3. Is there any settings or flags I can
> pass to hg rebase such that I can review and fix some stuffs before
> committing it?

I'm sorry, I don't know. Maybe you'll have more luck asking directly in
the THG mailing list?

http://bitbucket.org/tortoisehg/stable/wiki/Home#mailing-lists

regards,

Benoit

--
:wq
_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: Manual merge for some files during rebase (using TortoiseHg)

by Steve Borho :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 7:19 PM, Benoit Boissinot
<benoit.boissinot@...> wrote:

> On Mon, Oct 26, 2009 at 10:56:55AM +0800, Afriza N. Arief wrote:
>> Hi,
>>
>> I have project files within my repository (let's say *.proj), unfortunately,
>> the order of the (text) content is not consistent and if I use Kdiff3 (which
>> is the default since I'm using TortoiseHg's installer) to merge, it can
>> easily lead to corrupted project file. So what I do during a merge is to
>> take a good copy from one side, try to compile the projects, and fix the
>> project's settings using IDE.
>>
>> However, when I do rebase, it automatically commits when I "Choose B
>> everywhere", save, and close KDiff3. Is there any settings or flags I can
>> pass to hg rebase such that I can review and fix some stuffs before
>> committing it?
>
> I'm sorry, I don't know. Maybe you'll have more luck asking directly in
> the THG mailing list?
>
> http://bitbucket.org/tortoisehg/stable/wiki/Home#mailing-lists

I think this is a straight-forward merge/rebase question.   Rebase
uses Mercurial's merge machinery so you should be able to get the
behavior you want by creating well tweaked [merge-patterns] and
[merge-tools] ini sections.

This may cause a rebase to be interrupted, though, requiring you to
finish it on the command line.

--
Steve Borho
_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: Manual merge for some files during rebase (using TortoiseHg)

by Afriza N. Arief :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think this is a straight-forward merge/rebase question.   Rebase
uses Mercurial's merge machinery so you should be able to get the
behavior you want by creating well tweaked [merge-patterns] and
[merge-tools] ini sections.

This may cause a rebase to be interrupted, though, requiring you to
finish it on the command line.

--
Steve Borho

Thank you all for the help.

I found a way to prevent the auto commit.

1) do hg rebase
2) during the conflict and KDiff3 pops-up on the problem file, close it without saving. this will not mark the problem file as "resolved"
3) continue merging non-problematic files (if any)
4) do hg resolve on the problem file, and some other files if you want. this will pop-up the KDiff3. select "Choose B everywhere" to choose one good copy, save, and close KDiff3.
5) verify the merge result by running IDE, compile, and fix errors
6) mark the files as resolved using hg resolve -m
7) continue/complete the rebase process by doing hg rebase --continue
8) done!


Best Regards,


Afriza N. Arief

_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: Manual merge for some files during rebase (using TortoiseHg)

by Steve Borho :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 9:53 PM, Afriza N. Arief <afriza.na@...> wrote:

>> I think this is a straight-forward merge/rebase question.   Rebase
>> uses Mercurial's merge machinery so you should be able to get the
>> behavior you want by creating well tweaked [merge-patterns] and
>> [merge-tools] ini sections.
>>
>> This may cause a rebase to be interrupted, though, requiring you to
>> finish it on the command line.
>>
>> --
>> Steve Borho
>
> Thank you all for the help.
> I found a way to prevent the auto commit.
> 1) do hg rebase
> 2) during the conflict and KDiff3 pops-up on the problem file, close it
> without saving. this will not mark the problem file as "resolved"

I think the following ini section would do this automatically

[ merge-patterns ]
**.vcproj = internal:fail

> 3) continue merging non-problematic files (if any)
> 4) do hg resolve on the problem file, and some other files if you want. this
> will pop-up the KDiff3. select "Choose B everywhere" to choose one good
> copy, save, and close KDiff3.

The thg 0.9 commit tool will allow you to automate this quite a bit.
It allows you to pick the merge tool to use for the resolve, and among
the merge tool options are internal:local and internal:other.  The
latter has the same effect as what you've done here with kdiff3.

> 5) verify the merge result by running IDE, compile, and fix errors
> 6) mark the files as resolved using hg resolve -m
> 7) continue/complete the rebase process by doing hg rebase --continue
> 8) done!

Glad you've found a process that works for you.

--
Steve Borho

_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial