|
From: | Mike Ayers |
Subject: | Re: checkout multiple tags |
Date: | Thu, 26 Sep 2002 13:19:00 -0700 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 |
Eric Fritz wrote:
The problem is what if I want to checkout the last 3 updates. If I try to use: "cvs checkout -r tag1 -r tag2 -r tag3 module" it only gets the files in tag3. If I try to run them seperately, one on top of the other, subsequent checkouts actually remove the files that are not listed with the tag.
You write a little script that runs from the top of the directory. You feed the script the names of the tags that you want to find. It runs `cvs log` on every file in the tree, looking for the tags. If it finds one match, it saves that filename and revision number. If it finds multiple matches, it uses the highest numbered revision. When it is done, it extracts all matching files and versions via `cvs checkout -r`.
WARNING: if a given change is applied to multiple branches with the same tag (e.g. your tag names are PR numbers), then the logic to find the right revision becomes nontrivial.
HTH, /|/|ike
[Prev in Thread] | Current Thread | [Next in Thread] |