Skip to content

Commit

Permalink
Merge pull request #70 from Cyberboss/lessannoyance
Browse files Browse the repository at this point in the history
Adds reset message, removes already up to date message, fixes reset logging
  • Loading branch information
Cyberboss authored Jun 23, 2017
2 parents 33a2d6c + ff0d017 commit 6f4bd85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TGServerService/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ string MergeBranch(string branchname)
SendMessage("REPO: Merge conflicted, aborted.");
return "Merge conflict occurred.";
case MergeStatus.UpToDate:
SendMessage("REPO: Merge already up to date!");
return RepoErrorUpToDate;
}
return null;
Expand Down Expand Up @@ -455,10 +454,13 @@ public string Reset(bool trackedBranch)
lock (RepoLock)
{
var res = LoadRepo() ?? ResetNoLock(trackedBranch ? (Repo.Head.TrackedBranch ?? Repo.Head) : Repo.Head);
if (trackedBranch && res == null)
if (res == null)
{
DeletePRList();
SendMessage(String.Format("REPO: Hard reset to {0}branch", trackedBranch ? "tracked " : ""));
if (trackedBranch)
DeletePRList();
TGServerService.WriteInfo(String.Format("Repo branch reset{0}", trackedBranch ? " to tracked branch" : ""), trackedBranch ? TGServerService.EventID.RepoResetTracked : TGServerService.EventID.RepoReset);
return null;
}
TGServerService.WriteWarning(String.Format("Failed to reset{0}: {1}", trackedBranch ? " to tracked branch" : "", res), trackedBranch ? TGServerService.EventID.RepoResetTrackedFail : TGServerService.EventID.RepoResetFail);
return res;
Expand Down

0 comments on commit 6f4bd85

Please sign in to comment.