[meld/VersionControlRework: 32/123] vc.svn: Make subversion use the commit _get_dirsandfiles version
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/VersionControlRework: 32/123] vc.svn: Make subversion use the commit _get_dirsandfiles version
- Date: Sun, 19 Apr 2015 20:08:40 +0000 (UTC)
commit 3c1db4d9153ed0f9a8d40f67b6df289f54079e30
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Mar 22 09:52:00 2015 +1000
vc.svn: Make subversion use the commit _get_dirsandfiles version
meld/vc/svn.py | 34 +++-------------------------------
1 files changed, 3 insertions(+), 31 deletions(-)
---
diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index 7c64d9c..a5b4bca 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -208,37 +208,9 @@ class Vc(_vc.Vc):
item = status.attrib["item"]
if item == "":
continue
- rev = None
- if "revision" in status.attrib:
- rev = status.attrib["revision"]
state = self.state_map.get(item, _vc.STATE_NONE)
self._tree_cache[path] = state
- self._tree_meta_cache[path] = rev
- def _get_dirsandfiles(self, directory, dirs, files):
- tree = self._get_tree_cache()
-
- retfiles = []
- retdirs = []
-
- for path in sorted(tree.keys()):
- if os.path.dirname(path) != directory:
- continue
-
- name = os.path.basename(path)
-
- isdir = os.path.isdir(path)
- if isdir:
- if os.path.exists(path):
- state = _vc.STATE_NORMAL
- else:
- state = _vc.STATE_MISSING
- # svn adds the directory reported to the status list we get.
- if name != directory:
- retdirs.append( _vc.Dir(path,name,state) )
- else:
- state = self._tree_cache[path]
- rev_label = _("Revision %s") % self._tree_meta_cache[path]
- retfiles.append(_vc.File(path, name, state, options=rev_label))
-
- return retdirs, retfiles
+ rev = status.attrib.get("revision")
+ rev_label = _("Rev %s") % rev if rev is not None else ''
+ self._tree_meta_cache[path] = rev_label
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]