hg equivalent of git blame -C?

Uwe Brauer oub at mat.ucm.es
Sat Mar 19 16:29:09 UTC 2022


>>> "AB" == Arne Babenhauserheide <arne_bab at web.de> writes:

> Uwe Brauer <oub at mat.ucm.es> writes:

>> Hi 
>> 
>> I just learned on the auctex devel list (which uses git) that git blame
>> has -C option for taking renaming into account.
>> 
>> It seems that mercurial has a similar feature, which is enabled per
>> default.
>> Am I right?

> Checking the help output says yes:

> $ hg help blame
> ...
>     --no-follow           don't follow copies and renames
> ...

> So you can disable it, but it’s on by default.


Thanks, I run a small experiment

hg init
echo "First" > test.org
hg add test.org
hg commit  -m "First"
echo "Second" >> test.org
hg commit  -m "Second"
echo "Third" >> test.org
hg commit  -m "Third"
echo "Forth" >> test.org
hg commit  -m "Forth"
mv test.org testnew.org
hg addremove
hg commit  -m "Renamed file test.org to testnew.org"
hg log -f testnew.org


Then in emacs (and I am not sure whether the following is partially the
fault of emacs vc), I run vc-annotate, which in turn runs hg annotate,
indeed all 4 lines were correctly identified, however the command

,----
| vc-annotate-prev-revision 
| 
| (vc-annotate-prev-revision PREFIX)
| Visit the annotation of the revision previous to this one.
`----

Failed. Since I move files a lot into subdirectories and sometimes
rename them, I would be interested in such a feature. Maybe some emacs
user, Arne?, can say something?

Thanks 



-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine’s military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://how-to-help-ukraine-now.super.site/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5673 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20220319/f4833af6/attachment.p7s>


More information about the Mercurial mailing list