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 ()
|
||||
{
|
||||
return GetChangeSetsInternal (null);
|
||||
|
@ -1136,11 +1143,8 @@ namespace SparkleLib.Git {
|
|||
|
||||
git_status.StandardOutput.ReadToEnd ();
|
||||
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 List<string> ExcludePaths { get; }
|
||||
public abstract List<SparkleChange> UnsyncedChanges { get; }
|
||||
public abstract List<SparkleChangeSet> GetChangeSets ();
|
||||
public abstract List<SparkleChangeSet> GetChangeSets (string path);
|
||||
|
||||
|
@ -83,7 +84,7 @@ namespace SparkleLib {
|
|||
public readonly string LocalPath;
|
||||
public readonly string Name;
|
||||
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 ErrorStatus Error { get; protected set; }
|
||||
public bool IsBuffering { get; private set; }
|
||||
|
@ -229,7 +230,7 @@ namespace SparkleLib {
|
|||
|
||||
public void OnFileActivity (FileSystemEventArgs args)
|
||||
{
|
||||
if (IsBuffering || this.is_syncing || Status == SyncStatus.Paused)
|
||||
if (IsBuffering || this.is_syncing)
|
||||
return;
|
||||
|
||||
if (args != null) {
|
||||
|
@ -238,6 +239,11 @@ namespace SparkleLib {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Status == SyncStatus.Paused) {
|
||||
ChangesDetected ();
|
||||
return;
|
||||
}
|
||||
|
||||
lock (this.buffer_lock) {
|
||||
if (IsBuffering || this.is_syncing || !HasLocalChanges)
|
||||
|
|
Loading…
Reference in a new issue