crash if svn directory contains uncommited 'svn cp'



Hello,

Meld crashes when I try do display svn working directory containing
copied files. The bug is easy to reproduce using meld 1.5.x or trunk
and stock svn from Ubuntu 10.10 (svn, version 1.6.12 (r955767)). Check
out anything from subversion and run 'svn cp existing file new-file &&
meld .'

The patch that fixes this problem is attached.

Regards,
Tomek
From 453bc6af19e60abd50b8182129d83e047dda2e4e Mon Sep 17 00:00:00 2001
From: Tomasz Bury <tomek@ws008.(none)>
Date: Mon, 4 Apr 2011 12:19:56 +0100
Subject: [PATCH] Fix crash when displaying svn directory containing uncommited copies

There's no revision information in such case, just 'copy': True.

To reproduce the problem sun 'svn cp existing-file new-copy; meld .'
---
 meld/vc/svn.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index 2ebbc48..1bff58a 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -94,7 +94,7 @@ class Vc(_vc.CachedVc):
                     if item == "":
                         continue
                     rev = None
-                    if item != "unversioned":
+                    if "revision" in status.attrib:
                         rev = status.attrib["revision"]
                     mydir, name = os.path.split(path)
                     if mydir not in tree_state:
-- 
1.7.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]