diff --git a/SparkleLib/Makefile.am b/SparkleLib/Makefile.am index 51075e07..44d7606a 100644 --- a/SparkleLib/Makefile.am +++ b/SparkleLib/Makefile.am @@ -9,7 +9,7 @@ SOURCES = \ SparkleChangeSet.cs \ SparkleFetcherBase.cs \ SparkleFetcherGit.cs \ - SparkleFetcherMercurial.cs \ + SparkleFetcherHg.cs \ SparkleHelpers.cs \ SparkleListenerBase.cs \ SparkleListenerIrc.cs \ @@ -17,7 +17,7 @@ SOURCES = \ SparklePaths.cs \ SparkleRepoBase.cs \ SparkleRepoGit.cs \ - SparkleRepoMercurial.cs + SparkleRepoHg.cs SMARTIRC4NET_FILES_EXPANDED = $(foreach file, $(SMARTIRC4NET_FILES), $(top_builddir)/$(file)) diff --git a/SparkleLib/SparkleFetcherMercurial.cs b/SparkleLib/SparkleFetcherHg.cs similarity index 100% rename from SparkleLib/SparkleFetcherMercurial.cs rename to SparkleLib/SparkleFetcherHg.cs diff --git a/SparkleLib/SparkleRepoGit.cs b/SparkleLib/SparkleRepoGit.cs index 651771dd..17d2f62d 100644 --- a/SparkleLib/SparkleRepoGit.cs +++ b/SparkleLib/SparkleRepoGit.cs @@ -545,6 +545,7 @@ namespace SparkleLib { Commit (message); } + new public static bool IsRepo (string path) { return System.IO.Directory.Exists (Path.Combine (path, ".git")); diff --git a/SparkleLib/SparkleRepoMercurial.cs b/SparkleLib/SparkleRepoHg.cs similarity index 98% rename from SparkleLib/SparkleRepoMercurial.cs rename to SparkleLib/SparkleRepoHg.cs index 51c5f56c..32b2892e 100644 --- a/SparkleLib/SparkleRepoMercurial.cs +++ b/SparkleLib/SparkleRepoHg.cs @@ -23,9 +23,9 @@ using System.Text.RegularExpressions; namespace SparkleLib { - public class SparkleRepoMercurial : SparkleRepoBase { + public class SparkleRepoHg : SparkleRepoBase { - public SparkleRepoMercurial (string path, SparkleBackend backend) : + public SparkleRepoHg (string path, SparkleBackend backend) : base (path, backend) { } diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index d25cd2f9..f44896f3 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -518,8 +518,8 @@ namespace SparkleShare { if (Directory.Exists (Path.Combine (folder_path, ".git"))) { repo = new SparkleRepoGit (folder_path, SparkleBackend.DefaultBackend); } else if (Directory.Exists (Path.Combine (folder_path, ".hg"))) { - SparkleBackend hg_backend = new SparkleBackend ("Hg", new string [] {"/opt/local/bin/hg"}); - repo = new SparkleRepoMercurial (folder_path, hg_backend); + SparkleBackend hg_backend = new SparkleBackend ("Hg", new string [] {"/opt/local/bin/hg", "/usr/bin/hg"}); + repo = new SparkleRepoHg (folder_path, hg_backend); } repo.NewChangeSet += delegate (SparkleChangeSet change_set, string repository_path) {