[issue3187] hg import with --similarity 100 not working correctly on renames
Jason Harris
bugs at mercurial.selenic.com
Thu Jan 5 19:31:34 CST 2012
New submission from Jason Harris <jason at jasonfharris.com>:
When importing a patch containing a rename and using the -- similarity option the command
fails. See the attached steps:
As one can see from the steps below a simple strip and import of the patch without the --
similarity option works, but including the option causes the message abort: ... file not
found!
-----------------
[salt:~] $ mkdir testRepo
[salt:~] $ cd tesrRepo
testRepo
[salt:~/testRepo] $ hg init
[salt:~/testRepo] testRepo $ touch fish
[salt:~/testRepo] testRepo $ echo a > fish
[salt:~/testRepo] testRepo $ more fish
a
[salt:~/testRepo] testRepo $ hg commit -A -m "initial commit"
adding fish
[salt:~/testRepo] testRepo 0(0) $ echo bill >> fish
[salt:~/testRepo] testRepo 0(0) $ hg commit -m "second commit"
[salt:~/testRepo] testRepo 1(1) $ mv fish duck
[salt:~/testRepo] testRepo 1(1) $ hg addremove --similarity 100
adding duck
removing fish
recording removal of fish as rename to duck (100% similar)
[salt:~/testRepo] testRepo 1(1) $ hg commit -m "do move"
[salt:~/testRepo] testRepo 2(2) $ hg export --rev tip --output "move.patch"
[salt:~/testRepo] testRepo 2(2) $ ls
duck move.patch
[salt:~/testRepo] testRepo 2(2) $ hg strip tip
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
saved backup bundle to /Users/jason/testRepo/.hg/strip-backup/4656b48f4cd1-backup.hg
[salt:~/testRepo] testRepo 1(1) $ hg import move.patch
applying move.patch
[salt:~/testRepo] testRepo 2(2) $ hg strip tip
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
saved backup bundle to /Users/jason/testRepo/.hg/strip-backup/4656b48f4cd1-backup.hg
[salt:~/testRepo] testRepo 1(1) $ hg import --similarity 100 move.patch
applying move.patch
abort: fish: file not found!
[salt:~/testRepo] testRepo 1(1) $ hg version
Mercurial Distributed SCM (version 2.0.2+20120104)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2011 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(On OSX 10.7.2)
----------
messages: 18511
nosy: Jason Harris
priority: bug
status: unread
title: hg import with --similarity 100 not working correctly on renames
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3187>
____________________________________________________
More information about the Mercurial-devel
mailing list