|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Getting immediate previous revision of a fileI have a revision r where a file is changed. I want to take the previous version of this file and compare it (my own compare, not SVN diff). But the previous version of the file is not in revision r-1, it could have been unchanged for many revisions, or some revisions can even be missing in the current trunk directory. Is there any way for me to get the verision of a file just before a specific revision?
I saw a very similar post at http://www.nabble.com/How-to-show-changes-of-one-file-in-specific-revision-to21301533.html#a21365215 and http://www.nabble.com/How-to-get-correct-path-of-file-between-revisions-to21305208.html#a21365191, but when I used the suggested solution (LogClient with ISVNLogEntryHandler) I still face the same problem: exception whenever the logclient hits a revision where the file is not changed. In any case, is there an easier way to do this than using the logclient? I only want to find the one copy of this one file just before the specified revision; the doLog() function appears to iterate through the entire history of the file (I don't see a way to make it stop after its job is done), which is very slow for large repositories. |
|
|
Re: Getting immediate previous revision of a fileED: I am now using SVNRepository's checkPath() and backtracking along revisions. Seems to solve my problem. Previously got sidetracked by LogClient.
|
|
|
Re: Getting immediate previous revision of a fileI think you were on the right track with SVNLogClient. Use the doLog
method and set the "limit" parameter to 2. Then your LogEntryHandler will only get the last 2 revisions back, assuming, of course, that the file is not brand new and actually has 2 revisions. Dale alexloh wrote: > ED: I am now using SVNRepository's checkPath() and backtracking along > revisions. Seems to solve my problem. Previously got sidetracked by > LogClient. > > > > alexloh wrote: > >> I have a revision r where a file is changed. I want to take the previous >> version of this file and compare it (my own compare, not SVN diff). But >> the previous version of the file is not in revision r-1, it could have >> been unchanged for many revisions, or some revisions can even be missing >> in the current trunk directory. Is there any way for me to get the >> verision of a file just before a specific revision? >> >> I saw a very similar post at >> http://www.nabble.com/How-to-show-changes-of-one-file-in-specific-revision-to21301533.html#a21365215 >> and >> http://www.nabble.com/How-to-get-correct-path-of-file-between-revisions-to21305208.html#a21365191, >> but when I used the suggested solution (LogClient with >> ISVNLogEntryHandler) I still face the same problem: exception whenever the >> logclient hits a revision where the file is not changed. >> >> In any case, is there an easier way to do this than using the logclient? I >> only want to find the one copy of this one file just before the specified >> revision; the doLog() function appears to iterate through the entire >> history of the file (I don't see a way to make it stop after its job is >> done), which is very slow for large repositories. >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |