Sunday, January 24, 2010

svn command on linux

1.svn --help
List Subversion commands
2.svn help command Also: ? or h
Help on given "command"
3.svn add filename
svn add directory
Add a file or directory to Subversion CM control.
Must also perform: svn ci filename (or svn commit) to upload the file or directory. File will not be available in the repository until a "commit" is performed. If adding a directory, the directory and all of its contents recursively are added. i.e.:
svn ci directory
svn commit directory
svn commit .
4.svn cleanup
Cleanup subversion files resulting from escaped processes and crashed.
5.svn commit filename
svn commit --message "Message goes here." filename
svn commit -m "Message goes here." filename
svn ci filename1 filename2 filename3
svn ci .
Check-in (commit) local "working" file, files or directory and contents (recursively) into Subversion repository. Atomic, i.e. all committed or none, no incomplete check-in.
6.svn diff filename
svn di filename
Show file diffs between SVN repository and your file changes using GNU file diff format. Use GUI diff tools as shown below.

Saturday, January 16, 2010

Review for previous class

Prefix increment vs Postfix increment
int main(){
int a=0;
int b=0;
int c=0;
c = a++ + 36;//c will be 36 a will be 1. a is 0 and when this operation finish a get //added
printf("%d",c);
}

int main(){
int a=0;
int b=0;
int c=0;
c = ++a + 36;//c will be 37 a will be 1. before operation a get added and affect //result
printf("%d",c);
}