[meld] Add states to version control (bgo#701970)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Add states to version control (bgo#701970)
- Date: Sat, 24 May 2014 20:52:26 +0000 (UTC)
commit e2b4248809f24f043e6e8539ee8d1439d35bdfa0
Author: Louis des Landes <louis psykar com>
Date: Tue May 20 00:08:23 2014 +1000
Add states to version control (bgo#701970)
meld/tree.py | 2 ++
meld/vc/_vc.py | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/meld/tree.py b/meld/tree.py
index c4a479e..0e18df6 100644
--- a/meld/tree.py
+++ b/meld/tree.py
@@ -81,6 +81,7 @@ class DiffTreeStore(Gtk.TreeStore):
(unk_fg, italic, normal, None), # STATE_EMPTY
(new_fg, roman, bold, None), # STATE_NEW
(mod_fg, roman, bold, None), # STATE_MODIFIED
+ (mod_fg, roman, normal, None), # STATE_RENAMED
(con_fg, roman, bold, None), # STATE_CONFLICT
(del_fg, roman, bold, True), # STATE_REMOVED
(del_fg, roman, bold, True), # STATE_MISSING
@@ -97,6 +98,7 @@ class DiffTreeStore(Gtk.TreeStore):
(None, None , None, None), # EMPTY
("text-x-generic", "folder", new_fg, None), # NEW
("text-x-generic", "folder", mod_fg, None), # MODIFIED
+ ("text-x-generic", "folder", mod_fg, None), # RENAMED
("text-x-generic", "folder", con_fg, None), # CONFLICT
("text-x-generic", "folder", del_fg, None), # REMOVED
("text-x-generic", "folder", unk_fg, unk_fg), # MISSING
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index be905c8..94740e9 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -30,12 +30,12 @@ from meld.conf import _
# ignored, new, normal, ignored changes,
# error, placeholder, vc added
-# vc modified, vc conflict, vc removed
+# vc modified, vc renamed, vc conflict, vc removed
# locally removed, end
(STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE,
STATE_ERROR, STATE_EMPTY, STATE_NEW,
- STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED,
- STATE_MISSING, STATE_NONEXIST, STATE_MAX) = list(range(13))
+ STATE_MODIFIED, STATE_RENAMED, STATE_CONFLICT, STATE_REMOVED,
+ STATE_MISSING, STATE_NONEXIST, STATE_MAX) = list(range(14))
# VC conflict types
(CONFLICT_MERGED, CONFLICT_BASE, CONFLICT_LOCAL,
@@ -69,6 +69,7 @@ class Entry(object):
STATE_EMPTY: "",
STATE_NEW: _("Newly added"),
STATE_MODIFIED: _("Modified"),
+ STATE_RENAMED: _("Renamed"),
STATE_CONFLICT: "<b>%s</b>" % _("Conflict"),
STATE_REMOVED: _("Removed"),
STATE_MISSING: _("Missing"),
@@ -93,11 +94,11 @@ class Entry(object):
class Dir(Entry):
- def __init__(self, path, name, state):
+ def __init__(self, path, name, state, options=None):
Entry.__init__(self, path, name, state)
self.isdir = 1
self.rev = ""
- self.options = ""
+ self.options = options
class File(Entry):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]