##// END OF EJS Templates
rename: add hint about --at-rev if source file doesn't exist...
Martin von Zweigbergk -
r47897:5ffc6c18 default
parent child Browse files
Show More
@@ -1851,7 +1851,10 b' def copy(ui, repo, pats, opts, rename=Fa'
1851 1851 continue
1852 1852 copylist.append((tfn(pat, dest, srcs), srcs))
1853 1853 if not copylist:
1854 raise error.InputError(_(b'no files to copy'))
1854 hint = None
1855 if rename:
1856 hint = _(b'maybe you meant to use --after --at-rev=.')
1857 raise error.InputError(_(b'no files to copy'), hint=hint)
1855 1858
1856 1859 errors = 0
1857 1860 for targetpath, srcs in copylist:
@@ -115,6 +115,7 b' should fail - foo is not managed'
115 115 $ hg mv foo bar
116 116 foo: not copying - file is not managed
117 117 abort: no files to copy
118 (maybe you meant to use --after --at-rev=.)
118 119 [10]
119 120 $ hg st -A
120 121 ? foo
@@ -124,14 +125,17 b' respects ui.relative-paths'
124 125 $ hg mv ../foo ../bar
125 126 ../foo: not copying - file is not managed
126 127 abort: no files to copy
128 (maybe you meant to use --after --at-rev=.)
127 129 [10]
128 130 $ hg mv ../foo ../bar --config ui.relative-paths=yes
129 131 ../foo: not copying - file is not managed
130 132 abort: no files to copy
133 (maybe you meant to use --after --at-rev=.)
131 134 [10]
132 135 $ hg mv ../foo ../bar --config ui.relative-paths=no
133 136 foo: not copying - file is not managed
134 137 abort: no files to copy
138 (maybe you meant to use --after --at-rev=.)
135 139 [10]
136 140 $ cd ..
137 141 $ rmdir dir
@@ -237,6 +237,7 b''
237 237 $ hg mv z2 z3
238 238 z2: not copying - file is not managed
239 239 abort: no files to copy
240 (maybe you meant to use --after --at-rev=.)
240 241 [10]
241 242 $ find $CACHEDIR -type f | sort
242 243 .. The following output line about files fetches is globed because it is
General Comments 0
You need to be logged in to leave comments. Login now