git: always get the url to use from the config.xml. Closes #556
This commit is contained in:
parent
86cf28e3ae
commit
f892fd9c11
|
@ -169,7 +169,7 @@ namespace SparkleLib {
|
||||||
public override bool CheckForRemoteChanges ()
|
public override bool CheckForRemoteChanges ()
|
||||||
{
|
{
|
||||||
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Checking for remote changes...");
|
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Checking for remote changes...");
|
||||||
SparkleGit git = new SparkleGit (LocalPath, "ls-remote origin master");
|
SparkleGit git = new SparkleGit (LocalPath, "ls-remote " + Url + " master");
|
||||||
|
|
||||||
git.Start ();
|
git.Start ();
|
||||||
git.WaitForExit ();
|
git.WaitForExit ();
|
||||||
|
@ -201,7 +201,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
SparkleGit git = new SparkleGit (LocalPath,
|
SparkleGit git = new SparkleGit (LocalPath,
|
||||||
"push --progress " + // Redirects progress stats to standarderror
|
"push --progress " + // Redirects progress stats to standarderror
|
||||||
"origin master");
|
Url + " master");
|
||||||
|
|
||||||
git.StartInfo.RedirectStandardError = true;
|
git.StartInfo.RedirectStandardError = true;
|
||||||
git.Start ();
|
git.Start ();
|
||||||
|
@ -258,7 +258,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public override bool SyncDown ()
|
public override bool SyncDown ()
|
||||||
{
|
{
|
||||||
SparkleGit git = new SparkleGit (LocalPath, "fetch --progress");
|
SparkleGit git = new SparkleGit (LocalPath, "fetch --progress " + Url);
|
||||||
|
|
||||||
git.StartInfo.RedirectStandardError = true;
|
git.StartInfo.RedirectStandardError = true;
|
||||||
git.Start ();
|
git.Start ();
|
||||||
|
|
|
@ -60,6 +60,7 @@ namespace SparkleLib {
|
||||||
public readonly SparkleBackend Backend;
|
public readonly SparkleBackend Backend;
|
||||||
public readonly string LocalPath;
|
public readonly string LocalPath;
|
||||||
public readonly string Name;
|
public readonly string Name;
|
||||||
|
public readonly Uri Url;
|
||||||
|
|
||||||
public abstract bool AnyDifferences { get; }
|
public abstract bool AnyDifferences { get; }
|
||||||
public abstract string Identifier { get; }
|
public abstract string Identifier { get; }
|
||||||
|
@ -96,6 +97,8 @@ namespace SparkleLib {
|
||||||
{
|
{
|
||||||
LocalPath = path;
|
LocalPath = path;
|
||||||
Name = Path.GetFileName (LocalPath);
|
Name = Path.GetFileName (LocalPath);
|
||||||
|
Url = new Uri (SparkleConfig.DefaultConfig.GetUrlForFolder (Name));
|
||||||
|
|
||||||
Backend = backend;
|
Backend = backend;
|
||||||
this.poll_interval = this.short_interval;
|
this.poll_interval = this.short_interval;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue