threads / discuss / 2410

Re: Expected Behavior?

Subject: Re: Expected Behavior?

## tl;dr

2 messages between Nov 9, 2005 and Nov 9, 2005.

replies: 1people: 2as markdown or json

Jon Loeliger· Nov 9, 2005, 02:58 UTC · lore
<Young Frankenstein> Froe-derick wrote: </Young Frankenstein>
Show 6 quoted lines
> Jon: You could try to this merge with the recursive merge strategy
> (git merge -s recursive 'merge message' master dev) If you do, you
> _should_ get something like:
> 
>     CONFLICT (add/add): File file3 added non-identically in both
>     branches. Adding as file3_master and file3_dev instead.
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
Full details below.
> You will then end up with file3_master and file3_dev in your working
> tree, which corresponds to file3 in the master branch and file3 in the
> dev branch, respectively.

That'd be cool, because the first thing I tend to want to do after a failed file merge is look at clear versions of both files. Gives me a global sense of where the file needs to go... You know.

jdl
[ 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'

% 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

% git -v git version 0.99.9.GIT % cat /usr/src/git-core/.git/HEAD f8d294f0a44c4305a9f3a1c70beb6a1c7583f287

% ll /usr/share/git-core/python/ total 16 4 drwxr-xr-x 2 root root 4096 Nov 8 20:17 . 4 drwxr-xr-x 4 root root 4096 Sep 14 19:47 .. 8 -rwxr-xr-x 1 root root 6879 Nov 8 20:17 gitMergeCommon.py

% python Python 2.3.5 (#2, May 4 2005, 08:51:39) [GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2

Junio C Hamano· Nov 9, 2005, 06:28 UTC · re: Jon Loeliger · lore
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'

← back to recent threads