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 \
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))

View file

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

View file

@ -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) { }

View file

@ -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) {