[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Efficient way to get the previous revision number

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Fri, 2 May 2008 15:28:18 +0100

I need it for some checks before the code can me merged, in accordance
to our development process :-)

Basically when I merge from src/dir2 to src/dir1 I need to know what
happened in src/dir2 before the revision I want to merge but after the
last time something was committed in src/dir1. Sorry, it's not easy to
explain in general terms.

Giulio

>
 
 
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
 
-----Original Message-----
 

> From: Paul Koning [mailto:Paul_Koning_at_dell.com]
> Sent: 02 May 2008 15:13
> To: Giulio Troccoli
> Cc: users_at_subversion.tigris.org
> Subject: Re: Efficient way to get the previous revision number
>
> >>>>> "Giulio" == Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
> writes:
>
> Giulio> Given a revision number I need to find out the revision of
> Giulio> the previous commit in a particular directory. For example,
> Giulio> with revision 100 I committed some change to src/dir1. Then,
> Giulio> with revision 101 to 104 I committed changes to
> Giulio> src/dir2. Now, with revision 105 I committed changes again in
> Giulio> src/dir1. So given revision 103, and the directory src/dir1
> Giulio> of course, I need to find the previous revision, i.e. 100.
>
> Giulio> What I am doing at the moment is something like
>
> Giulio> svn --quiet log [dir1 URL] 103:1 | head -2 | tail -1 | cut
-d" "
> -f1 | cut -dr -f2
>
> Try:
> svn --quiet log [dir1 URL] --limit 2 | head -4 | tail -1 | cut -d" "
-f1
> | cut -dr -f2
>
> I'm curious why you want the previous rev number -- it seems like a
> rather meaningless bit of data.
>
> paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-05-02 16:27:57 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.