Skip to contentSkip to conversation

non-trivial merge failures

DISCUSSION David S. Miller 4 participants 9 messages Jun 15, 2016 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

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?

#1 lore raw
Quoted 3 lines · David S. Miller

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.

Signature · 2 lines
Ryan Anderson
  sometimes Pug Majere
#6 lore raw
In reply to David S. Miller

Sunday 20 November 2005 23:49 tarihinde şunları yazmıştınız:

Quoted 1 line

ImportError: No module named subprocess

You need Python 2.4.x, subprocess is a new module in Python 2.4

Regards,
ismail

#2 lore raw
In reply to Ryan Anderson

From: Ryan Anderson <[email protected]>
Date: Sun, 20 Nov 2005 18:07:38 -0500

Quoted 5 lines · David S. Miller
Quoted 3 lines

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

Quoted 7 lines

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 :-)

#5 lore raw

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

Hi,

Quoted 8 lines · David S. Miller

From: Ryan Anderson <[email protected]>
Date: Mon, 21 Nov 2005 00:11:22 -0500

Quoted 3 lines

Also rearrange some path settings in the Makefile in the process.

Looks good from here.

Not from here... I don't have it ;-) Care to share?

Ciao,
Dscho

#7 lore raw
In reply to Ismail Donmez

From: Ismail Donmez <[email protected]>
Date: Sun, 20 Nov 2005 23:51:42 +0200

Quoted 4 lines

Sunday 20 November 2005 23:49 tarihinde $,1 (Bunlar$,1 Q(B yazm$,1 Q (Bt$,1 Q(Bn$,1 Q(Bz:

Quoted 1 line

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?

#8 lore raw
In reply to Ismail Donmez

Hi,

Quoted 4 lines · Ismail Donmez

Sunday 20 November 2005 23:49 tarihinde ÿÿunlarÿÿ yazmÿÿÿÿtÿÿnÿÿz:

Quoted 1 line

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

#10 lore raw
In reply to a message not in the archive

From: Ray Lehtiniemi <[email protected]>
Date: Sun, 20 Nov 2005 15:19:22 -0700

Quoted 9 lines · David S. Miller
Quoted 5 lines

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.