public ActionResult Blame(Guid id, string encodedName, string encodedPath) { ViewBag.ID = id; ViewBag.ShowShortMessageOnly = true; var repo = RepositoryRepository.GetRepository(id); using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, repo.Name))) { var name = PathEncoder.Decode(encodedName); var path = PathEncoder.Decode(encodedPath); string referenceName; var model = browser.GetBlame(name, path, out referenceName); PopulateBranchesData(browser, referenceName); PopulateAddressBarData(path); return(View(model)); } }
public ActionResult Blame(string id, string encodedName, string encodedPath) { ViewBag.ID = id; if (!String.IsNullOrEmpty(id)) { using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, id))) { var name = PathEncoder.Decode(encodedName); var path = PathEncoder.Decode(encodedPath); string referenceName; var model = browser.GetBlame(name, path, out referenceName); PopulateBranchesData(browser, referenceName); PopulateAddressBarData(path); return(View(model)); } } return(HttpNotFound()); }
public ActionResult Blame(string id, string encodedName, string encodedPath) { ViewBag.ID = id; ViewBag.ShowShortMessageOnly = true; if (!String.IsNullOrEmpty(id)) { using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, id))) { var name = PathEncoder.Decode(encodedName); var path = PathEncoder.Decode(encodedPath); string referenceName; var model = browser.GetBlame(name, path, out referenceName); PopulateBranchesData(browser, referenceName); PopulateAddressBarData(path); return View(model); } } return HttpNotFound(); }
public ActionResult Blame(Guid id, string encodedName, string encodedPath) { ViewBag.ID = id; ViewBag.ShowShortMessageOnly = true; var repo = RepositoryRepository.GetRepository(id); using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, repo.Name))) { var name = PathEncoder.Decode(encodedName); var path = PathEncoder.Decode(encodedPath); string referenceName; var model = browser.GetBlame(name, path, out referenceName); model.Logo = new RepositoryLogoDetailModel(repo.Logo); PopulateBranchesData(browser, referenceName); PopulateAddressBarData(path); return View(model); } }