Skip to content

Commit

Permalink
add repo switch support
Browse files Browse the repository at this point in the history
  • Loading branch information
peitaosu committed Aug 20, 2017
1 parent af5fb06 commit 4bb26ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cardiff_Web/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def repo(request):
cardiff.settings["user.email"] = request.GET["useremail"]
cardiff.exec_cmd(["init", request.GET["init"]])
save()
if "repo" in request.GET:
repo_to_switch = os.path.join(repo_path, request.GET["repo"])
cardiff.exec_cmd(["repo", repo_to_switch])
save()
if "branch" in request.GET:
branch_to_switch = request.GET["branch"]
context["branch_ret_str"] = cardiff.exec_cmd(["branch", branch_to_switch])
Expand Down

0 comments on commit 4bb26ca

Please sign in to comment.