Re: Advice on Mercurial history search

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Advice on Mercurial history search

Rik-4
On 09/25/2018 09:00 AM, [hidden email] wrote:
Subject:
Advices on Mercurial history search
From:
Pantxo Diribarne [hidden email]
Date:
09/25/2018 08:40 AM
To:
Octave Maintainers List [hidden email]
List-Post:
[hidden email]
Precedence:
list
MIME-Version:
1.0
Message-ID:
[hidden email]
Content-Type:
multipart/alternative; boundary="0000000000001764790576b3ec5f"
Message:
1

Hi,

I have recently submitted a patch in which I removed a piece code that prevents "drawnow" from being executed recursively. I realize that this piece of code may have been here for some good reason and I would like to know when it was added, by who and why.

Now comes the precise question: is there any magic "hg log XXX" call that would let me find the specific changeset in which current lines N to N+M  were added to graphics.cc?

Thanks in advance,

I have a solution that I sometimes use, but it isn't always foolproof so if someone has a better way I would ALSO like to know.

I use "hg blame"

cd libinterp/corefcn
hg blame graphics.cc > blame.log
edit blame.log
find line with the code you are interested in.  The last changeset which touched this line will be in the column on the far left
hg log -r CSET_#

--Rik
Reply | Threaded
Open this post in threaded view
|

Re: Advice on Mercurial history search

Pantxo
Le 25/09/2018 à 18:22, Rik a écrit :
On 09/25/2018 09:00 AM, [hidden email] wrote:
Subject:
Advices on Mercurial history search
From:
Pantxo Diribarne [hidden email]
Date:
09/25/2018 08:40 AM
To:
Octave Maintainers List [hidden email]
List-Post:
[hidden email]
Precedence:
list
MIME-Version:
1.0
Message-ID:
[hidden email]
Content-Type:
multipart/alternative; boundary="0000000000001764790576b3ec5f"
Message:
1

Hi,

I have recently submitted a patch in which I removed a piece code that prevents "drawnow" from being executed recursively. I realize that this piece of code may have been here for some good reason and I would like to know when it was added, by who and why.

Now comes the precise question: is there any magic "hg log XXX" call that would let me find the specific changeset in which current lines N to N+M  were added to graphics.cc?

Thanks in advance,

I have a solution that I sometimes use, but it isn't always foolproof so if someone has a better way I would ALSO like to know.

I use "hg blame"

cd libinterp/corefcn
hg blame graphics.cc > blame.log
edit blame.log
find line with the code you are interested in.  The last changeset which touched this line will be in the column on the far left
hg log -r CSET_#

--Rik


Thanks Rik! This worked very well to determine that the given lines where there from the origin of the Fdrawnow function. This code was translated from an m file which happens to not exist anymore so it would probably be harder to track it ...

On the other hand, this was back in 2008, and I'm going to stop investigating :-).

Pantxo