git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Expected Behavior?

From
Junio C Hamano <junkio@cox.net>
Date
Nov 9, 2005, 06:28 UTC
Message-ID
<7vslu6mj2m.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<E1EZgAs-0008B4-QZ@jdl.com>
Jon Loeliger <jdl@freescale.com> writes:
Show 11 quoted lines
> Hmmm. That didn't go too well. Concisely:
>
>     % git merge -s recursive "Grab dev stuff" master dev
>     Trying really trivial in-index merge...
>     fatal: Merge requires file-level merging
>     Nope.
>     Traceback (most recent call last):
>       File "/usr/bin/git-merge-recursive", line 8, in ?
> 	from gitMergeCommon import *
>     ImportError: No module named gitMergeCommon
>     Automatic merge failed/prevented; fix up by hand

Could you check diff between /usr/bin/git-merge-recursive and git-merge-recursive.py in your source tree and see if the appending to sys.path points at the right place (i.e. where the make installs gitMergeCommon.py)? Mine looks like this:

  --- git-merge-recursive.py      2005-11-08 02:27:08.000000000 +0000
  +++ /usr/bin/git-merge-recursive        2005-11-09 06:17:58.000000000 +0000
  @@ -1,10 +1,10 @@
  -#!/usr/bin/python
  +#!/usr/bin/python2.4
   import sys, math, random, os, re, signal, tempfile, stat, errno, traceback
   from heapq import heappush, heappop
   from sets import Set
  -sys.path.append('''@@GIT_PYTHON_PATH@@''')
  +sys.path.append('''/usr/share/git-core/python''')
   from gitMergeCommon import *
   originalIndexFile = os.environ.get('GIT_INDEX_FILE',

By default we set prefix to $HOME so ~/bin/git-merge-recursive would import ~/share/git-core/python/gitMergeCommon.py. Binary packaging typically set prefix to /usr, so the executable is in /usr/bin, and should import from /usr/share/git-core/python/, which is as your make log shows:

Show 8 quoted lines
> [ tail end of the make install output ]
>
> install -d -m755 '/usr/share/git-core/templates/'
> (cd blt && tar cf - .) | \
> (cd '/usr/share/git-core/templates/' && tar xf -)
> make[1]: Leaving directory `/usr/src/git-core/templates'
> install -d -m755 '/usr/share/git-core/python'
> install gitMergeCommon.py '/usr/share/git-core/python'
Previous: Jon Loeliger
Message 2 of 2 in “Re: Expected Behavior?”
  1. Jon LoeligerNov 9, 2005
  2. Junio C HamanoNov 9, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.