Moving Files (Refactoring in IDEs)
Martin Geisler
mg at lazybytes.net
Mon Aug 17 19:10:00 UTC 2009
"Alexander Schatten" <ml_alexanderschatten at gmx.at> writes:
> I am using Mercurial since some weeks and generally like the system
> very much.
>
> However, there is one significant issue I could not solve so far: as
> long as I work from command-line there is no problem, but for most
> software projects (Java) we use IDEs like Eclipse. Now particularly
> refactoring is a very strong feature of Eclipse.
>
> Unfortunately it seems (to me) that this is a very weak point with
> Mercurial. "hg mv" works fine, of course, but Mercurial does not
> detect file renames done from Finder or Eclipse. Also not when the
> Eclipse Plugin is installed.
That sounds like a bug in the Eclipse plugin -- if Eclipse moves a file,
the plugin should notice and move it in Mercurial too.
> Consequentially renames are actually deletes and adds, when I am not
> wrong, hence I lose the history in the document.
You lose the link between the old name and the new name. The old
versions can still be found, but you can no longer use 'hg log --follow'
to follow the history across the renames.
> Am I getting something wrong? Systems like git do, as far as I
> understand, automatically detect renames, moves and the like within
> the repository. Is this a feature that can be expected from Mercurial
> in the future or do I have a wrong understanding in general, as I am
> rather new in distributed SCM.
I don't know if you can integrate this with the Eclipse plugin, but
Mercurial can also detect renames: see the --similarity option for the
addremove command.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20090817/0b2cc66b/attachment-0001.asc>
More information about the Mercurial
mailing list