Web server
gpasswd -a <username> emacs or usermod -G <comma separated group list> <username> groups <username> remove a member from a group: editing the /etc/group delete a user: userdel <username> delete a user and its home dir: userdel -r <username> Using SVNHere is some info on using SVN in our server. Here is a tutorial on using Subclipse, a plugin for Eclipse. A repository root is one of the following: svn+ssh://ase.csc.ncsu.edu/svn/root/papers svn+ssh://ase.csc.ncsu.edu/svn/root/toolsrc svn+ssh://ase.csc.ncsu.edu/svn/root/docs svn+ssh://ase.csc.ncsu.edu/svn/root/slides For more info, check out SVN book. To import your CVS project or any project stored in local directory to SVN, you can do the following in Eclipse's resource view 1. Disconnect a project by Team-> Disconnect (if it has already been previously sotred and connected to CVS) 2. Import a project to SVN by Team-> Share Project (follow the step-by-step screen) Server common commands: Create a repository # Create a Berkeley-DB-backed repository CVS overview (adapted from here)cvs - concurrent version system - can be used to easily accomplish several things:
Though cvs setup can be very complex, below we give couple of simple examples how to use cvs to accomplish these things. CVS overview: cvs stores copies of your files and history information in a special directory called repository. To work on the files, you checkout a copy of the repository to a separate directory. When you are done, you commit your changes (i.e. store the new versions of the files to the repository). You and your collaborators can have multiple checked out copies of the repository (even on different computers) and work in parallel. You can update a copy to reflect recent changes submitted to the repository. cvs has some support for merging independent changes done by various people at the same time, though human intervention is usually needed in such cases. cvs also allows you to compare versions, checkout older version of the repository, create multiple branches of the project, and so on. We will be using the Concurrent Version System (CVS) in our research group as a mechanism for sharing resources (e.g. tool source code and papers). It is a tool that can be used for many types of other collaborative development, such as writing documentation. There are a number of reasons to use a version control system:
Version control is a process by which you can keep a recorded history of the changes to your files (e.g. software source/code). A version control system, such as the Concurrent Version System (CVS), is an system that helps you accomplish version control of your files. A version control system is useful for a number of reasons, the most important is to keep a historical record of the various versions of files you are developing. Should you accidentally delete a file or a portion of a file that you are working on, you can recover the most recent version, or any version, of that file. Of course, you must periodically commit (a.k.a. "checked-in") your files to the version control system for this process work. A version control system is typically used by software development teams as a mechanism for sharing the development of the various files in a project. Additional overviews of CVS can be found in the references section below. Also read Chang Liu's CVS tips. Setting up cvs repository for a project (you can usually skip this step, because we have done this step)When starting a project (e.g. a paper), you first need to setup a cvs repository. To do that, you create a directory where you want to keep the repository (such as /cvs/root/ on ase server) and run the following command: cvs -d /cvs/root init You want to keep the directory somewhere out of your sight (it will be accessed only by cvs system, not you); you may also want to keep all your repositories together at a single location (such as /cvs/root/) to make backups easier. If you want to share your repository with other people, you need to:
chgrp -R aserg /cvs/root Automatic email notification of CVS changes Set CVS environment variables in your account in the serverTwo important variables to set in your server account before you start are CVS_RSH and CVSEDITOR. CVS_RSH determines the remote shell to be used, CVSEDITOR determines the editor to use when entering comments about versions. My settings are in my .bashrc as follows: export CVS_RSH=ssh You can SSH to the server and go to your home directory. Modify the .bashrc file in your home directory by adding the above two lines. Setting up subdirectory for your tool/paper/doc in cvs repositoryFinally, create a "module" inside your new cvs repository; for example as follows: mkdir /cvs/root/toolsrc You can also create a subdirectory under toolsrc as follows: mkdir /cvs/root/toolsrc/mytool Using CVS in Eclipse (adapted from here)Basic Version Control Concepts
CVS ClientsCVS and EclipseOpen CVS PerspectiveThere is an Eclipse perspective for CVS. You can enable this perspective from the Window menu: Connecting to a CVS Repository
After validation, CVS Repositories window in Eclipse will show the connected repository. Note that you can have multiple repositories. Figure: CVS Repositories
5. You can browse the existing subdirectories in the CVS from there. Note that you are suggested to create these initially empty subdirectories for your tool/paper as described in here if they don't exist. When you see the subdirectory you want to check out, click it and click right mouse button -> "Check out As" A dialog pops up. Check the radio of "Check out as a project in the workspace". Click "Next". You can specify the local hard drive location where you want to put the local working copy. Click "Next" Click "Finish." Then you can copy files or create new files in this location. When you are done, you can switch the resource perspective, click the project that you check out from the CVS, do the one of the following tasks for interacting with CVS
Committing: When you decide to stop working you need to commit your changes to the repository so your colleagues can see them. Sometimes multiple people will be working on a project from different locations at the same time. If this situation occurs and someone changes the repository version before you commit there could be conflicts. If this happens you will be shown a "diff" (a comparison between 2 versions of a file) showing the differences between your version and the repository version. Eclipse makes it very easy to choose which version you would like to commit. If you aren't sure whether to keep your code or your colleagues you can always cancel the commit and discuss the issues with your colleagues before committing. Don't worry if you make a mistake or commit the wrong code because with CVS you can always go back to a previous version. More functionality is available in the Eclipse "Synchronizing" perspective, accessible by right clicking on the project in the package explorer and choosing Team->Synchronize from the menu.
References
Using CVS Client Commands in your local desktopNow we need to checkout a working copy (if you are sharing the repository, all of your colleagues must do this as well; you can also check out multiple copies such as in school and at home): If you are working on toolsrc: cvs -d /cvs/root checkout toolsrc or from elsewhere: cvs -d :ext:youruserid@ase.ncsu.edu:$HOME/cvs/projectname checkout toolsrc This will create a directory toolsrc at your current location; inside there will be a directory CVS containing some internal data. Importing dataTo import your data to CVS repository, copy all the files to be imported to the newly created directory, change to the directory and run: cvs add filename (for every file you want to add; including in subdirectories) (Wildcards in filenames and directory names are allowed). Then run: cvs commit . After some dialog, the files you selected are committed to the repository. Day-to-day businesscvs update . - run this command before changing anything in your cvs add filename - add a new file to the repository cvs remove -f filename - remove a file from the repository cvs commit . - commit changes to the repository; run it after cvs status . - display status of the files in the repository. cvs --help command - give a detailed help on the command Tagging and branchingMarking important versionsTagging is used to mark a particular version of file or repository. You want to use it for example for marking exact version of the text document that you have submitted to a journal or conference. cvs tag cpm-submission . - mark all files with tag "cpm-submission" cvs -d /cvs/root checkout -r cpm-submission project BranchingHere is an example where you may want to use branching. You finished a draft version of article, which you would later want to extent to a long journal version. Now you want to submit to a conference and you need to cut the long version to fit the page limit for the conference submission. Before you start cutting, you want branch the conference version from the main stream. cvs tag -b cpm-submission . Now there are two versions: HEAD (which is still the one checkout in the current directory) and cpm-submission. To edit the cpm-submission version, you need to checkout a new copy: cvs -d /cvs/root checkout -r cpm-submission -d projectname-cpm projectname This will create a new directory projectname-cpm with the branch. If you did everything correctly, cvs status command should show so called "sticky tag cpm-submission" associated with the files in the new directory. Both versions (HEAD in projectname and cpm-submission in projectname-cpm) can now be edited separately. (Changes can be later merged between branches; this is, however, outside of scope of this document.) You can setup ssh not to ask for your password. Here is a relevant portion of man ssh: The public key method is similar to RSA authentication described in the Make CVS
ignore certain resources with .cvsignore
You don't to add to CVS those unnecessary files such as *.pdf, *.tmp,
*.ps (in cvsing LaTeX source files) and *.class, .classpath, .project
(in both cvsing LaTeX source files and Java source files). Otherwise it
will only bloat the CVS repositories unncessarily. |
| Home News People Research Funding Publications Presentations Software Blog Wiki Roles Meeting Deadlines Summary Server Pictures |




