Reputation: 2105
I did a cvs update -r "1.5"
on file abc.html. The abc.html has versions until 1.10. The previous version it was in was v1.8.
Let's say I had no idea it was in v1.8 after I changed its version to v1.5. How do I use cvs to find out that the previous version of the file used was v1.8?
Or in other words, how do I use cvs to track all previous change in file version?
Upvotes: 1
Views: 122
Reputation: 3549
It's very hard to know what you mean from the wording of your question, but I think this is it... You had a workspace that was a bit old. abc.html was at version 1.8. Then you did cvs update -r 1.5 abc.html
and now you want to undo that operation and get back to the version that corresponds to the date of checkout of the rest of the files in your repository. The short answer is that you cannot. CVS tracks changes on a per-file basis, not a per-directory one. Unless you know the timestamp of when you checked out the whole repository, or you have a tag that was applied to the whole repository that you were checked out to, what you want can't really be done.
Other possible things you might have meant:
The previous version to 1.x
is 1.(x-1)
.
How many versions are there? cvs log <filename>
.
What version does the current workspace have checked out? cvs status abc.html
.
note: You probably do not want to do cvs update -r 1.5 abc.html
as that will put a "sticky tag" on the file and it will be forever stuck at 1.5 even as you update the rest of your repository to the latest versions. For examining old versions of individual files, if cvs diff -r 1.5 abc.html
is not enough, I would recommend using -p
to send the output to stdout. e.g. cvs update -p -r 1.5 abc.hmtl > abc.html
. Or you can even redirect it to /tmp/abc.html.
Upvotes: 1