##// END OF EJS Templates
convert: add support to find git copies from all files in the working copy...
Siddharth Agarwal -
r22471:cc5f94db default
parent child Browse files
Show More
@@ -300,6 +300,11 b' def convert(ui, src, dest=None, revmapfi'
300 be imported as a rename if more than 90% of the file hasn't
300 be imported as a rename if more than 90% of the file hasn't
301 changed. The default is ``0``.
301 changed. The default is ``0``.
302
302
303 :convert.git.findcopiesharder: while detecting copies, look at all
304 files in the working copy instead of just changed ones. This
305 is very expensive for large projects, and is only effective when
306 ``convert.git.similarity`` is greater than 0. The default is False.
307
303 Perforce Source
308 Perforce Source
304 ###############
309 ###############
305
310
@@ -102,6 +102,10 b' class convert_git(converter_source):'
102 raise util.Abort(_('similarity must be between 0 and 100'))
102 raise util.Abort(_('similarity must be between 0 and 100'))
103 if similarity > 0:
103 if similarity > 0:
104 self.simopt = '--find-copies=%d%%' % similarity
104 self.simopt = '--find-copies=%d%%' % similarity
105 findcopiesharder = ui.configbool('convert', 'git.findcopiesharder',
106 False)
107 if findcopiesharder:
108 self.simopt += ' --find-copies-harder'
105 else:
109 else:
106 self.simopt = ''
110 self.simopt = ''
107
111
@@ -277,6 +277,18 b' input validation'
277 foo
277 foo
278 R foo
278 R foo
279
279
280 $ cd git-repo2
281 $ cp bar bar-copied2
282 $ git add bar-copied2
283 $ commit -a -m 'copy with no changes'
284 $ cd ..
285
286 $ hg -q convert --config convert.git.similarity=100 \
287 > --config convert.git.findcopiesharder=1 --datesort git-repo2 fullrepo
288 $ hg -R fullrepo status -C --change master
289 A bar-copied2
290 bar
291
280 test binary conversion (issue1359)
292 test binary conversion (issue1359)
281
293
282 $ count=19
294 $ count=19
@@ -253,6 +253,12 b''
253 "90" means that a delete/add pair will be imported as a
253 "90" means that a delete/add pair will be imported as a
254 rename if more than 90% of the file hasn't changed. The
254 rename if more than 90% of the file hasn't changed. The
255 default is "0".
255 default is "0".
256 convert.git.findcopiesharder
257 while detecting copies, look at all files in the working
258 copy instead of just changed ones. This is very expensive
259 for large projects, and is only effective when
260 "convert.git.similarity" is greater than 0. The default is
261 False.
256
262
257 Perforce Source
263 Perforce Source
258 ###############
264 ###############
General Comments 0
You need to be logged in to leave comments. Login now