##// END OF EJS Templates
rename: quote hg commands in warnings...
Martin von Zweigbergk -
r39384:cde75233 default
parent child Browse files
Show More
@@ -1207,17 +1207,17 b' def copy(ui, repo, pats, opts, rename=Fa'
1207 else:
1207 else:
1208 flags = '--force'
1208 flags = '--force'
1209 if rename:
1209 if rename:
1210 hint = _('(hg rename %s to replace the file by '
1210 hint = _("('hg rename %s' to replace the file by "
1211 'recording a rename)\n') % flags
1211 'recording a rename)\n') % flags
1212 else:
1212 else:
1213 hint = _('(hg copy %s to replace the file by '
1213 hint = _("('hg copy %s' to replace the file by "
1214 'recording a copy)\n') % flags
1214 'recording a copy)\n') % flags
1215 else:
1215 else:
1216 msg = _('%s: not overwriting - file exists\n')
1216 msg = _('%s: not overwriting - file exists\n')
1217 if rename:
1217 if rename:
1218 hint = _('(hg rename --after to record the rename)\n')
1218 hint = _("('hg rename --after' to record the rename)\n")
1219 else:
1219 else:
1220 hint = _('(hg copy --after to record the copy)\n')
1220 hint = _("('hg copy --after' to record the copy)\n")
1221 ui.warn(msg % reltarget)
1221 ui.warn(msg % reltarget)
1222 ui.warn(hint)
1222 ui.warn(hint)
1223 return
1223 return
@@ -224,12 +224,12 b' foo was clean:'
224 Trying to copy on top of an existing file fails,
224 Trying to copy on top of an existing file fails,
225 $ hg copy -A bar foo
225 $ hg copy -A bar foo
226 foo: not overwriting - file already committed
226 foo: not overwriting - file already committed
227 (hg copy --after --force to replace the file by recording a copy)
227 ('hg copy --after --force' to replace the file by recording a copy)
228 same error without the --after, so the user doesn't have to go through
228 same error without the --after, so the user doesn't have to go through
229 two hints:
229 two hints:
230 $ hg copy bar foo
230 $ hg copy bar foo
231 foo: not overwriting - file already committed
231 foo: not overwriting - file already committed
232 (hg copy --force to replace the file by recording a copy)
232 ('hg copy --force' to replace the file by recording a copy)
233 but it's considered modified after a copy --after --force
233 but it's considered modified after a copy --after --force
234 $ hg copy -Af bar foo
234 $ hg copy -Af bar foo
235 $ hg st -AC foo
235 $ hg st -AC foo
@@ -240,6 +240,6 b' mention --force:'
240 $ touch xyzzy
240 $ touch xyzzy
241 $ hg cp bar xyzzy
241 $ hg cp bar xyzzy
242 xyzzy: not overwriting - file exists
242 xyzzy: not overwriting - file exists
243 (hg copy --after to record the copy)
243 ('hg copy --after' to record the copy)
244
244
245 $ cd ..
245 $ cd ..
@@ -266,7 +266,7 b' overwrite existing files (d2/b)'
266
266
267 $ hg rename d1/* d2
267 $ hg rename d1/* d2
268 d2/b: not overwriting - file already committed
268 d2/b: not overwriting - file already committed
269 (hg rename --force to replace the file by recording a rename)
269 ('hg rename --force' to replace the file by recording a rename)
270 moving d1/d11/a1 to d2/d11/a1
270 moving d1/d11/a1 to d2/d11/a1
271 $ hg status -C
271 $ hg status -C
272 A d2/a
272 A d2/a
@@ -371,7 +371,7 b' attempt to overwrite an existing file'
371 $ echo "ca" > d1/ca
371 $ echo "ca" > d1/ca
372 $ hg rename d1/ba d1/ca
372 $ hg rename d1/ba d1/ca
373 d1/ca: not overwriting - file exists
373 d1/ca: not overwriting - file exists
374 (hg rename --after to record the rename)
374 ('hg rename --after' to record the rename)
375 $ hg status -C
375 $ hg status -C
376 ? d1/ca
376 ? d1/ca
377 $ hg update -C
377 $ hg update -C
@@ -395,7 +395,7 b' attempt to overwrite an existing broken '
395 $ ln -s ba d1/ca
395 $ ln -s ba d1/ca
396 $ hg rename --traceback d1/ba d1/ca
396 $ hg rename --traceback d1/ba d1/ca
397 d1/ca: not overwriting - file exists
397 d1/ca: not overwriting - file exists
398 (hg rename --after to record the rename)
398 ('hg rename --after' to record the rename)
399 $ hg status -C
399 $ hg status -C
400 ? d1/ca
400 ? d1/ca
401 $ hg update -C
401 $ hg update -C
General Comments 0
You need to be logged in to leave comments. Login now