Merge lp:~gz/bzr/kill_remove_force into lp:bzr

Proposed by Martin Packman
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6548
Proposed branch: lp:~gz/bzr/kill_remove_force
Merge into: lp:bzr
Diff against target: 175 lines (+15/-34)
6 files modified
bzrlib/builtins.py (+2/-8)
bzrlib/tests/blackbox/test_remove.py (+0/-13)
bzrlib/tests/test_conflicts.py (+10/-10)
doc/en/_static/en/bzr-en-quick-reference.svg (+1/-1)
doc/es/_static/es/bzr-es-quick-reference.svg (+1/-1)
doc/ru/_static/ru/bzr-ru-quick-reference.svg (+1/-1)
To merge this branch: bzr merge lp:~gz/bzr/kill_remove_force
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+117074@code.launchpad.net

Commit message

Remove deprecated --force option from remove

Description of the change

Finally removes the deprecated --force option to `bzr rm` which has been replaced with --no-backup.

The message doesn't state it, but Marius landed this for bzr 2.3 so there's been more than enough time to adapt.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) :
review: Approve
Revision history for this message
Martin Packman (gz) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/builtins.py'
2--- bzrlib/builtins.py 2012-07-23 17:56:45 +0000
3+++ bzrlib/builtins.py 2012-07-27 17:41:21 +0000
4@@ -1871,19 +1871,13 @@
5 title='Deletion Strategy', value_switches=True, enum_switch=False,
6 safe='Backup changed files (default).',
7 keep='Delete from bzr but leave the working copy.',
8- no_backup='Don\'t backup changed files.',
9- force='Delete all the specified files, even if they can not be '
10- 'recovered and even if they are non-empty directories. '
11- '(deprecated, use no-backup)')]
12+ no_backup='Don\'t backup changed files.'),
13+ ]
14 aliases = ['rm', 'del']
15 encoding_type = 'replace'
16
17 def run(self, file_list, verbose=False, new=False,
18 file_deletion_strategy='safe'):
19- if file_deletion_strategy == 'force':
20- note(gettext("(The --force option is deprecated, rather use --no-backup "
21- "in future.)"))
22- file_deletion_strategy = 'no-backup'
23
24 tree, file_list = WorkingTree.open_containing_paths(file_list)
25
26
27=== modified file 'bzrlib/tests/blackbox/test_remove.py'
28--- bzrlib/tests/blackbox/test_remove.py 2011-06-14 01:26:41 +0000
29+++ bzrlib/tests/blackbox/test_remove.py 2012-07-27 17:41:21 +0000
30@@ -216,19 +216,6 @@
31 ''')
32 self.assertFilesDeleted(files)
33
34- def test_remove_force_unversioned_files(self):
35- self.build_tree(files)
36- tree = self.make_branch_and_tree('.')
37- script.ScriptRunner().run_script(self, '''
38- $ bzr remove --force a b/ b/c d/
39- 2>(The --force option is deprecated, rather use --no-backup in future.)
40- 2>deleted d
41- 2>removed b/c (but kept a copy: b/c.~1~)
42- 2>deleted b
43- 2>deleted a
44- ''')
45- self.assertFilesDeleted(files)
46-
47 def test_remove_deleted_files(self):
48 tree = self._make_tree_and_add(files)
49 self.run_bzr("commit -m 'added files'")
50
51=== modified file 'bzrlib/tests/test_conflicts.py'
52--- bzrlib/tests/test_conflicts.py 2012-02-23 23:41:51 +0000
53+++ bzrlib/tests/test_conflicts.py 2012-07-27 17:41:21 +0000
54@@ -756,7 +756,7 @@
55
56 def test_take_this(self):
57 self.run_script("""
58-$ bzr rm -q dir --force
59+$ bzr rm -q dir --no-backup
60 $ bzr resolve dir
61 2>2 conflicts resolved, 0 remaining
62 $ bzr commit -q --strict -m 'No more conflicts nor unknown files'
63@@ -785,7 +785,7 @@
64 $ bzr commit -q -m 'Add dir/file2 in branch'
65 $ bzr branch -q . -r 1 ../branch
66 $ cd ../branch
67-$ bzr rm -q dir/file --force
68+$ bzr rm -q dir/file --no-backup
69 $ bzr rm -q dir
70 $ bzr commit -q -m 'Remove dir/file'
71 $ bzr merge ../trunk
72@@ -806,7 +806,7 @@
73 def test_adopt_child(self):
74 self.run_script("""
75 $ bzr mv -q dir/file2 file2
76-$ bzr rm -q dir --force
77+$ bzr rm -q dir --no-backup
78 $ bzr resolve dir
79 2>2 conflicts resolved, 0 remaining
80 $ bzr commit -q --strict -m 'No more conflicts nor unknown files'
81@@ -814,7 +814,7 @@
82
83 def test_kill_them_all(self):
84 self.run_script("""
85-$ bzr rm -q dir --force
86+$ bzr rm -q dir --no-backup
87 $ bzr resolve dir
88 2>2 conflicts resolved, 0 remaining
89 $ bzr commit -q --strict -m 'No more conflicts nor unknown files'
90@@ -845,8 +845,8 @@
91 $ echo 'trunk content' >dir/file
92 $ bzr add -q
93 $ bzr commit -m 'Create trunk' -q
94-$ bzr rm -q dir/file --force
95-$ bzr rm -q dir --force
96+$ bzr rm -q dir/file --no-backup
97+$ bzr rm -q dir --no-backup
98 $ bzr commit -q -m 'Remove dir/file'
99 $ bzr branch -q . -r 1 ../branch
100 $ cd ../branch
101@@ -870,7 +870,7 @@
102 def test_adopt_child(self):
103 self.run_script("""
104 $ bzr mv -q dir/file2 file2
105-$ bzr rm -q dir --force
106+$ bzr rm -q dir --no-backup
107 $ bzr resolve dir
108 2>2 conflicts resolved, 0 remaining
109 $ bzr commit -q --strict -m 'No more conflicts nor unknown files'
110@@ -878,7 +878,7 @@
111
112 def test_kill_them_all(self):
113 self.run_script("""
114-$ bzr rm -q dir --force
115+$ bzr rm -q dir --no-backup
116 $ bzr resolve dir
117 2>2 conflicts resolved, 0 remaining
118 $ bzr commit -q --strict -m 'No more conflicts nor unknown files'
119@@ -1021,7 +1021,7 @@
120
121 def test_take_this(self):
122 self.run_script("""
123-$ bzr rm -q foo.new --force
124+$ bzr rm -q foo.new --no-backup
125 # FIXME: Isn't it weird that foo is now unkown even if foo.new has been put
126 # aside ? -- vila 090916
127 $ bzr add -q foo
128@@ -1032,7 +1032,7 @@
129
130 def test_take_other(self):
131 self.run_script("""
132-$ bzr rm -q foo --force
133+$ bzr rm -q foo --no-backup
134 $ bzr mv -q foo.new foo
135 $ bzr resolve foo
136 2>1 conflict resolved, 0 remaining
137
138=== modified file 'doc/en/_static/en/bzr-en-quick-reference.svg'
139--- doc/en/_static/en/bzr-en-quick-reference.svg 2011-04-20 10:25:40 +0000
140+++ doc/en/_static/en/bzr-en-quick-reference.svg 2012-07-27 17:41:21 +0000
141@@ -531,7 +531,7 @@
142 sodipodi:role="line"
143 x="331.81714"
144 y="264.08142"
145- id="tspan3634">bzr remove --force foo.py</tspan></text>
146+ id="tspan3634">bzr remove --no-backup foo.py</tspan></text>
147 <text
148 xml:space="preserve"
149 style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:30.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;font-family:Bitstream Vera Sans"
150
151=== modified file 'doc/es/_static/es/bzr-es-quick-reference.svg'
152--- doc/es/_static/es/bzr-es-quick-reference.svg 2010-01-29 10:36:23 +0000
153+++ doc/es/_static/es/bzr-es-quick-reference.svg 2012-07-27 17:41:21 +0000
154@@ -634,7 +634,7 @@
155 sodipodi:role="line"
156 x="331.81714"
157 y="264.08142"
158- id="tspan3634">bzr remove --force foo.py</tspan></text>
159+ id="tspan3634">bzr remove --no-backup foo.py</tspan></text>
160 <text
161 xml:space="preserve"
162 style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:30.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;font-family:Bitstream Vera Sans"
163
164=== modified file 'doc/ru/_static/ru/bzr-ru-quick-reference.svg'
165--- doc/ru/_static/ru/bzr-ru-quick-reference.svg 2010-01-29 10:36:23 +0000
166+++ doc/ru/_static/ru/bzr-ru-quick-reference.svg 2012-07-27 17:41:21 +0000
167@@ -621,7 +621,7 @@
168 id="tspan3634"
169 y="266.08142"
170 x="331.81714"
171- sodipodi:role="line">bzr remove --force foo.py</tspan></text>
172+ sodipodi:role="line">bzr remove --no-backup foo.py</tspan></text>
173 <text
174 sodipodi:linespacing="100%"
175 id="text3636"