threads / discuss / 2619

non-trivial merge failures

Subject: non-trivial merge failures

## tl;dr

9 messages between Nov 20, 2005 and Nov 21, 2005.

replies: 8people: 4as markdown or json

David S. Miller· Nov 20, 2005, 21:49 UTC · lore

Every time I try to do a non-trivial merge, I always get this:

davem@sunset:~/src/GIT/net-2.6$ git pull git://git.skbuff.net/gitroot/yoshfuji/linux-2.6.14+advapi-fix/
Unpacking 21 objects
 100% (21/21) done
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Traceback (most recent call last):
  File "/home/davem/bin/git-merge-recursive", line 13, in ?
    from gitMergeCommon import *
  File "/home/davem/share/git-core/python/gitMergeCommon.py", line 18, in ?
    import subprocess
ImportError: No module named subprocess
Automatic merge failed/prevented; fix up by hand
davem@sunset:~/src/GIT/net-2.6$ 
(one can reproduce this exact tree state by cloning:
	master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git
 then executing the above pull command)

Maybe something is wrong with my python installation or something like that?

It looks like it's failing to import some python module called "subprocess", and I aparently don't have that installed. /usr/bin/python on this Debian box is aparently python-2.3, do I need to be using python-2.4 for this merge stuff to work?

Ismail Donmez· Nov 20, 2005, 21:51 UTC · re: David S. Miller · lore

Re: non-trivial merge failures

Sunday 20 November 2005 23:49 tarihinde şunları yazmıştınız:
> ImportError: No module named subprocess
You need Python 2.4.x, subprocess is a new module in Python 2.4

Regards, ismail

Johannes Schindelin· Nov 20, 2005, 23:39 UTC · re: Ismail Donmez · lore

Re: non-trivial merge failures

Hi,
On Sun, 20 Nov 2005, Ismail Donmez wrote:
> Sunday 20 November 2005 23:49 tarihinde ÿÿunlarÿÿ yazmÿÿÿÿtÿÿnÿÿz:
> > ImportError: No module named subprocess
> 
> You need Python 2.4.x, subprocess is a new module in Python 2.4

No, you don't need 2.4, but at least 2.3. If you don't install git, but run it from where you compile it, be sure to set GIT_PYTHON_PATH in your config.mak. In any case, you need to set WITH_OWN_SUBPROCESS_PY for 2.3

Hth, Dscho

David S. Miller· Nov 21, 2005, 04:15 UTC · re: Ismail Donmez · lore

Re: non-trivial merge failures

From: Ismail Donmez <ismail@uludag.org.tr>
Date: Sun, 20 Nov 2005 23:51:42 +0200
> Sunday 20 November 2005 23:49 tarihinde �unlar� yazm� t�n�z:
> > ImportError: No module named subprocess
> 
> You need Python 2.4.x, subprocess is a new module in Python 2.4
It's amazing that "make test" passes in the presence of Python 2.3 :-)
Maybe at least a trivial version check can be added to GIT somewhere?
Ryan Anderson· Nov 20, 2005, 23:07 UTC · re: David S. Miller · lore

Re: non-trivial merge failures

On Sun, Nov 20, 2005 at 01:49:45PM -0800, David S. Miller wrote:
> 
> Every time I try to do a non-trivial merge, I always
> get this:

git-merge-recursive became the default merge tool recently, and Debian uses Python 2.3 as the default, which lacks "subprocess.py". Luckily, git ships a backport, so you can do:

	make WITH_OWN_SUBPROCESS_PY=YesPlease all doc test install install-doc
or
	make PYTHON_PATH=/usr/bin/python2.4 all doc test install install-doc

and fix things up (the second assuming, of course, you have python-2.4 installed)

Alternatively, you can build your own Debian packages with "make deb" and just install them.

-- 
Ryan Anderson
  sometimes Pug Majere
David S. Miller· Nov 21, 2005, 04:20 UTC · re: Ryan Anderson · lore

Re: non-trivial merge failures

From: Ryan Anderson <ryan@michonline.com>
Date: Sun, 20 Nov 2005 18:07:38 -0500
Show 12 quoted lines
> On Sun, Nov 20, 2005 at 01:49:45PM -0800, David S. Miller wrote:
> > 
> > Every time I try to do a non-trivial merge, I always
> > get this:
> 
> git-merge-recursive became the default merge tool recently, and Debian
> uses Python 2.3 as the default, which lacks "subprocess.py".  Luckily,
> git ships a backport, so you can do:
> 
> 	make WITH_OWN_SUBPROCESS_PY=YesPlease all doc test install install-doc
> or
> 	make PYTHON_PATH=/usr/bin/python2.4 all doc test install install-doc

All these ways to make it work are nice, and in fact I have no problem with upgrading to python2.4 on my system if that makes it work.

I have a huge problem with the fact that "make test" passes %100 cleanly even if you have the wrong python version installed. It's amazing that this is that possible if even the most non-trivial merge needs this Python code :-)

David S. Miller· Nov 21, 2005, 04:17 UTC · lore

Re: non-trivial merge failures

From: Ray Lehtiniemi <rayl@mail.com>
Date: Sun, 20 Nov 2005 15:19:22 -0700
Show 9 quoted lines
> On Sun, Nov 20, 2005 at 01:49:45PM -0800, David S. Miller wrote:
> > 
> > It looks like it's failing to import some python module called
> > "subprocess", and I aparently don't have that installed.
> > /usr/bin/python on this Debian box is aparently python-2.3, do
> > I need to be using python-2.4 for this merge stuff to work?
> 
> Define WITH_OWN_SUBPROCESS_PY in Makefile to install a copy of
> this module.

How about a version check at build or "make test" time so we can get a sensible failure diagnostic instead of a weird cryptic "subprocess import failure" when Python is too old? :-)

At least some better behavior than what we have now, where "make test" still passes when you have this problem.

David S. Miller· Nov 21, 2005, 05:31 UTC · lore

Re: [PATCH] Add Python version checks to the Makefile to automatically set WITH_OWN_SUBPROCESS_PY

From: Ryan Anderson <ryan@michonline.com>
Date: Mon, 21 Nov 2005 00:11:22 -0500
> Also rearrange some path settings in the Makefile in the process.
> 
> Signed-off-by: Ryan Anderson <ryan@michonline.com>
Looks good from here.
Johannes Schindelin· Nov 21, 2005, 08:26 UTC · re: David S. Miller · lore

Re: [PATCH] Add Python version checks to the Makefile to automatically set WITH_OWN_SUBPROCESS_PY

Hi,
On Sun, 20 Nov 2005, David S. Miller wrote:
Show 8 quoted lines
> From: Ryan Anderson <ryan@michonline.com>
> Date: Mon, 21 Nov 2005 00:11:22 -0500
> 
> > Also rearrange some path settings in the Makefile in the process.
> > 
> > Signed-off-by: Ryan Anderson <ryan@michonline.com>
> 
> Looks good from here.
Not from here... I don't have it ;-) Care to share?

Ciao, Dscho

← back to recent threads