To review an updated patchset
- git fetch && git checkout ${ticketBranch} && git pull --ff-only
+ git fetch origin && git checkout ${ticketBranch} && git pull --ff-only
To review a rewritten patchset
- git fetch && git checkout ${ticketBranch} && git reset --hard origin/${ticketBranch}
+ git fetch origin && git checkout ${ticketBranch} && git reset --hard origin/${ticketBranch}
};\r
panel.add(pathsView);\r
\r
- addPtReviewInstructions(user, repository, panel);\r
- addGitReviewInstructions(user, repository, panel);\r
+ addPtCheckoutInstructions(user, repository, panel);\r
+ addGitCheckoutInstructions(user, repository, panel);\r
panel.add(createMergePanel(user, repository));\r
\r
return panel;\r
return x;\r
}\r
\r
- protected void addGitReviewInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) {\r
+ protected void addGitCheckoutInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) {\r
panel.add(new Label("gitStep1", MessageFormat.format(getString("gb.stepN"), 1)));\r
panel.add(new Label("gitStep2", MessageFormat.format(getString("gb.stepN"), 2)));\r
\r
String ticketBranch = Repository.shortenRefName(PatchsetCommand.getTicketBranch(ticket.number));\r
\r
- String step1 = "git fetch";\r
+ String step1 = "git fetch origin";\r
String step2 = MessageFormat.format("git checkout {0} && git pull --ff-only\nOR\ngit checkout {0} && git reset --hard origin/{0}", ticketBranch);\r
\r
panel.add(new Label("gitPreStep1", step1));\r
panel.add(createCopyFragment("gitCopyStep2", step2.replace("\n", " && ")));\r
}\r
\r
- protected void addPtReviewInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) {\r
+ protected void addPtCheckoutInstructions(UserModel user, RepositoryModel repository, MarkupContainer panel) {\r
String step1 = MessageFormat.format("pt checkout {0,number,0}", ticket.number);\r
panel.add(new Label("ptPreStep", step1));\r
panel.add(createCopyFragment("ptCopyStep", step1));\r