GNOME Bugzilla – Bug 661561
KeyError: 'revision' when comparing files with modifed SVN keyword values
Last modified: 2011-12-07 21:21:08 UTC
meld breaks when trying to diff a file with a modified SVN keyword value, e.g. original file: $Id$ modified file: $Id: file.txt 12571 2011-09-29 09:08:17Z piper $ The error is: ---START BACKTRACE--- Traceback (most recent call last):
+ Trace 228771
ret = task()
self.vc.cache_inventory(rootname)
self._tree_cache = self._lookup_tree_cache(directory)
self._update_tree_state_cache(rootdir, tree_state)
rev = status.attrib["revision"]
---END BACKTRACE--- Reverting the line back to its original value works around this, but this is not practical when diffing a directory with many modified files. The attached patch 'fixes' the problem, by setting a 'n/a' value for files where the SVN revision cannot be obtained. The patch has been tested against meld 1.5.1 on Ubuntu 10.04 (meld-1.5.1-1~getdeb1.deb)
There's no patch attached. Also, I'm pretty sure this would have been fixed by: http://git.gnome.org/browse/meld/commit/?id=8d7e4aff715a933957a9cec99175fd15fec846a6 Could you please test with Meld 1.5.2 or later? (Note that you don't need to install Meld to test it. Just run bin/meld from the directory you untar it into.)
Created attachment 200691 [details] [review] Patch for svn.py
Sorry for the delay in replying. The patch is now attached. I can confirm that this bug still exists in meld 1.5.2 Another way to reproduce this bug: 1) add and commit a file to SVN containing a line like this: # $Id: file.txt 8936 2010-09-20 12:24:51Z piper $ 2) set the svn:keywords property on the file to "Id". Do NOT commit this change to SVN! 3) Try to view the file in meld. NB: If the file is now modified so the line above is this: # $Id$ ...the file can now be viewed in meld successfully
I understand and can replicate those instructions... but that's not the same problem you originally reported; that bug is already filed as bug 557615. We don't have a good way to deal with keywords, and get the patch failed message (I have a patch that seems to work, but it won't support svn 1.7). Can you actually reproduce the earlier traceback with current Meld? I can't see how the patch you posted could fix anything that the commit I linked to above didn't.
Hi, sorry for the getting these 2 issues mixed up. I can't reproduce the original issue with meld 1.5.2, so that bug can remain closed. It is a pity that SVN keywords are still causing problems, good luck with your patches for that! :-)
Great. Thanks for the feedback, and for the repro for the other bug.