use shorter Hg as class names instead of Mercurial

This commit is contained in:
Hylke Bons 2011-05-22 01:15:46 +01:00
parent 359ec616f9
commit fbfd8885ed
5 changed files with 7 additions and 6 deletions

View file

@ -9,7 +9,7 @@ SOURCES = \
SparkleChangeSet.cs \ SparkleChangeSet.cs \
SparkleFetcherBase.cs \ SparkleFetcherBase.cs \
SparkleFetcherGit.cs \ SparkleFetcherGit.cs \
SparkleFetcherMercurial.cs \ SparkleFetcherHg.cs \
SparkleHelpers.cs \ SparkleHelpers.cs \
SparkleListenerBase.cs \ SparkleListenerBase.cs \
SparkleListenerIrc.cs \ SparkleListenerIrc.cs \
@ -17,7 +17,7 @@ SOURCES = \
SparklePaths.cs \ SparklePaths.cs \
SparkleRepoBase.cs \ SparkleRepoBase.cs \
SparkleRepoGit.cs \ SparkleRepoGit.cs \
SparkleRepoMercurial.cs SparkleRepoHg.cs
SMARTIRC4NET_FILES_EXPANDED = $(foreach file, $(SMARTIRC4NET_FILES), $(top_builddir)/$(file)) SMARTIRC4NET_FILES_EXPANDED = $(foreach file, $(SMARTIRC4NET_FILES), $(top_builddir)/$(file))

View file

@ -545,6 +545,7 @@ namespace SparkleLib {
Commit (message); Commit (message);
} }
new public static bool IsRepo (string path) new public static bool IsRepo (string path)
{ {
return System.IO.Directory.Exists (Path.Combine (path, ".git")); return System.IO.Directory.Exists (Path.Combine (path, ".git"));

View file

@ -23,9 +23,9 @@ using System.Text.RegularExpressions;
namespace SparkleLib { 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) { } base (path, backend) { }

View file

@ -518,8 +518,8 @@ namespace SparkleShare {
if (Directory.Exists (Path.Combine (folder_path, ".git"))) { if (Directory.Exists (Path.Combine (folder_path, ".git"))) {
repo = new SparkleRepoGit (folder_path, SparkleBackend.DefaultBackend); repo = new SparkleRepoGit (folder_path, SparkleBackend.DefaultBackend);
} else if (Directory.Exists (Path.Combine (folder_path, ".hg"))) { } else if (Directory.Exists (Path.Combine (folder_path, ".hg"))) {
SparkleBackend hg_backend = new SparkleBackend ("Hg", new string [] {"/opt/local/bin/hg"}); SparkleBackend hg_backend = new SparkleBackend ("Hg", new string [] {"/opt/local/bin/hg", "/usr/bin/hg"});
repo = new SparkleRepoMercurial (folder_path, hg_backend); repo = new SparkleRepoHg (folder_path, hg_backend);
} }
repo.NewChangeSet += delegate (SparkleChangeSet change_set, string repository_path) { repo.NewChangeSet += delegate (SparkleChangeSet change_set, string repository_path) {