From 0add8f1f041b6a2a1aa3415c4bf138f25aac8be0 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 7ac257c71a8b2edf07f910c4f91ff247f0f6a82a 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 a92330a19d3aae4127c1b236b529ad07a2897ba5 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 a1130634ec54d26d95945c2d76b45a118ac3876d 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 fba2cdef06eb848a20c7445801f45ccecf0a3ac8 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 8dee6367d6ad67d2bd2c929c413a5f5ffb1ef047 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; + } }