Show More
@@ -378,7 +378,7 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
378 | return |
|
378 | return | |
379 |
|
379 | |||
380 | # check for overwrites |
|
380 | # check for overwrites | |
381 | exists = os.path.exists(target) |
|
381 | exists = os.path.lexists(target) | |
382 | if not after and exists or after and state in 'mn': |
|
382 | if not after and exists or after and state in 'mn': | |
383 | if not opts['force']: |
|
383 | if not opts['force']: | |
384 | ui.warn(_('%s: not overwriting - file exists\n') % |
|
384 | ui.warn(_('%s: not overwriting - file exists\n') % |
@@ -158,6 +158,13 b' hg status -C' | |||||
158 | hg update -C |
|
158 | hg update -C | |
159 | rm d1/ca |
|
159 | rm d1/ca | |
160 |
|
160 | |||
|
161 | echo "# attempt to overwrite an existing broken symlink" | |||
|
162 | ln -s ba d1/ca | |||
|
163 | hg rename --traceback d1/ba d1/ca | |||
|
164 | hg status -C | |||
|
165 | hg update -C | |||
|
166 | rm d1/ca | |||
|
167 | ||||
161 | echo "# replace a symlink with a file" |
|
168 | echo "# replace a symlink with a file" | |
162 | ln -s ba d1/ca |
|
169 | ln -s ba d1/ca | |
163 | hg rename --force d1/ba d1/ca |
|
170 | hg rename --force d1/ba d1/ca |
@@ -213,6 +213,10 b' A d1/ca' | |||||
213 | d1/ba |
|
213 | d1/ba | |
214 | R d1/ba |
|
214 | R d1/ba | |
215 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
215 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
216 | # attempt to overwrite an existing broken symlink | |||
|
217 | d1/ca: not overwriting - file exists | |||
|
218 | ? d1/ca | |||
|
219 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
216 | # replace a symlink with a file |
|
220 | # replace a symlink with a file | |
217 | A d1/ca |
|
221 | A d1/ca | |
218 | d1/ba |
|
222 | d1/ba |
General Comments 0
You need to be logged in to leave comments.
Login now