[meld] Cleanup VC plugins code:



commit ad7e687067f8976fd96c4e4826c97b8a31ae6a14
Author: Vincent Legoll <vincent legoll gmail com>
Date:   Wed Apr 22 23:56:19 2009 +0200

    Cleanup VC plugins code:
    - Whitespace
    - Remove useless "\" at EOL
    - Remove PATCH_STRIP_NUM since _vc.Vc parent class already
      define it to the same value
---
 vc/bzr.py      |    2 --
 vc/cvs.py      |    6 ++----
 vc/monotone.py |    1 -
 vc/rcs.py      |    3 +--
 vc/svn.py      |    2 +-
 vc/tla.py      |    4 ++--
 6 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/vc/bzr.py b/vc/bzr.py
index 7c929c4..d02ae7b 100644
--- a/vc/bzr.py
+++ b/vc/bzr.py
@@ -31,7 +31,6 @@ class Vc(_vc.CachedVc):
     CMD = "bzr"
     NAME = "Bazaar-NG"
     VC_DIR = ".bzr"
-    PATCH_STRIP_NUM = 0
     PATCH_INDEX_RE = "^=== modified file '(.*)'$"
 
     def commit_command(self, message):
@@ -107,4 +106,3 @@ class Vc(_vc.CachedVc):
                 state = _vc.STATE_NORMAL
                 retdirs.append( _vc.Dir(path, d, state) )
         return retdirs, retfiles
-
diff --git a/vc/cvs.py b/vc/cvs.py
index 837097a..cab2fe6 100644
--- a/vc/cvs.py
+++ b/vc/cvs.py
@@ -28,7 +28,6 @@ import time
 import misc
 import _vc
 
-
 class Vc(_vc.Vc):
     CMD = "cvs"
     NAME = "CVS"
@@ -149,8 +148,8 @@ class Vc(_vc.Vc):
                 regexes = [ misc.shell_to_regex(i)[:-1] for i in ignored ]
                 ignore_re = re.compile( "(" + "|".join(regexes) + ")" )
             except re.error, e:
-                misc.run_dialog(_("Error converting to a regular expression\n" \
-                                  "The pattern was '%s'\n" \
+                misc.run_dialog(_("Error converting to a regular expression\n"
+                                  "The pattern was '%s'\n"
                                   "The error was '%s'") % (",".join(ignored), e))
         else:
             class dummy(object):
@@ -167,4 +166,3 @@ class Vc(_vc.Vc):
                 retdirs.append( _vc.Dir(path, d, state) )
 
         return retdirs, retfiles
-
diff --git a/vc/monotone.py b/vc/monotone.py
index 7fb4b75..9e1e5f2 100644
--- a/vc/monotone.py
+++ b/vc/monotone.py
@@ -29,7 +29,6 @@ import errno
 class Vc(_vc.CachedVc):
     NAME = "Monotone"
     VC_METADATA = ['MT', '_MTN']
-    PATCH_STRIP_NUM = 0
     PATCH_INDEX_RE = "^[+]{3,3} ([^  ]*)\t[0-9a-f]{40,40}$"
 
     def __init__(self, location):
diff --git a/vc/rcs.py b/vc/rcs.py
index dd47c3d..9bb6726 100644
--- a/vc/rcs.py
+++ b/vc/rcs.py
@@ -30,7 +30,6 @@ class Vc(_vc.Vc):
     NAME = "RCS"
     VC_DIR = "RCS"
     VC_ROOT_WALK = False
-    PATCH_STRIP_NUM = 0
     PATCH_INDEX_RE = "^[+]{3} ([^\t]*)\t.*$"
 
     def commit_command(self, message):
@@ -44,7 +43,7 @@ class Vc(_vc.Vc):
 
     def _get_dirsandfiles(self, directory, dirs, files):
         "files is array of (name, path). Assume all files in same dir."
-        
+
         retfiles = []
         retdirs = [_vc.Dir(x[1], x[0], _vc.STATE_NONE) for x in dirs]
         rcscontents = os.listdir(os.path.join(directory, self.VC_DIR))
diff --git a/vc/svn.py b/vc/svn.py
index aed067b..6d41847 100644
--- a/vc/svn.py
+++ b/vc/svn.py
@@ -59,7 +59,7 @@ class Vc(_vc.Vc):
 
     def _get_matches(self, directory):
         """return a list of tuples (file_path, status_code, revision)"""
-        
+
         while 1:
             try:
                 entries = os.popen("%s status -Nv %s" % (self.CMD, directory))
diff --git a/vc/tla.py b/vc/tla.py
index d5f7c34..911c9c8 100644
--- a/vc/tla.py
+++ b/vc/tla.py
@@ -31,7 +31,7 @@ import _vc
 # D/   deleted directory
 # />   renamed directory
 # -/   directory permissions changed
- 
+
 # A    added file
 # D    deleted file
 # M    file modified
@@ -81,7 +81,7 @@ class Vc(_vc.CachedVc):
 
     def remove_command(self, force=0):
         return [self.CMD, "rm"]
- 
+
     def revert_command(self):
         # Will only work on later versions of tla
         return [self.CMD, "undo", "--"]



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