repo: Keep a list of unsynced files
This commit is contained in:
parent
0d0dddd033
commit
0cb7647795
|
@ -761,6 +761,13 @@ namespace SparkleLib.Git {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override List<SparkleChange> UnsyncedChanges {
|
||||||
|
get {
|
||||||
|
return ParseStatus ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public override List<SparkleChangeSet> GetChangeSets ()
|
public override List<SparkleChangeSet> GetChangeSets ()
|
||||||
{
|
{
|
||||||
return GetChangeSetsInternal (null);
|
return GetChangeSetsInternal (null);
|
||||||
|
@ -1137,9 +1144,6 @@ namespace SparkleLib.Git {
|
||||||
git_status.StandardOutput.ReadToEnd ();
|
git_status.StandardOutput.ReadToEnd ();
|
||||||
git_status.WaitForExit ();
|
git_status.WaitForExit ();
|
||||||
|
|
||||||
if (changes.Count == 0)
|
|
||||||
return null;
|
|
||||||
else
|
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ namespace SparkleLib {
|
||||||
public abstract double HistorySize { get; }
|
public abstract double HistorySize { get; }
|
||||||
|
|
||||||
public abstract List<string> ExcludePaths { get; }
|
public abstract List<string> ExcludePaths { get; }
|
||||||
|
public abstract List<SparkleChange> UnsyncedChanges { get; }
|
||||||
public abstract List<SparkleChangeSet> GetChangeSets ();
|
public abstract List<SparkleChangeSet> GetChangeSets ();
|
||||||
public abstract List<SparkleChangeSet> GetChangeSets (string path);
|
public abstract List<SparkleChangeSet> GetChangeSets (string path);
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ namespace SparkleLib {
|
||||||
public readonly string LocalPath;
|
public readonly string LocalPath;
|
||||||
public readonly string Name;
|
public readonly string Name;
|
||||||
public readonly Uri RemoteUrl;
|
public readonly Uri RemoteUrl;
|
||||||
public List<SparkleChangeSet> ChangeSets { get; protected set; }
|
public List<SparkleChangeSet> ChangeSets { get; private set; }
|
||||||
public SyncStatus Status { get; private set; }
|
public SyncStatus Status { get; private set; }
|
||||||
public ErrorStatus Error { get; protected set; }
|
public ErrorStatus Error { get; protected set; }
|
||||||
public bool IsBuffering { get; private set; }
|
public bool IsBuffering { get; private set; }
|
||||||
|
@ -229,7 +230,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public void OnFileActivity (FileSystemEventArgs args)
|
public void OnFileActivity (FileSystemEventArgs args)
|
||||||
{
|
{
|
||||||
if (IsBuffering || this.is_syncing || Status == SyncStatus.Paused)
|
if (IsBuffering || this.is_syncing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (args != null) {
|
if (args != null) {
|
||||||
|
@ -239,6 +240,11 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Status == SyncStatus.Paused) {
|
||||||
|
ChangesDetected ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lock (this.buffer_lock) {
|
lock (this.buffer_lock) {
|
||||||
if (IsBuffering || this.is_syncing || !HasLocalChanges)
|
if (IsBuffering || this.is_syncing || !HasLocalChanges)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue