[meld/VersionControlRework: 6/123] meld.vc: Get rid of the revision column, and rename "options"



commit 16c4973fcc00bb64e7c5b19bbabd9681ac5c2b2f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Mar 21 14:23:40 2015 +1000

    meld.vc: Get rid of the revision column, and rename "options"

 meld/vc/__init__.py |    2 +-
 meld/vc/svn.py      |    6 ++++--
 meld/vcview.py      |    8 +++-----
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/meld/vc/__init__.py b/meld/vc/__init__.py
index 10f3ffe..79ac3a4 100644
--- a/meld/vc/__init__.py
+++ b/meld/vc/__init__.py
@@ -25,7 +25,7 @@
 
 import importlib
 from . import _null
-from ._vc import DATA_NAME, DATA_STATE, DATA_REVISION, DATA_OPTIONS
+from ._vc import DATA_NAME, DATA_STATE, DATA_OPTIONS
 
 # FIXME: This is a horrible hack to help cx_Freeze pick up these plugins when
 # freezing the distributable package.
diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index cceb338..35c2454 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -31,6 +31,7 @@ import tempfile
 import xml.etree.ElementTree as ElementTree
 import subprocess
 
+from meld.conf import _
 from . import _vc
 
 
@@ -41,7 +42,7 @@ class Vc(_vc.Vc):
     VC_DIR = ".svn"
     VC_ROOT_WALK = True
 
-    VC_COLUMNS = (_vc.DATA_NAME, _vc.DATA_STATE, _vc.DATA_REVISION)
+    VC_COLUMNS = (_vc.DATA_NAME, _vc.DATA_STATE, _vc.DATA_OPTIONS)
 
     state_map = {
         "unversioned": _vc.STATE_NONE,
@@ -253,6 +254,7 @@ class Vc(_vc.Vc):
                     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))
+                rev_label = _("Revision %s") % rev
+                retfiles.append(_vc.File(path, name, state, options=rev_label))
 
         return retdirs, retfiles
diff --git a/meld/vcview.py b/meld/vcview.py
index c699b6a..04a3a60 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -118,8 +118,8 @@ class ConsoleStream(object):
         self.textview.scroll_mark_onscreen(self.end_mark)
 
 
-COL_LOCATION, COL_STATUS, COL_REVISION, COL_OPTIONS, COL_END = \
-    list(range(tree.COL_END, tree.COL_END + 5))
+COL_LOCATION, COL_STATUS, COL_OPTIONS, COL_END = \
+    list(range(tree.COL_END, tree.COL_END + 4))
 
 
 class VcTreeStore(tree.DiffTreeStore):
@@ -232,8 +232,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
 
         self.treeview_column_location = addCol(_("Location"), COL_LOCATION)
         addCol(_("Status"), COL_STATUS, vc.DATA_STATE)
-        addCol(_("Revision"), COL_REVISION, vc.DATA_REVISION)
-        addCol(_("Options"), COL_OPTIONS, vc.DATA_OPTIONS)
+        addCol(_("Extra"), COL_OPTIONS, vc.DATA_OPTIONS)
 
         self.consolestream = ConsoleStream(self.consoleview)
         self.location = None
@@ -821,7 +820,6 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
             self.model.set_value(it, self.model.column_index(col, 0), val)
         setcol(COL_LOCATION, location)
         setcol(COL_STATUS, e.get_status())
-        setcol(COL_REVISION, e.rev)
         setcol(COL_OPTIONS, e.options)
 
     def on_file_changed(self, filename):


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