Beispiel #1
0
		private void HandleBtnDefaultGitActionForAllStarted ()
		{
			if (this.syncConfig != null) {

				syncOutputWidget.ClearContent ();

				var entries = repoTreeViewWidget.GetCheckedEntries ();

				if (entries.Count > 0) {
					var gitService = new GitService ();

					foreach (var entry in entries) {
						ICommandResponse response = null;
						switch (entry.DefaultGitAction) {
						case DefaultGitAction.Pull:
							response = gitService.Pull (entry);
							break;
						case DefaultGitAction.Push:
							response = gitService.Push (entry);
							break;
						}

						syncOutputWidget.Content (response.Success, 
					                         entry.Name, 
					                         MakeTitle (entry) + response.Msg + EntryFooter);
					}
				}
			}
		}
Beispiel #2
0
		public static void Main (string[] args)
		{
			if (args != null && args.Length != 1) {
				throw new ArgumentOutOfRangeException("Provide config file name!");
			}

			string configFilename = args[0];

			// get configuration...
			var service = new JsonService(new IoService());
			service.Init(configFilename);

			var config = service.SyncConfig;

			// git pull...
			var gitService = new GitService();
			foreach (var entry in config.Entries) {
				var response = gitService.Pull(entry);
				Console.WriteLine ("response was: " + response.Msg);
			}

		}