[meld] Clean up _vc.File creation, to make way for options usage
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Clean up _vc.File creation, to make way for options usage
- Date: Fri, 30 Nov 2012 19:29:22 +0000 (UTC)
commit 88abdc9810bae0c9ec5674ff5ba6dfe811ec58c8
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Oct 27 08:58:36 2012 +1000
Clean up _vc.File creation, to make way for options usage
meld/vc/_null.py | 2 +-
meld/vc/bzr.py | 7 +++----
meld/vc/cvs.py | 6 +++---
meld/vc/fossil.py | 6 ++----
meld/vc/monotone.py | 7 +++----
meld/vc/rcs.py | 2 +-
meld/vc/svn.py | 3 +--
7 files changed, 14 insertions(+), 19 deletions(-)
---
diff --git a/meld/vc/_null.py b/meld/vc/_null.py
index 9fefdaa..c3cee00 100644
--- a/meld/vc/_null.py
+++ b/meld/vc/_null.py
@@ -48,5 +48,5 @@ class Vc(_vc.Vc):
def lookup_files(self, dirs, files):
"files is array of (name, path). assume all files in same dir"
d = [_vc.Dir(x[1], x[0], _vc.STATE_NONE) for x in dirs]
- f = [_vc.File(x[1], x[0], _vc.STATE_NONE, None) for x in files]
+ f = [_vc.File(x[1], x[0], _vc.STATE_NONE) for x in files]
return d, f
diff --git a/meld/vc/bzr.py b/meld/vc/bzr.py
index 7b63db6..de16784 100644
--- a/meld/vc/bzr.py
+++ b/meld/vc/bzr.py
@@ -119,17 +119,16 @@ class Vc(_vc.CachedVc):
mydir, name = os.path.split(mydir)
if mydir != directory:
continue
- rev, options, tag = "","",""
if path.endswith('/'):
- retdirs.append( _vc.Dir(path[:-1], name, state))
+ retdirs.append(_vc.Dir(path[:-1], name, state))
else:
- retfiles.append( _vc.File(path, name, state, rev, tag, options) )
+ retfiles.append(_vc.File(path, name, state))
bzrfiles[name] = 1
for f,path in files:
if f not in bzrfiles:
#state = ignore_re.match(f) is None and _vc.STATE_NONE or _vc.STATE_IGNORED
state = _vc.STATE_NORMAL
- retfiles.append( _vc.File(path, f, state, "") )
+ retfiles.append(_vc.File(path, f, state))
for d,path in dirs:
if d not in bzrfiles:
#state = ignore_re.match(f) is None and _vc.STATE_NONE or _vc.STATE_IGNORED
diff --git a/meld/vc/cvs.py b/meld/vc/cvs.py
index d3f2df3..c1deb55 100644
--- a/meld/vc/cvs.py
+++ b/meld/vc/cvs.py
@@ -70,7 +70,7 @@ class Vc(_vc.Vc):
entries = entries.replace("\r","\n").replace("\n\n","\n")
except IOError as e: # no cvs dir
d = [_vc.Dir(x[1], x[0], _vc.STATE_NONE) for x in dirs]
- f = [_vc.File(x[1], x[0], _vc.STATE_NONE, None) for x in files]
+ f = [_vc.File(x[1], x[0], _vc.STATE_NONE) for x in files]
return d, f
try:
@@ -142,7 +142,7 @@ class Vc(_vc.Vc):
state = _vc.STATE_NORMAL
else:
state = _vc.STATE_MODIFIED
- retfiles.append( _vc.File(path, name, state, rev, tag, options) )
+ retfiles.append(_vc.File(path, name, state, rev, tag, options))
# known
cvsfiles = [x[1] for x in matches]
# ignored
@@ -171,7 +171,7 @@ class Vc(_vc.Vc):
for f,path in files:
if f not in cvsfiles:
state = ignore_re.match(f) is None and _vc.STATE_NONE or _vc.STATE_IGNORED
- retfiles.append( _vc.File(path, f, state, "") )
+ retfiles.append(_vc.File(path, f, state))
for d,path in dirs:
if d not in cvsfiles:
state = ignore_re.match(d) is None and _vc.STATE_NONE or _vc.STATE_IGNORED
diff --git a/meld/vc/fossil.py b/meld/vc/fossil.py
index 9cc1ef6..680fc68 100644
--- a/meld/vc/fossil.py
+++ b/meld/vc/fossil.py
@@ -144,12 +144,10 @@ class Vc(_vc.CachedVc):
if e.errno != errno.EAGAIN:
raise
- options, tag = "", ""
if path.endswith('/'):
retdirs.append(_vc.Dir(path[:-1], name, state))
else:
- retfiles.append(_vc.File(path, name, state, rev, tag,
- options))
+ retfiles.append(_vc.File(path, name, state, rev))
vcfiles[name] = 1
for f, path in files:
@@ -169,7 +167,7 @@ class Vc(_vc.CachedVc):
# If it ain't listed by the inventory it's not under version
# control
state = _vc.STATE_NONE
- retfiles.append(_vc.File(path, f, state, ""))
+ retfiles.append(_vc.File(path, f, state))
for d, path in dirs:
if d not in vcfiles:
diff --git a/meld/vc/monotone.py b/meld/vc/monotone.py
index 36edf05..bc29827 100644
--- a/meld/vc/monotone.py
+++ b/meld/vc/monotone.py
@@ -240,11 +240,10 @@ class Vc(_vc.CachedVc):
mydir, name = os.path.split(mydir)
if mydir != directory:
continue
- rev, options, tag = "","",""
if path.endswith('/'):
- retdirs.append( _vc.Dir(path[:-1], name, state))
+ retdirs.append(_vc.Dir(path[:-1], name, state))
else:
- retfiles.append( _vc.File(path, name, state, rev, tag, options) )
+ retfiles.append(_vc.File(path, name, state))
vcfiles[name] = 1
for f,path in files:
if f not in vcfiles:
@@ -257,7 +256,7 @@ class Vc(_vc.CachedVc):
# if it ain't listed by the inventory it's not under version
# control
state = _vc.STATE_NONE
- retfiles.append( _vc.File(path, f, state, "") )
+ retfiles.append(_vc.File(path, f, state))
for d,path in dirs:
if d not in vcfiles:
# if the ignore MT filter is not enabled these will crop up
diff --git a/meld/vc/rcs.py b/meld/vc/rcs.py
index 8193ad4..3ac155d 100644
--- a/meld/vc/rcs.py
+++ b/meld/vc/rcs.py
@@ -72,6 +72,6 @@ class Vc(_vc.Vc):
print "Error getting state of file %s: %d" % (path, result)
state = _vc.STATE_ERROR
- retfiles.append(_vc.File(path, name, state, "", "", ""))
+ retfiles.append(_vc.File(path, name, state))
return retdirs, retfiles
diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index d565eca..24de407 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -128,7 +128,6 @@ class Vc(_vc.CachedVc):
path = os.path.join(directory, name)
isdir = os.path.isdir(path)
- options = ""
if isdir:
if os.path.exists(path):
state = _vc.STATE_NORMAL
@@ -139,6 +138,6 @@ class Vc(_vc.CachedVc):
retdirs.append( _vc.Dir(path,name,state) )
else:
state = self.state_map.get(svn_state, _vc.STATE_NONE)
- retfiles.append( _vc.File(path, name, state, rev, "", options) )
+ retfiles.append(_vc.File(path, name, state, rev))
return retdirs, retfiles
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]