statusicon setup: Warn about incompatible versions, fetch history by default in Linux. #1478

This commit is contained in:
Hylke Bons 2014-04-22 10:28:50 +01:00
parent a9316f546c
commit 5f94cdc539
4 changed files with 14 additions and 6 deletions

View file

@ -734,9 +734,12 @@ namespace SparkleLib.Git {
line.StartsWith ("ssh_exchange_identification: Connection closed by remote host")) {
Error = ErrorStatus.AuthenticationFailed;
} else if (line.EndsWith ("does not appear to be a git repository")) {
Error = ErrorStatus.NotFound;
Error = ErrorStatus.NotFound;
} else if (line.EndsWith ("expected old/new/ref, got 'shallow")) {
Error = ErrorStatus.IncompatibleClientServer;
} else if (line.StartsWith ("error: Disk space exceeded") ||
line.EndsWith ("No space left on device")) {

View file

@ -39,7 +39,8 @@ namespace SparkleLib {
AuthenticationFailed,
DiskSpaceExceeded,
UnreadableFiles,
NotFound
NotFound,
IncompatibleClientServer
}

View file

@ -312,13 +312,14 @@ namespace SparkleShare {
add_button.Clicked += delegate { Controller.AddPageCompleted (address_entry.Text, path_entry.Text); };
CheckButton check_button = new CheckButton ("Fetch prior history") { Active = false };
CheckButton check_button = new CheckButton ("Fetch prior history") { Active = true };
check_button.Toggled += delegate { Controller.HistoryItemChanged (check_button.Active); };
AddOption (check_button);
AddButton (cancel_button);
AddButton (add_button);
Controller.HistoryItemChanged (check_button.Active);
Controller.CheckAddPage (address_entry.Text, path_entry.Text, 1);
}

View file

@ -298,9 +298,12 @@ namespace SparkleShare {
} else if (repo.Error == ErrorStatus.UnreadableFiles) {
folder_errors.Add ("Some local files are unreadable or in use");
} else if (repo.Error == ErrorStatus.NotFound) {
folder_errors.Add ("Project doesn't exist on host");
folder_errors.Add ("Project doesn't exist on host");
} else if (repo.Error == ErrorStatus.IncompatibleClientServer) {
folder_errors.Add ("Incompatible client/server versions");
} else {
folder_errors.Add ("");