[meld/VersionControlRework: 85/123] vc._vc: Add filter helpers to Entry, for future use in vcview
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/VersionControlRework: 85/123] vc._vc: Add filter helpers to Entry, for future use in vcview
- Date: Sun, 19 Apr 2015 20:13:08 +0000 (UTC)
commit c8bd35b649298fa7c7a4979fcf090f8dae4bf9d4
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Apr 11 08:15:33 2015 +1000
vc._vc: Add filter helpers to Entry, for future use in vcview
meld/vc/_vc.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index f777bf3..1d10573 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -101,6 +101,20 @@ class Entry(object):
"""Should this Entry actually be present on the file system"""
return self.state not in (STATE_REMOVED, STATE_MISSING)
+ def is_modified(self):
+ return self.state >= STATE_NEW or (
+ self.isdir and (self.state > STATE_NONE))
+
+ def is_normal(self):
+ return self.state == STATE_NORMAL
+
+ def is_nonvc(self):
+ return self.state == STATE_NONE or (
+ self.isdir and (self.state > STATE_IGNORED))
+
+ def is_ignored(self):
+ return self.state == STATE_IGNORED or self.isdir
+
class Vc(object):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]