Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-07 Thread Bo Berglund
On Tue, 7 Nov 2023 19:34:34 +0100, Daniel Sahlberg 
wrote:

>
>svn blame accepts an -r N:M so if you know the revisions that occurred in
>the time period of interest (maybe also works with the date range arguments
>already suggested by Nathan) you should be able to limit the revision
>numbers.

Didn't try that...

>But since you use TortoiseSVN I might suggest that you look at Tortoise’s
>graphical Blame. It looks much like the command line client in that you get
>the revision number each line was changed but you can right click a
>revision number and “blame previous revision” which will give the previous
>time that line was changed. I find this helps a lot to figure out past
>refactorings.
>

Well I have actually been using the command line for this "research" and with
log I could list all 106 checkins to the file over the years.

But I failed to find the place where the code I am looking for was checked in,
instead I discovered an old working copy (from CVS) on my disk where the file I
was looking at actually *had* the changes I was trying to find...

But looking in SVN both sides of the timestamp of the file failed to get any
commit with the changed code.
So the conclusion is that that particular code section which should have fixed
the bug back in 2015 was actually not checked in to CVS and hence did not reach
SVN a couple of years later.

So the binary in that working copy worked as it should whereas all following
compiles (that were part of the transfer to Delphi XE5 vis SVN) did not since
they were based on fresh checkouts

Looks like an oversight at the time...

-- 
Bo Berglund
Developer in Sweden



Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-07 Thread Daniel Sahlberg
mån 6 nov. 2023 kl. 21:42 skrev Bo Berglund :

> On Mon, 06 Nov 2023 11:53:30 -0800, Kenneth Porter 
> wrote:
>
> >--On Monday, November 06, 2023 7:32 PM +0100 Bo Berglund
> > wrote:
> >
> >> I am hunting for when a particular change was made in a file under
> version
> >> control. It happened years ago.
> >
> >svn blame path > path.blame
> >
> >That gives you the file annotated with each line showing which revision
> it
> >last changed on.
> >
>
> Thanks, but:
>
> I tried blame:
> svn blame
> https://svnserver/svn/pc/AgiSSAdmin/trunk/Source/class_SuperSting.pas
> > blame.txt
>
> It produced a text file containing the content of the source file as it
> looks
> today with each line annotated when that line was committed the *last*
> time.
>
> But that is not what I want, instead I want to know *all* revisions in
> which the
> file was modified so I can look at these revisions and see what changed
> between
> them concerning the function I want to inspect.


svn blame accepts an -r N:M so if you know the revisions that occurred in
the time period of interest (maybe also works with the date range arguments
already suggested by Nathan) you should be able to limit the revision
numbers.

But since you use TortoiseSVN I might suggest that you look at Tortoise’s
graphical Blame. It looks much like the command line client in that you get
the revision number each line was changed but you can right click a
revision number and “blame previous revision” which will give the previous
time that line was changed. I find this helps a lot to figure out past
refactorings.


>
> If I could get the rev numbers at the beginning of each result line in
> numerical
> order and nothing else I would be done with the list.
>
> with this command:
>
> svn log -q
> https://svnserver/svn/pc/AgiSSAdmin/trunk/Source/class_SuperSting.pas
> > log.txt
>
> I got a file containing a reverse ordered list of revisions looking like
> this:
>
> r200 | bosse | 2001-06-24 17:29:47 +0200 (Sun, 24 Jun 2001)
> 
> r197 | bosse | 2001-06-23 12:12:37 +0200 (Sat, 23 Jun 2001)
> 
>
> with 106 revisions present.
>
> So log is the better solution.
> Now I need to figure out how to best attack this analysis with so many
> commits...
>

Kind regards
Daniel


>
> --
> Bo Berglund
> Developer in Sweden
>
>


Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-06 Thread Kenneth Porter

On 11/6/2023 12:42 PM, Bo Berglund wrote:

But that is not what I want, instead I want to know*all*  revisions in which the
file was modified so I can look at these revisions and see what changed between
them concerning the function I want to inspect.


Blame isn't always the right solution, but if you know which line is the 
problem, it can tell you when that line last changed. But it sounds like 
your problem is more complicated and arose from multiple commits.




Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-06 Thread Bo Berglund
On Mon, 6 Nov 2023 15:39:40 -0500, Nathan Hartman 
wrote:

>Hope this helps,
>Nathan

Yes, thank you!


-- 
Bo Berglund
Developer in Sweden



Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-06 Thread Bo Berglund
On Mon, 06 Nov 2023 11:53:30 -0800, Kenneth Porter 
wrote:

>--On Monday, November 06, 2023 7:32 PM +0100 Bo Berglund 
> wrote:
>
>> I am hunting for when a particular change was made in a file under version
>> control. It happened years ago.
>
>svn blame path > path.blame
>
>That gives you the file annotated with each line showing which revision it 
>last changed on.
>

Thanks, but:

I tried blame:
svn blame https://svnserver/svn/pc/AgiSSAdmin/trunk/Source/class_SuperSting.pas
> blame.txt

It produced a text file containing the content of the source file as it looks
today with each line annotated when that line was committed the *last* time.

But that is not what I want, instead I want to know *all* revisions in which the
file was modified so I can look at these revisions and see what changed between
them concerning the function I want to inspect.

If I could get the rev numbers at the beginning of each result line in numerical
order and nothing else I would be done with the list.

with this command:

svn log -q https://svnserver/svn/pc/AgiSSAdmin/trunk/Source/class_SuperSting.pas
> log.txt

I got a file containing a reverse ordered list of revisions looking like this:

r200 | bosse | 2001-06-24 17:29:47 +0200 (Sun, 24 Jun 2001)

r197 | bosse | 2001-06-23 12:12:37 +0200 (Sat, 23 Jun 2001)


with 106 revisions present.

So log is the better solution.
Now I need to figure out how to best attack this analysis with so many
commits...


-- 
Bo Berglund
Developer in Sweden



Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-06 Thread Nathan Hartman
On Mon, Nov 6, 2023 at 1:34 PM Bo Berglund  wrote:
>
> I am hunting for when a particular change was made in a file under version
> control. It happened years ago.
>
> The versioning system was migrated from CVSNT to Subversion back in 2017 and 
> the
> old CVS repository was imported into SVN with all branches and tags etc
> available.
>
> The change I am looking for should have happened back in 2004 when the 
> property
> behind what I am hunting for was changed but I cannot find any message about
> this in my archives...
>
> So now I am looking for *when* a particular section of a source file was 
> changed
> so I would like to list all revisions when this file had a commit to it at 
> all.
>
> Then I will extract the revisions in a binary fashion to find when exactly the
> change that should have been done in 2004 was actually done.
>
> Can this be done somehow using the command line interface to svn?
> If so what would be the correct command to issue?
>
>
> I need to get a list of the revisions where the file was changed.
>
> I tried reading the redbean documentation on line but I am not sure I 
> understand
> the way the export works for different revisions of the same file.
>
> The way I understand svn the revision when you export/checkout a file at a
> specific rev number is the file as it existed at the time that revision was
> committed. So even if the file did not change during that revision there will 
> be
> an exported file if I use the -r argument, right?
>
> So I need to start by some command to give me the revision numbers when the
> specific file *actually changed*. So I can focus on the commits when this file
> changed instead of getting lots of the same file because the revisions were 
> done
> because something else changed..
>
> Can that be done?
>
> --
> Bo Berglund
> Developer in Sweden
>


Some things that might be helpful:

(1) The '--quiet' (or '-q') switch to 'svn log', together with the
 as mentioned by Robert, e.g.,:

$ svn log --quiet 

Using the INSTALL file in a working copy of Subversion's sources as an example:

$ svn log --quiet INSTALL


r1911278 | hartmannathan | 2023-07-25 23:25:21 -0400 (Tue, 25 Jul 2023)

r1905955 | kotkov | 2022-12-13 04:49:29 -0500 (Tue, 13 Dec 2022)

r1903577 | hartmannathan | 2022-08-19 12:31:35 -0400 (Fri, 19 Aug 2022)

r1899399 | hartmannathan | 2022-03-30 17:26:30 -0400 (Wed, 30 Mar 2022)

r1894501 | dsahlberg | 2021-10-23 03:20:35 -0400 (Sat, 23 Oct 2021)

r1894491 | dsahlberg | 2021-10-22 14:43:24 -0400 (Fri, 22 Oct 2021)

r1881958 | julianfoad | 2020-09-23 11:04:31 -0400 (Wed, 23 Sep 2020)

r1877960 | futatuki | 2020-05-20 14:58:15 -0400 (Wed, 20 May 2020)

(snip some 600 lines)

r840117 | kevin | 2001-09-05 09:59:27 -0400 (Wed, 05 Sep 2001)

r840082 | kfogel | 2001-08-31 02:15:13 -0400 (Fri, 31 Aug 2001)

r840068 | kfogel | 2001-08-30 23:22:56 -0400 (Thu, 30 Aug 2001)

r839979 | kfogel | 2001-08-16 17:03:09 -0400 (Thu, 16 Aug 2001)

r839944 | kfogel | 2001-08-14 20:28:37 -0400 (Tue, 14 Aug 2001)

r839943 | kfogel | 2001-08-14 20:23:24 -0400 (Tue, 14 Aug 2001)

r839929 | kfogel | 2001-08-13 20:54:08 -0400 (Mon, 13 Aug 2001)

r839536 | kfogel | 2001-06-15 13:00:25 -0400 (Fri, 15 Jun 2001)

r836593 | kfogel | 2000-06-06 13:47:11 -0400 (Tue, 06 Jun 2000)


(2) The '--revision' (or '-r') switch with a {DATE} (or {DATE}:{DATE}
range) instead of a revision number. For example, with the same
INSTALL file, if I want to see the changes made in 2014:

$ svn log --quiet --revision {2014-01-01}:{2014-12-31} INSTALL

r1572339 | breser | 201

Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-06 Thread Kenneth Porter
--On Monday, November 06, 2023 7:32 PM +0100 Bo Berglund 
 wrote:



I am hunting for when a particular change was made in a file under version
control. It happened years ago.


svn blame path > path.blame

That gives you the file annotated with each line showing which revision it 
last changed on.




Re: Command to list all revisions (with date?) when a particular was modified?

2023-11-06 Thread Robert Heller
At Mon, 06 Nov 2023 19:32:55 +0100 bo.bergl...@gmail.com wrote:

> 
> I am hunting for when a particular change was made in a file under version
> control. It happened years ago.
> 
> The versioning system was migrated from CVSNT to Subversion back in 2017 and 
> the
> old CVS repository was imported into SVN with all branches and tags etc
> available.
> 
> The change I am looking for should have happened back in 2004 when the 
> property
> behind what I am hunting for was changed but I cannot find any message about
> this in my archives...
> 
> So now I am looking for *when* a particular section of a source file was 
> changed
> so I would like to list all revisions when this file had a commit to it at 
> all.
> 
> Then I will extract the revisions in a binary fashion to find when exactly the
> change that should have been done in 2004 was actually done.
> 
> Can this be done somehow using the command line interface to svn?
> If so what would be the correct command to issue?

svn log 

svn help log

> 
> 
> I need to get a list of the revisions where the file was changed.
> 
> I tried reading the redbean documentation on line but I am not sure I 
> understand
> the way the export works for different revisions of the same file.
> 
> The way I understand svn the revision when you export/checkout a file at a
> specific rev number is the file as it existed at the time that revision was
> committed. So even if the file did not change during that revision there will 
> be
> an exported file if I use the -r argument, right?
> 
> So I need to start by some command to give me the revision numbers when the
> specific file *actually changed*. So I can focus on the commits when this file
> changed instead of getting lots of the same file because the revisions were 
> done
> because something else changed..
> 
> Can that be done?
> 

-- 
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software-- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
hel...@deepsoft.com   -- Webhosting Services