[meld/VersionControlRework: 70/123] vcview: Refactor our handling around missing VCs
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/VersionControlRework: 70/123] vcview: Refactor our handling around missing VCs
- Date: Sun, 19 Apr 2015 20:11:53 +0000 (UTC)
commit c79503aeb6939807e05f02c5d774ef548b97882b
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue Mar 31 07:47:13 2015 +1000
vcview: Refactor our handling around missing VCs
meld/vcview.py | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index bfa44ee..83ab8d2 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -322,22 +322,16 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
vcs_model.append([avc.NAME, avc(location), True])
- if not valid_vcs:
- # If we didn't get any valid vcs then fallback to null
- null_vcs = _null.Vc(location)
- vcs.append(null_vcs)
- vcs_model.insert(
- 0, [_("None"), null_vcs, True])
- default_active = 0
-
if default_active == -1:
if valid_vcs:
default_active = min(valid_vcs)
else:
default_active = 0
- # If we only have the null VC, give a better error message.
- if (len(vcs) == 1 and not vcs[0].CMD) or (len(valid_vcs) == 0):
+ if not valid_vcs:
+ # If we didn't get any valid vcs then fallback to null
+ null_vcs = _null.Vc(location)
+ vcs_model.insert(0, [null_vcs.NAME, null_vcs, True])
tooltip = _("No valid version control system found in this folder")
elif len(vcs) == 1:
tooltip = _("Only one version control system found in this folder")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]