Merge ~ilasc/launchpad:adjust-merge-instructions-ref-page into launchpad:master

Proposed by Ioana Lasc
Status: Merged
Approved by: Ioana Lasc
Approved revision: ba837e8cbea1bbe01044add5767466507082443f
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ilasc/launchpad:adjust-merge-instructions-ref-page
Merge into: launchpad:master
Diff against target: 44 lines (+4/-4)
2 files modified
lib/lp/code/browser/tests/test_gitref.py (+3/-3)
lib/lp/code/templates/git-macros.pt (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+393608@code.launchpad.net

Commit message

Remove -f from git remote add command

Description of the change

Removing -f from git remote add command on GitRef Page as we are covered by git remote update.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/code/browser/tests/test_gitref.py b/lib/lp/code/browser/tests/test_gitref.py
2index 3fc6efa..28f3512 100644
3--- a/lib/lp/code/browser/tests/test_gitref.py
4+++ b/lib/lp/code/browser/tests/test_gitref.py
5@@ -283,7 +283,7 @@ class TestGitRefView(BrowserTestCase):
6 soupmatchers.Tag(
7 'Git remote add text', 'tt',
8 attrs={"id": "remote-add"},
9- text=("git remote add -f %s "
10+ text=("git remote add %s "
11 "git+ssh://%s@git.launchpad.test/~%s/+git/%s"
12 ) % (self.user.name,
13 self.user.name,
14@@ -328,7 +328,7 @@ class TestGitRefView(BrowserTestCase):
15 soupmatchers.Tag(
16 'Git remote add text', 'tt',
17 attrs={"id": "remote-add"},
18- text=("git remote add -f %s "
19+ text=("git remote add %s "
20 "git+ssh://%s@git.launchpad.test/%s/+source/%s"
21 ) % (eric.name,
22 self.user.name,
23@@ -370,7 +370,7 @@ class TestGitRefView(BrowserTestCase):
24 soupmatchers.Tag(
25 'Git remote add text', 'tt',
26 attrs={"id": "remote-add"},
27- text=("git remote add -f %s git+ssh://%s@git.launchpad.test/%s"
28+ text=("git remote add %s git+ssh://%s@git.launchpad.test/%s"
29 % (eric.name,
30 self.user.name,
31 fooix.name))))
32diff --git a/lib/lp/code/templates/git-macros.pt b/lib/lp/code/templates/git-macros.pt
33index e5c21ad..0c93657 100644
34--- a/lib/lp/code/templates/git-macros.pt
35+++ b/lib/lp/code/templates/git-macros.pt
36@@ -39,7 +39,7 @@
37 <div id="merge-instructions" tal:condition="python:kind == 'branch' and view.user">
38 <dt>Merge guidelines:</dt>
39 <dd>
40- <tt id="remote-add" class="command" tal:content="string:git remote add -f ${context/repository/owner/name} ${view/git_ssh_url}" />
41+ <tt id="remote-add" class="command" tal:content="string:git remote add ${context/repository/owner/name} ${view/git_ssh_url}" />
42 <br />
43 <tt id="remote-update" class="command" tal:content="string:git remote update ${context/repository/owner/name}" />
44 <br />

Subscribers

People subscribed via source and target branches

to status/vote changes: