You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Augie Fackler <du...@gmail.com> on 2007/10/25 00:59:40 UTC
Using hgmerge with 1.5's interactive conflict resolution
Hey all,
In using Mercurial I noticed that hgmerge pretty much rocks across
platforms for doing interactive merges, but the arguments it takes
are somewhat different than ours. As such, I made a python wrapper
for the hgmerge script, which is attached.
I thought it should go in the contrib area so that people other than
me will use it, since it's pretty handy. The the only major quirk as
of now is that FileMerge on OS X doesn't seem to like writing to a
tempfile that is a sibling of the conflicted file. I tried to
diagnose that and in the end gave up and just used a temporary
directory.
If anyone has suggestions to improve the Python code, please let me
know - I'm a bit new to doing file operations using Python.
Peace,
Augie Fackler
[[[
Add svn_hgmerge.py which wraps Mercurial's hgmerge script for use
with the
interactive conflict resolution system.
* contrib/client-side/svn_hgmerge.py
New file.
]]]
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Augie Fackler <du...@gmail.com>.
On Nov 28, 2007, at 12:51 AM, Karl Fogel wrote:
> Augie Fackler <du...@gmail.com> writes:
>>>> I submitted this a while ago, but all that came of it was
>>>> discussing
>>>> the interface to the external merge tool. Does it make sense to
>>>> include this script in contrib, or should I just publish it on my
>>>> own
>>>> hosting for now?
>>>
>>> Could you point to the original message in the archives, please?
>>> Thanks.
>>
>> Sure thing - http://svn.haxx.se/dev/archive-2007-10/1211.shtml
>
> Thanks, added in r28106. I changed it to "-" instead of "_", as a
> slight majority of our contrib scripts seem to use the former, and it
> doesn't involve a shift on most keyboards. Hope that's okay; if not,
> we can change it.
Cool. It shouldn't be a problem to have "-" instead of "_", the only
reason I can think of that'd matter would be if someone wanted to
import the script as a module, which doesn't make sense to me.
Thanks!
Augie
>
>
> -Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Karl Fogel <kf...@red-bean.com>.
Augie Fackler <du...@gmail.com> writes:
>>> I submitted this a while ago, but all that came of it was discussing
>>> the interface to the external merge tool. Does it make sense to
>>> include this script in contrib, or should I just publish it on my own
>>> hosting for now?
>>
>> Could you point to the original message in the archives, please?
>> Thanks.
>
> Sure thing - http://svn.haxx.se/dev/archive-2007-10/1211.shtml
Thanks, added in r28106. I changed it to "-" instead of "_", as a
slight majority of our contrib scripts seem to use the former, and it
doesn't involve a shift on most keyboards. Hope that's okay; if not,
we can change it.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Augie Fackler <du...@gmail.com>.
On Nov 27, 2007, at 6:09 PM, Karl Fogel wrote:
> Augie Fackler <du...@gmail.com> writes:
>> I submitted this a while ago, but all that came of it was discussing
>> the interface to the external merge tool. Does it make sense to
>> include this script in contrib, or should I just publish it on my own
>> hosting for now?
>
> Could you point to the original message in the archives, please?
> Thanks.
Sure thing - http://svn.haxx.se/dev/archive-2007-10/1211.shtml
>> (wanted to nudge this before 1.5 goes final)
>
> No need to worry; contrib scripts can be added after branching.
Ah, excellent.
Augie
>
>
> -Karl
>
>> On Oct 24, 2007, at 8:59 PM, Augie Fackler wrote:
>>
>>> Hey all,
>>>
>>> In using Mercurial I noticed that hgmerge pretty much rocks across
>>> platforms for doing interactive merges, but the arguments it takes
>>> are somewhat different than ours. As such, I made a python wrapper
>>> for the hgmerge script, which is attached.
>>>
>>> I thought it should go in the contrib area so that people other than
>>> me will use it, since it's pretty handy. The the only major quirk as
>>> of now is that FileMerge on OS X doesn't seem to like writing to a
>>> tempfile that is a sibling of the conflicted file. I tried to
>>> diagnose that and in the end gave up and just used a temporary
>>> directory.
>>>
>>> If anyone has suggestions to improve the Python code, please let me
>>> know - I'm a bit new to doing file operations using Python.
>>>
>>> Peace,
>>> Augie Fackler
>>> [[[
>>> Add svn_hgmerge.py which wraps Mercurial's hgmerge script for use
>>> with the
>>> interactive conflict resolution system.
>>>
>>> * contrib/client-side/svn_hgmerge.py
>>> New file.
>>> ]]]
>>> <svn_hgmerge.py>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Karl Fogel <kf...@red-bean.com>.
Augie Fackler <du...@gmail.com> writes:
> I submitted this a while ago, but all that came of it was discussing
> the interface to the external merge tool. Does it make sense to
> include this script in contrib, or should I just publish it on my own
> hosting for now?
Could you point to the original message in the archives, please?
Thanks.
> (wanted to nudge this before 1.5 goes final)
No need to worry; contrib scripts can be added after branching.
-Karl
> On Oct 24, 2007, at 8:59 PM, Augie Fackler wrote:
>
>> Hey all,
>>
>> In using Mercurial I noticed that hgmerge pretty much rocks across
>> platforms for doing interactive merges, but the arguments it takes
>> are somewhat different than ours. As such, I made a python wrapper
>> for the hgmerge script, which is attached.
>>
>> I thought it should go in the contrib area so that people other than
>> me will use it, since it's pretty handy. The the only major quirk as
>> of now is that FileMerge on OS X doesn't seem to like writing to a
>> tempfile that is a sibling of the conflicted file. I tried to
>> diagnose that and in the end gave up and just used a temporary
>> directory.
>>
>> If anyone has suggestions to improve the Python code, please let me
>> know - I'm a bit new to doing file operations using Python.
>>
>> Peace,
>> Augie Fackler
>> [[[
>> Add svn_hgmerge.py which wraps Mercurial's hgmerge script for use
>> with the
>> interactive conflict resolution system.
>>
>> * contrib/client-side/svn_hgmerge.py
>> New file.
>> ]]]
>> <svn_hgmerge.py>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Augie Fackler <du...@gmail.com>.
I submitted this a while ago, but all that came of it was discussing
the interface to the external merge tool. Does it make sense to
include this script in contrib, or should I just publish it on my own
hosting for now?
Peace,
Augie
(wanted to nudge this before 1.5 goes final)
On Oct 24, 2007, at 8:59 PM, Augie Fackler wrote:
> Hey all,
>
> In using Mercurial I noticed that hgmerge pretty much rocks across
> platforms for doing interactive merges, but the arguments it takes
> are somewhat different than ours. As such, I made a python wrapper
> for the hgmerge script, which is attached.
>
> I thought it should go in the contrib area so that people other than
> me will use it, since it's pretty handy. The the only major quirk as
> of now is that FileMerge on OS X doesn't seem to like writing to a
> tempfile that is a sibling of the conflicted file. I tried to
> diagnose that and in the end gave up and just used a temporary
> directory.
>
> If anyone has suggestions to improve the Python code, please let me
> know - I'm a bit new to doing file operations using Python.
>
> Peace,
> Augie Fackler
> [[[
> Add svn_hgmerge.py which wraps Mercurial's hgmerge script for use
> with the
> interactive conflict resolution system.
>
> * contrib/client-side/svn_hgmerge.py
> New file.
> ]]]
> <svn_hgmerge.py>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Augie Fackler <du...@gmail.com>.
On Oct 24, 2007, at 9:37 PM, Karl Fogel wrote:
> Augie Fackler <du...@gmail.com> writes:
>> In using Mercurial I noticed that hgmerge pretty much rocks across
>> platforms for doing interactive merges, but the arguments it takes
>> are somewhat different than ours. As such, I made a python wrapper
>> for the hgmerge script, which is attached.
>
> Do you think we should just change our interface to match? Or is
> there something Mercurial-specific about hgmerge?
Short version: hgmerge does make one Mercurial-specific assumption
about merging and user data, so I don't think we should just adopt
their interface.
Long (more complicated) version: Part of me wants to just match their
interface, but on the other hand it's kind of messy. hgmerge takes
three arguments (local base other) and then just dumps the result of
the merge back into local. That doesn't work for us because under the
hood the interactive conflict resolution expects the results to go
into another file. We can't very well dump the results of the merge
into local because local can (and probably does for conflicts on
update) contain unversioned edits, whereas in mercurial merges always
happen between already-versioned files. I already considered that
while writing the interface for (l)aunch in the first place, but it
just feels a little too icky given the case of user edits in 'local'.
>
> -Karl
Augie
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Using hgmerge with 1.5's interactive conflict resolution
Posted by Karl Fogel <kf...@red-bean.com>.
Augie Fackler <du...@gmail.com> writes:
> In using Mercurial I noticed that hgmerge pretty much rocks across
> platforms for doing interactive merges, but the arguments it takes
> are somewhat different than ours. As such, I made a python wrapper
> for the hgmerge script, which is attached.
Do you think we should just change our interface to match? Or is
there something Mercurial-specific about hgmerge?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org