From d900a5982e209a3903c34a6aca0217cdb8f63c97 Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Fri, 23 Mar 2012 01:37:22 +0100 Subject: [PATCH 1/6] Support for lower case repositories. (Like bitbucket wants it) --- SparkleShare/SparklePlugin.cs | 9 +++++++++ SparkleShare/SparkleSetupController.cs | 3 +++ 2 files changed, 12 insertions(+) diff --git a/SparkleShare/SparklePlugin.cs b/SparkleShare/SparklePlugin.cs index dc32ed60..1fe18d60 100644 --- a/SparkleShare/SparklePlugin.cs +++ b/SparkleShare/SparklePlugin.cs @@ -94,6 +94,15 @@ namespace SparkleShare { return GetValue ("info", "announcements_url"); } } + + public Boolean LowerCaseOnly { + get { + if (GetValue ("info", "lower_case_only").Equals ("true")) + return true; + else + return false; + } + } private XmlDocument xml = new XmlDocument (); diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 45e429ee..38914157 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -316,6 +316,9 @@ namespace SparkleShare { remote_path = remote_path.Trim (); remote_path = remote_path.TrimEnd ("/".ToCharArray ()); + if (SelectedPlugin.LowerCaseOnly) + remote_path = remote_path.ToLower (); + SyncingFolder = Path.GetFileNameWithoutExtension (remote_path); PreviousAddress = address; PreviousPath = remote_path; From 6191b4fc88cf6823ef11d071c10d7b82dd11b0d7 Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Fri, 23 Mar 2012 01:56:35 +0100 Subject: [PATCH 2/6] Now using spaces instead of tabs. Also changed the name from lower_case_only to lower_case_path --- SparkleShare/SparklePlugin.cs | 10 +++++----- SparkleShare/SparkleSetupController.cs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SparkleShare/SparklePlugin.cs b/SparkleShare/SparklePlugin.cs index 1fe18d60..f1b06592 100644 --- a/SparkleShare/SparklePlugin.cs +++ b/SparkleShare/SparklePlugin.cs @@ -95,12 +95,12 @@ namespace SparkleShare { } } - public Boolean LowerCaseOnly { - get { - if (GetValue ("info", "lower_case_only").Equals ("true")) - return true; + public Boolean LowerCasePath { + get { + if (GetValue ("info", "lower_case_path").Equals ("true")) + return true; else - return false; + return false; } } diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 38914157..2bce0cab 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -316,8 +316,8 @@ namespace SparkleShare { remote_path = remote_path.Trim (); remote_path = remote_path.TrimEnd ("/".ToCharArray ()); - if (SelectedPlugin.LowerCaseOnly) - remote_path = remote_path.ToLower (); + if (SelectedPlugin.LowerCasePath) + remote_path = remote_path.ToLower (); SyncingFolder = Path.GetFileNameWithoutExtension (remote_path); PreviousAddress = address; From a67d9af17ce43f50288fc41d5bba42ae6f3eec9e Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Fri, 23 Mar 2012 02:01:37 +0100 Subject: [PATCH 3/6] Made appropriate changes to the bitbucket.xml.in to support lower_case_path --- data/plugins/bitbucket.xml.in | 1 + 1 file changed, 1 insertion(+) diff --git a/data/plugins/bitbucket.xml.in b/data/plugins/bitbucket.xml.in index 800b8bcb..302a39aa 100644 --- a/data/plugins/bitbucket.xml.in +++ b/data/plugins/bitbucket.xml.in @@ -6,6 +6,7 @@ <_description>Free code hosting for Git and Mercurial bitbucket.png Git + true
ssh://git@bitbucket.org/ From f8b156fb4462ab2ee669abc96584149c62337cd0 Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Fri, 23 Mar 2012 16:28:02 +0100 Subject: [PATCH 4/6] Hopefully fixed the alignment problem --- SparkleShare/SparkleSetupController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 2bce0cab..da7500ac 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -315,9 +315,9 @@ namespace SparkleShare { address = address.Trim (); remote_path = remote_path.Trim (); remote_path = remote_path.TrimEnd ("/".ToCharArray ()); - - if (SelectedPlugin.LowerCasePath) - remote_path = remote_path.ToLower (); + + if (SelectedPlugin.LowerCasePath) + remote_path = remote_path.ToLower (); SyncingFolder = Path.GetFileNameWithoutExtension (remote_path); PreviousAddress = address; From 783f51a763da374f8f61e7f31f7f5509387c59d2 Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Fri, 23 Mar 2012 16:31:18 +0100 Subject: [PATCH 5/6] Hopefully aligned SparklePlugin file as well --- SparkleShare/SparklePlugin.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SparkleShare/SparklePlugin.cs b/SparkleShare/SparklePlugin.cs index f1b06592..75dfd62f 100644 --- a/SparkleShare/SparklePlugin.cs +++ b/SparkleShare/SparklePlugin.cs @@ -95,14 +95,14 @@ namespace SparkleShare { } } - public Boolean LowerCasePath { + public Boolean LowerCasePath { get { if (GetValue ("info", "lower_case_path").Equals ("true")) return true; else return false; - } - } + } + } private XmlDocument xml = new XmlDocument (); From 82e9d0da2470f8ed95841eef01e0740f42bfa505 Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Fri, 23 Mar 2012 16:33:48 +0100 Subject: [PATCH 6/6] Second attempt at aligning SparklePlugin --- SparkleShare/SparklePlugin.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SparkleShare/SparklePlugin.cs b/SparkleShare/SparklePlugin.cs index 75dfd62f..34277b78 100644 --- a/SparkleShare/SparklePlugin.cs +++ b/SparkleShare/SparklePlugin.cs @@ -96,12 +96,12 @@ namespace SparkleShare { } public Boolean LowerCasePath { - get { - if (GetValue ("info", "lower_case_path").Equals ("true")) - return true; - else - return false; - } + get { + if (GetValue ("info", "lower_case_path").Equals ("true")) + return true; + else + return false; + } }