##// END OF EJS Templates
copy: do not copy file if name is disallowed anyway
Adrian Buehlmann -
r13945:03f3ce7c default
parent child Browse files
Show More
@@ -435,6 +435,8 b' def copy(ui, repo, pats, opts, rename=Fa'
435 src = repo.wjoin(abssrc)
435 src = repo.wjoin(abssrc)
436 state = repo.dirstate[abstarget]
436 state = repo.dirstate[abstarget]
437
437
438 util.checkfilename(abstarget)
439
438 # check for collisions
440 # check for collisions
439 prevsrc = targets.get(abstarget)
441 prevsrc = targets.get(abstarget)
440 if prevsrc is not None:
442 if prevsrc is not None:
@@ -36,6 +36,17 b' test issue352'
36 o hell
36 o hell
37 o
37 o
38
38
39 $ echo bla > quickfox
40 $ hg add quickfox
41 $ hg ci -m 2
42 $ A=`printf 'quick\rfox'`
43 $ hg cp quickfox "$A"
44 abort: '\n' and '\r' disallowed in filenames: 'quick\rfox'
45 [255]
46 $ hg mv quickfox "$A"
47 abort: '\n' and '\r' disallowed in filenames: 'quick\rfox'
48 [255]
49
39 http://mercurial.selenic.com/bts/issue2036
50 http://mercurial.selenic.com/bts/issue2036
40
51
41 $ cd ..
52 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now