hg diff --follow ?

Scott Palmer swpalmer at gmail.com
Fri Aug 7 15:00:04 UTC 2015


If I rename a file and edit it, e.g.:

hg mv a.txt b.txt
echo “Added line” >> b.txt

I think it makes sense that “hg diff” would show me the edits and not treat the file as if it was really branch new.

Currently “hg diff” shows me something like this:

hg diff
diff -r 123456789abc a.txt
— a/a.txt
+++ /dev/null
-existing line

diff -r 123456789abc b.txt
--- /dev/null
+++ b/b.txt
+existing line
+Added line


But I would like to see something like this::

diff -r 123456789abc b.txt
--- a/a.txt
+++ b/b.txt
 existing line
+Added line


Would it make sense to add the same option that “log” has, “--follow” so diff can show me more useful output?

Scott

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://selenic.com/pipermail/mercurial/attachments/20150807/c70b4307/attachment.pgp>


More information about the Mercurial mailing list