meld throws exception when diffing against subversion repository

Bug #794210 reported by Headless Platter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
meld (Debian)
Fix Released
Unknown
meld (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: meld

Repro steps:

1- change to a directory in a checked-out subversion repository with changed files
2- meld .
3- double-click on one of the changed files
4- Observe that it does not show the diff as it should. The following stack-trace is printed to the console from which meld was executed:

Traceback (most recent call last):
  File "/usr/lib/meld/meld/task.py", line 130, in iteration
    ret = task()
  File "/usr/lib/meld/meld/vcview.py", line 385, in run_diff_iter
    self.show_patch(prefix, patch)
  File "/usr/lib/meld/meld/vcview.py", line 522, in show_patch
    if misc.write_pipe(patchcmd, patch) == 0:
  File "/usr/lib/meld/meld/misc.py", line 245, in write_pipe
    proc = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: meld 1.5.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Tue Jun 7 13:00:46 2011
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: meld
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Headless Platter (headlessplatter) wrote :
Revision history for this message
Julian Taylor (jtaylor) wrote :

I can't reproduce this, can you provide a example repository which reproduces the crash?

Changed in meld (Ubuntu):
status: New → Incomplete
Revision history for this message
Headless Platter (headlessplatter) wrote : Re: [Bug 794210] Re: meld throws exception when diffing against subversion repository

My repository is at svn://gashler.com/meldtest. Here are the steps that
repro for me:

svn co svn://gashler.com/meldtest
cd meldtest
echo "changed" > hi.txt
meld .
double-click on hi.txt
observe the issue

This repository is quite minimalistic, so I doubt that it is part of the
problem. Here are the steps I used to create it:

svnadmin create ./meldtest
add the line "anon-access = write" to meldtest/conf/svnserve.conf
svnserve -d -r .
svn co svn://localhost/meldtest ./test
cd test
echo "original" > hi.txt
svn add hi.txt
svn commit -m "initial commit"

If the repository itself is not part of the problem, and I'm pretty-sure
it is not, then there must be some other difference between our
machines. It's a 64-bit machine. I did a fresh install of Kubuntu on a
newly-formatted machine just hours before I found and reported the bug,
so I didn't really have much time to do anything too unusual. Meld has
worked perfectly for me in the past on the same machine with at least 5
different versions of Ubuntu, so I'm pretty-sure the problem is related
to recent changes. I'm using ReiserFS for the first time instead of
Ext3, and I mounted /home on its own partition, but I'm pretty-sure none
of that should have any effect on how Python interacts with the file-system.

Would it help if I inserted a few lines that would print out some
additional information on my machine, perhaps near misc.py line 245? I
have never programmed in Python before, but I am capable in other
languages, so I'd be willing to try if you could give me some guidance
about what info would be helpful and how to express a print statement in
Python.

On 06/08/2011 01:40 AM, Julian Taylor wrote:
> I can't reproduce this, can you provide a example repository which
> reproduces the crash?
>
> ** Changed in: meld (Ubuntu)
> Status: New => Incomplete
>

Revision history for this message
Julian Taylor (jtaylor) wrote :

I can't reproduce it with that repository either.

do you have patch installed?
sudo apt-get install patch

if yes can you execute:
python -c 'import tempfile; print tempfile.mkdtemp("-meld")'
it should print a the location of a directory

if that works can you add a
print command
in /usr/lib/meld/meld/misc.py line 244 before proc = subprocess.Popen(command...)
and post what it prints before the crash

Revision history for this message
Headless Platter (headlessplatter) wrote :

Okay, I executed the command

python -c 'import tempfile; print tempfile.mkdtemp("-meld")'

then I added the following 2 lines to misc.py just before line 244:

     print tempfile.mkdtemp("-meld")
     print command

To my surprise, the problem did not repro. It printed

/tmp/tmp8Tx0aV-meld
['patch', '-p0', '-R', '-d', '/tmp/tmpcfanD4-meld']

and displayed the diff as expected. I then removed the two lines that I
had added, and it continued to work properly, so I think it was the
mkdtemp command that fixed it. Meld also works properly now with my
other repositories, where I originally discovered the issue. So, now I
can no longer repro the problem either. I do not understand why making a
temporary dir would fix anything. I hope this means more to you than it
does to me.

Thanks for your help!
--Mike

On 06/08/2011 10:21 AM, Julian Taylor wrote:
> I can't reproduce it with that repository either.
>
> do you have patch installed?
> sudo apt-get install patch
>
> if yes can you execute:
> python -c 'import tempfile; print tempfile.mkdtemp("-meld")'
> it should print a the location of a directory
>
> if that works can you add a
> print command
> in /usr/lib/meld/meld/misc.py line 244 before proc = subprocess.Popen(command...)
> and post what it prints before the crash
>

Revision history for this message
Julian Taylor (jtaylor) wrote :

did you install patch?
this probably solved the problem.

meld is missing a dependency on it.

Changed in meld (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Headless Platter (headlessplatter) wrote :

Yes, I did just install patch. That must have been it.

On 06/08/2011 11:10 AM, Julian Taylor wrote:
> did you install patch?
> this probably solved the problem.
>
> meld is missing a dependency on it.
>
> ** Changed in: meld (Ubuntu)
> Status: Incomplete => Confirmed
>

Changed in meld (Debian):
status: Unknown → New
Changed in meld (Debian):
status: New → Fix Released
Revision history for this message
Julian Taylor (jtaylor) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. I am closing it because the bug has been fixed in the latest development version of Ubuntu - Oneiric Ocelot.

Changed in meld (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.