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

RE: Re: Efficient way to get the previous revision number

From: Gleason, Todd <tgleason_at_impac.com>
Date: Fri, 2 May 2008 08:37:33 -0700

If you needed to go through the history of the file to selectively apply
changes from one branch to another, wouldn't the revision numbers be
useful? Of course you could also use blame, but with good commit
messages I'd think looking at the revision log would be simpler.

-----Original Message-----
From: Paul Koning [mailto:Paul_Koning_at_dell.com]
Sent: Friday, May 02, 2008 8:13 AM
To: Giulio.Troccoli_at_uk.linedata.com
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

---------------------------------------------------------------------
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 17:40:44 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.