IntelliJ Java IDE
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT: Checking results from cvs status or update Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "ANT: Checking results from cvs status or update" Watch "ANT: Checking results from cvs status or update" New topic
Author

ANT: Checking results from cvs status or update

Mark Binau
Ranch Hand

Joined: Mar 04, 2004
Posts: 37
Hi,

I am fairly new to ANT and cvs. I would like to have my ANT script check the workspace to see if it is in synch with my cvs repository before I deploy. I know how to make ANT run a cvs command such as "cvs -n -q update" to display files that are not in synch but can anyone show me how to make ANT respond differently based on the results of the cvs command? I would like it if I could just get the ANT script to stop (fail) if my workspace is not in synch with the repository.


Thanks,
Mark
Mark Binau
Ranch Hand

Joined: Mar 04, 2004
Posts: 37
I was able to get this to work by having the CVS output go to a file. I then run a batch file (shell script) which sets the errorlevel so that the exec task will fail causing the script to fail. This is kinda clunky. If anyone has a better solution, please post.

Thanks,
Mark
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 469
Why don't you just enforce update? If ant isn't absolute requirement then I'd offer you another building tool.


Get power of your iPod with MediaChest | Minimal J2EE container is here | Light weight full J2EE stack | My blog | Co-author of "Windows programming in Turbo Pascal"
 
IntelliJ Java IDE
 
subject: ANT: Checking results from cvs status or update
 
Threads others viewed
Best practices for setting up modules with interdependencies in CVS
A Boring ant PVCS question
Ant script error in Websphere Application server 6.1
Clean CVS update in Eclipse, and cvs command line access.
Ant Command Line arguments
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture