DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Cvs Update Non Verbose Output

09.24.2005
| 3667 views |
  • submit to reddit
        I don't like "cvs update" to print out which directories it updates, nor the files not under revision control. Following snippet go directly to the point : print the files that changed during last changeset

import pexpect

def update():
    child = pexpect.spawn('cvs update -dP')

    for line in child:
        if not line.startswith('?') and not line.startswith('cvs update'):
            print line[:-1]