hg diff --follow ?
Adrian Klaver
adrian.klaver at aklaver.com
Fri Aug 7 15:12:49 UTC 2015
On 08/07/2015 08:00 AM, Scott Palmer wrote:
> 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?
aklaver at panda:~/test/hg_test> hg diff -g
diff --git a/a.txt b/b.txt
rename from a.txt
rename to b.txt
--- a/a.txt
+++ b/b.txt
@@ -1,1 +1,2 @@
existing line
+âAdded lineâ
>
> Scott
>
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> https://selenic.com/mailman/listinfo/mercurial
>
--
Adrian Klaver
adrian.klaver at aklaver.com
More information about the Mercurial
mailing list