RFE: hg addremove --similarity should work on the specified subset of files
Marc Strapetz
marc.strapetz at syntevo.com
Thu Sep 22 08:22:00 CDT 2011
On 22.09.2011 03:36, Greg Ward wrote:
> On Wed, Sep 21, 2011 at 10:53 AM, Marc Strapetz
> <marc.strapetz at syntevo.com> wrote:
>> With version 1.9.2, "hg addremove --similarity value file1 ... fileN"
>> simply ignores the --similarity option and adds resp. removes the
>> specified files without rename detection.
>
> That sounds like a bug report, not an RFE. Can you give a simple demonstration?
Sorry, I can't, because I just discovered that it actually works :) My
failure was to rely on the command output, instead of checking "status
-C". So when given files, addremove isn't verbose. This is probably
something that could be improved. Please have a look at following sequence:
# hg --version
Mercurial Distributed SCM (version 1.9.2)
# hg status -v
! file1.txt
! file2.txt
! file3.txt
? file1x.txt
? file2x.txt
? file3x.txt
Now, following command actually works as expected, but gives no output.
# hg addremove --similarity 50 file1.txt file2.txt file1x.txt file2x.txt
# hg status -C
A file1x.txt
file1.txt
A file2x.txt
file2.txt
R file1.txt
R file2.txt
! file3.txt
? file3x.txt
I would have expected output like for the following command (at least
the "recording removal of ..." lines):
# hg addremove --similarity 50 --include
{file1.txt,file2.txt,file1x.txt,file2x.txt}
removing file1.txt
adding file1x.txt
removing file2.txt
adding file2x.txt
recording removal of file1.txt as rename to file1x.txt (100% similar)
recording removal of file2.txt as rename to file2x.txt (100% similar)
--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com
More information about the Mercurial-devel
mailing list