cvs logging development
Download
Skip this Video
Download Presentation
CVS, Logging, Development

Loading in 2 Seconds...

play fullscreen
1 / 21

CVS, Logging, Development - PowerPoint PPT Presentation


  • 89 Views
  • Uploaded on

CVS, Logging, Development. Shane Cantrell Zach Crisman. What is a “Versioning System”?. Records the history of files Shares code within a group Allows multiple people to edit the same files Merges changes from different people Goes back in time. The Alternative.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CVS, Logging, Development' - etta


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cvs logging development

CVS, Logging, Development

Shane Cantrell

Zach Crisman

CSE403: CVS and Logging

what is a versioning system
What is a “Versioning System”?
  • Records the history of files
  • Shares code within a group
  • Allows multiple people to edit the same files
  • Merges changes from different people
  • Goes back in time

CSE403: CVS and Logging

the alternative
The Alternative
  • Saving every version of every file you have ever created
  • Saving current state of project every so often
  • Wasting disk space by duplicating unchanged portions of code
  • Communicating manually to prevent coding conflicts
  • Forgetting where the most recent version is or having group members “accidentally” choose an old version

CSE403: CVS and Logging

ways to access cvs
Ways to Access CVS
  • Command Line
    • Cygwin
    • SSH Secure Shell Client 3.2.2 (full)
  • TortoiseCVS (www.tortoisecvs.org)
  • WinCVS (www.wincvs.org)

CSE403: CVS and Logging

cvs setup
CVS Setup
  • Environment Variables:
    • CVSROOT = <location of CVS repository>
    • CVS_RSH = <remote shell>
    • EDITOR = <default editor>
  • Windows Examples:
    • CVSROOT = :ext:[email protected]:/homes/iws/shanec
    • CVS_RSH = ssh2.exe
    • EDITOR = notepad.exe
    • PATH = %PATH%;C:\cvs;C:\Programs\SSH

CSE403: CVS and Logging

common commands
Common Commands
  • Checkout module (get most recent version)
    • cvs co <module-name>
  • Update files (incorporate recent changes)
    • cvs update <file-list>
  • Commit files (publish your current files)
    • cvs commit <file-list>
  • Add new files to the module
    • cvs add <file-list>
    • cvs add –ko <binary file-list>
  • Questions? Try ‘man cvs’

CSE403: CVS and Logging

making a repository
Making a Repository
  • Make your CVS directory
  • Set CVSROOT to your CVS directory
  • cvs init
  • Tutorial

http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/cvs.html

(Typed commands are in italics.)

CSE403: CVS and Logging

adding a module
Adding a Module
  • cvs checkout CVSROOT
  • Edit the ./CVSROOT/modules file
    • Add the line describing your module and location
    • (eg. project project/ )
  • cvs commit CVSROOT
  • cd $CVSROOT
  • mkdir project (make the project directory)
  • Set the file permissions (if necessary) with chgrp, chown, and chmod.

CSE403: CVS and Logging

adding files
Adding files
  • Checkout the module
  • Add the new directories using cvs add
  • Add the new files using cvs add
  • Commit the new files

CSE403: CVS and Logging

cvs output key
CVS Output Key

U – the file was brought up to dateP – the file was brought up to date via a patchA – the file has been addedR – the file has been removed M – the file has not changed in the repository or it has changed in the repository but it was successfully mergedC – the is a conflict between the repository version and your version? – file note in repository, CVS does not know what to do with it

CSE403: CVS and Logging

message logging in java
Message Logging in Java
  • Chapter 13 of Tomcat
  • J2SE 1.4 - java.util.logging
    • standard logging library
  • Jakarta Log4j
    • previous “standard”
  • System.out.println()
    • lazy man’s technique

CSE403: CVS and Logging

why not system out
Why not System.out?
  • No way of switching logging on or off at runtime
  • No way of specifying logging priority or message severity apart from the message text
  • Lacks special functionality (like e-mailing an administrator)
  • Must be redirected into a file
  • Must be removed when the product is released

CSE403: CVS and Logging

logging levels
Logging Levels
  • Level.SEVERE (highest value)
  • Level.WARNING
  • Level.INFO
  • Level.CONFIG
  • Level.FINE
  • Level.FINER
  • Level.FINEST (lowest value)

CSE403: CVS and Logging

logging classes
Logging Classes
  • java.util.logging.*
    • Logger
    • Handler Classes
      • ConsoleHandler
      • FileHandler
      • SocketHandler
    • Formatter Classes
      • SimpleFormatter
      • XMLFormatter

CSE403: CVS and Logging

getting the logger object
Getting the Logger Object
  • class Logger
    • public static Logger getLogger(String name)
  • Creates a new Logger object if one does not already exist for name.
  • If package type naming is used, then sub names inherit logging levels
    • For example, “net.hydrus.test” would inherit the logging level setting from “net.hydrus”

CSE403: CVS and Logging

configuring the logger
Configuring the Logger

...

convLogger.setLevel(Level.INFO);

try {

FileHandler logfile = new FileHandler(“F:/Tomcat/logs/conv.log”);

logfile.setLevel(Level.INFO);

logfile.setFormatter(new BasicFormatter());

convLogger.addHandler(logfile);

convLogger.setUseParentHandlers(false);

}

catch (IOException e) {

convLogger.warning(“Failed to set up logfile”);

}

...

CSE403: CVS and Logging

logging messages
Logging Messages
  • class Logger
    • public void severe(String msg)
    • public void warning(String msg)
    • public void info(String msg)
    • public void config(String msg)
    • public void fine(String msg)
    • public void finer(String msg)
    • public void finest(String msg)

CSE403: CVS and Logging

jakarta libraries
Jakarta Libraries
  • http://jakarta.apache.org/
  • Cactus (unit testing)
    • http://jakarta.apache.org/cactus
  • Apache XML Project
    • http://xml.apache.org/
  • Regular Expressions (Regexp)
  • Text Processing (ORO)
  • Text Search Engine (Lucene)

CSE403: CVS and Logging

lco1 considerations
LCO1 Considerations
  • Be creative
  • Midlet Considerations
    • built-in GUI
    • custom GUI
    • phone specific libraries
  • Server Considerations
    • servlet
    • traditional server
    • database

CSE403: CVS and Logging

lco1 reminders
LCO1 Reminders
  • What is it?
  • What does it do for us?
  • How is it supposed to work?
  • Is it possible?
    • What is needed?
    • How do you intend to go about making it?
  • Who is it for? Are there support people involved in its functionality?
  • Be sure to ask the questions throughout and clarify when in doubt of clarity.

CSE403: CVS and Logging

sneak preview next time
Sneak Preview (Next Time)
  • Bug Tracking
    • elementool.com
    • fogbugz.com
  • Unit Testing
    • jUnit (junit.sourceforge.net)
    • Jakarta Cactus
  • Other Tools...

CSE403: CVS and Logging

ad