meld r1268 - trunk



Author: vincele
Date: Tue Mar 17 23:06:18 2009
New Revision: 1268
URL: http://svn.gnome.org/viewvc/meld?rev=1268&view=rev

Log:
This is the fix from Andrew Beyer for Bug 414365:

Meld cannot diff a file managed by bzr directly
from the command line.

Running meld in a VC directory giving a relative
path to a file within that repository was not
working.

This patch works better (it does not break all VC
plugins like r1209-r1211 were).


Modified:
   trunk/vcview.py

Modified: trunk/vcview.py
==============================================================================
--- trunk/vcview.py	(original)
+++ trunk/vcview.py	Tue Mar 17 23:06:18 2009
@@ -365,8 +365,9 @@
         msg = misc.shelljoin(command)
         yield "[%s] %s" % (self.label_text, msg.replace("\n", u"\u21b2") )
         def relpath(pbase, p):
-            assert p.startswith(pbase)
-            kill = len(pbase) and (len(pbase)+1) or 0
+            kill = 0
+            if p.startswith(pbase):
+                kill = len(pbase) and (len(pbase)+1) or 0
             return p[kill:] or "."
         if len(files) == 1 and os.path.isdir(files[0]):
             workdir = self.vc.get_working_directory(files[0])



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