Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4031890
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:39:13+00:00 2026-05-20T11:39:13+00:00

I have a project with sources under the control of CVSNT. I need a

  • 0

I have a project with sources under the control of CVSNT.

I need a list of source file names and revisions belonging to a certain tag.
For example:

the tag MYTAG is:
myproject/main.cpp 1.5.2.3
myproject/myclass.h 1.5.2.1

I know that with cvs log -rMYTAG > log.txt I get in log.txt all the information I need and then I can filter it to build my list, but, is there any utility which already do what I need?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:39:13+00:00Added an answer on May 20, 2026 at 11:39 am

    Here’s a Python script that does this:

    import sys, os, os.path
    import re, string
    
    def runCvs(args):
      f_in, f_out, f_err = os.popen3('cvs '+string.join(args))
      out = f_out.read()
      err = f_err.read()
      f_out.close()
      f_err.close()
      code = f_in.close()
      if not code: code = 0
      return code, out, err
    
    class RevDumper:
      def parseFile(self, rex, filelog):
        m = rex.search(filelog)
        if m:
          print '%s\t%s' % (m.group(1), m.group(2))
    
      def filterOutput(self, logoutput, repoprefix):
        rex = re.compile('^={77}$', re.MULTILINE)
        files = rex.split(logoutput)
        rex = re.compile('RCS file: %s(.*),v[^=]+selected revisions: [^0][^=]+revision ([0-9\.]+)' % repoprefix, re.MULTILINE)
        for file in files:
          self.parseFile(rex, file)
    
      def getInfo(self, tag, module, repoprefix):
        args = ['-Q', '-z9', 'rlog', '-S', '-N', '-r'+tag, module] # remove the -S if you're using an older version of CVS
        code, out, err = runCvs(args)
        if code == 0:
          self.filterOutput(out, repoprefix)
        else:
          sys.stderr.write('CVS returned %d\n%s\n' % (code, err))
    
    if len(sys.argv) > 2:
      tag = sys.argv[1]
      module = sys.argv[2]
      if len(sys.argv) > 3:
        repoprefix = sys.argv[3]
      else:
        repoprefix = ''
      RevDumper().getInfo(tag, module, repoprefix)
    else:
      sys.stderr.write('Syntax: %s TAG MODULE [REPOPREFIX]' % os.path.basename(sys.argv[0]))
    

    Note that you either have to have a CVSROOT environment variable set or run this from inside a working copy checked out from the repository you want to query.

    Also, the file names displayed are based on the “RCS File” property of the rlog output, i.e. they still contain the repository prefix. If you want to filter that out you can specify a third argument, e.g. when your CVSROOT is something like sspi:server:/cvsrepo then you would call this like:

    ListCvsTagRevisions.py MyTag MyModule /cvsrepo/
    

    Hope this helps.


    Note: If you need a script that lists the revisions currently in your working copy, see the edit history of this answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a large project at work, under source control, including an MSBuild file
I've been asked to put every single file in my project under source control,
I have a project which is under source control using TFS. Actually, I have
Here's the problem: I have a java dynamic web project under source control and
I have a project under source control (remote SVN). Originally the project had just
I have a project which is under SVN source control. I can easily set
I have a project which is under source control via Star Team in VS
I have a project in xcode under svn source control. It happens that the
I have a highly complicated web site that is under source control and has
I have a project under version control, but the project has some images, videos

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.