Further fixes for monotone VC support



Hi Folks

Please find attached two patches to improve monotone support in meld.

The first fixes a regression introduced in meld-1.1.4 (sorry, I should
have tested this *ages* ago).

The second works around a problem in recent monotone releases where the
inventory uses an illegal state (added but unmodified) to describe
recently added files.

-- 
Daniel Thompson (Merlin) <daniel redfelineninja org uk>
signature.asc? http://www.redfelineninja.dsl.pipex.com/signature.html

Did Sigmund's wife wear Freudian slips?

Index: meld-1.1.3/vc/monotone.py
===================================================================
--- meld-1.1.3.orig/vc/monotone.py	2006-06-09 09:48:45.000000000 +0100
+++ meld-1.1.3/vc/monotone.py	2006-06-09 09:51:00.340898000 +0100
@@ -42,7 +42,7 @@
             while where != "/":
                 cur = os.path.join(where,tofind)
                 if os.path.isdir(cur):
-                    return cur
+                    return where
                 where = os.path.dirname(where)
 
         # for monotone >= 0.26
Index: meld-1.1.4/vc/monotone.py
===================================================================
--- meld-1.1.4.orig/vc/monotone.py	2006-07-03 12:11:34.000000000 +0100
+++ meld-1.1.4/vc/monotone.py	2006-07-26 16:44:57.529310000 +0100
@@ -99,7 +99,11 @@
             '  I' : _vc.STATE_IGNORED,  # ignored (exists on the filesystem but excluded by lua hook)
             '  M' : _vc.STATE_MISSING,  # missing (exists in the manifest but not on the filesystem)
 
-            ' A ' : _vc.STATE_ERROR,    # added (invalid, add should have associated patch)
+	    # Added files are not consistantly handled by all releases:
+	    #   0.28: although documented as invalid added files are tagged ' A '.
+	    #   0.26, 0.27: ???
+	    #   0.25: added files are tagged ' AP'.
+            ' A ' : _vc.STATE_NEW,      # added (invalid, add should have associated patch)
             ' AP' : _vc.STATE_NEW,      # added and patched
             ' AU' : _vc.STATE_ERROR,    # added but unknown (invalid)
             ' AI' : _vc.STATE_ERROR,    # added but ignored (seems invalid, but may be possible)


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