cvs tutorial
play

CVS Tutorial An Introduction to Using C VS Versions System - PowerPoint PPT Presentation

CVS Tutorial An Introduction to Using C VS Versions System Concurrent * history: when? why? * collaboration * examine old revisions * bugfix releases Steve Robbins p. 1/19 CVS Tutorial checkout Repository commit Workspace p.


  1. CVS Tutorial An Introduction to Using C VS Versions System Concurrent * history: when? why? * collaboration * examine old revisions * bugfix releases Steve Robbins – p. 1/19

  2. CVS Tutorial checkout Repository commit Workspace – p. 2/19

  3. CVS Tutorial checkout commit commit edit edit – p. 3/19

  4. ✏ ✒ ✏ ✏ ✗ ✔✕ � ✔ ✔ ✓ ✓ ✒ ✏ ✒ ✒ ✒ ✒ ✒ ✒ ✒ ✓ ✓ ✏ ✕ ✓ ✖ �✁✂ ✂✄☎ ☎✆ ✝✞✟ ✟✠✡ ✡☛ ☞ ☞ ☞ ✌ ✎ ✌ ✌ ✎ ✎ ✎ ✎ ✎ ✎ ✎ ✓ CVS Tutorial ✎✑✏ ☞✍✌ ✖✍✗ cvs −d repository−name checkout module−name > cvs −d /software/examples checkout hello cvs checkout: Updating hello U hello/Makefile U hello/hello.c U hello/world.c – p. 4/19 U hello/world.h

  5. CVS Tutorial > cd ~/src > cvs −d /software/examples checkout hello cvs checkout: Updating hello U hello/Makefile U hello/hello.c U hello/world.c U hello/world.h checkout > cd hello > ls CVS Makefile hello.c world.c world.h > ls CVS Entries Repository Root – p. 5/19

  6. CVS Tutorial > cvs commit cvs commit: Examining . CVS: −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− CVS: Enter Log. Lines beginning with ‘CVS:’ are removed automatically CVS: CVS: Committing in . $CVSEDITOR $EDITOR Checking in hello.c; /software/examples/hello/hello.c,v <−− hello.c commit new revision: 1.2; previous revision: 1.1 done – p. 6/19

  7. CVS Tutorial > cvs add README cvs add: scheduling file ‘README’ for addition cvs add: use ’cvs commit’ to add this file permanently > cvs commit cvs commit: Examining . RCS file: /software/examples/hello/README,v done Checking in README; /software/examples/hello/README,v <−− README initial revision: 1.1 done commit add create ChangeLog ChangeLog file rm filename; cvs remove filename Remove files: – p. 7/19 Rename files: remove then add

  8. CVS Tutorial The Source Tree 1.1.3 1.4 release−2_0 1.3 1.2 1.3 1.2 1.1.2 1.1 1.0.1 1.2.2.1 release−1_1 1.3 1.0 1.1 1.2 file C 1.2 1.1 1.1 release−1_0 1.0 1.0 1.0 1.0 file E file D – p. 8/19 file A file B

  9. CVS Tutorial 1.4 1.2 1.3 1.1 README 1.1 Makefile 1.0 1.0 1.1 1.0 tag hello.c 1.0 1.4 README hello.c Makefile > cvs tag release−1_0 release−1_0 cvs tag: Tagging . 1.4 T Makefile 1.2 1.3 T README T hello.c 1.1 1.1 1.0 1.0 1.0 README hello.c Makefile Moral: use cvs tag −c ... – p. 9/19

  10. CVS Tutorial Collaborative Development checkout checkout You Developer X. – p. 10/19

  11. CVS Tutorial commit update You Developer X. > cvs update cvs update: Updating . U ChangeLog – p. 11/19 U README

  12. CVS Tutorial > cvs commit cvs commit: Examining . cvs commit: Up−to−date check failed for ‘README’ cvs commit: Up−to−date check failed for ‘hello.c’ cvs [commit aborted]: correct above errors first! 1.4 1.1 commit 1.3 checkout 1.2 1.1 1.1 1.0 1.0 1.0 README hello.c Makefile You Developer X. Moral: update before commit. – p. 12/19

  13. CVS Tutorial Update (revisited) > cvs update cvs update: Updating . U ChangeLog M Makefile RCS file: /software/examples/hello/hello.c,v retrieving revision 1.5 retrieving revision 1.6 Merging differences between 1.5 and 1.6 into hello.c 1.3 1.6 M hello.c ? hello 1.5 1.1 1.2 1.4 1.3 1.1 1.2 1.1 1.0 1.1 1.0 1.0 1.0 README hello.cChangeLog – p. 13/19 Makefile

  14. CVS Tutorial > cvs update cvs update: Updating . RCS file: /software/examples/hello/hello.c,v retrieving revision 1.9 retrieving revision 1.10 Merging differences between 1.9 and 1.10 into hello.c rcsmerge: warning: conflicts during merge cvs update: conflicts found in hello.c C hello.c� int main( int ac, char* av[] )� { int show_doom = 0;� int main( int ac, char* av[] )� if ( ac > 1 && strcmp( av[1], "−d" ) == 0 )� { show_doom = 1;� if ( ac != 1 ) { printf( "Hello, world.\n" );� fprintf( stderr, "usage ..." );� return 1; if ( show_doom )� } printf( "You have %f days until the " printf( "Hello, world.\n" );� " millenium.\n", doom_days() ); } } commit 1.10 int main( int ac, char* av[] )� int main( int ac, char* av[] )� 1.9 { { printf( "Hello, world.\n" );� printf( "Hello, world.\n" );� } } hello.c You Developer X. – p. 14/19

  15. CVS Tutorial Conflict Resolution int main( int ac, char* av[] )� int main( int ac, char* av[] )� { { if ( ac != 1 ) { int show_doom = 0;� fprintf( stderr, "usage ..." );� return 1; if ( ac > 1 && strcmp( av[1], "−d" ) == 0 )� } show_doom = 1;� printf( "Hello, world.\n" );� printf( "Hello, world.\n" );� } if ( show_doom )� hello.c before update printf( "You have %f days until the " " millenium.\n", doom_days() ); } revision 1.10 int main( int ac, char* av[] ) { <<<<<<< hello.c if ( ac != 1 ) { fprintf( stderr, "usage: hello\n" ); return 1; } ======= int show_doom = 0; if ( ac > 1 && strcmp( av[1], "−d" ) == 0 ) show_doom = 1; >>>>>>> 1.10 printf( "Hello, world.\n" ); if ( show_doom ) printf( "You have %f days until the " " millenium.\n", doom_days() ); } – p. 15/19 hello.c after update

  16. CVS Tutorial Why Branch? 1.1 1.6 1.5 1.1 1.0 ChangeLog 1.4 release−1_0 1.3 1.1 1.0 1.2 1.1 1.0 1.0 – p. 16/19 README Makefile hello.c

  17. CVS Tutorial release−3_5 2.2.1.1 7 1.1 . 3 4 1.0 . 2 2.5.1.2 3.6.1.1 foo.c 2.5.1.1 3 . 2 release−3_4−fixes release−3_4_1 release−3_4 2.5 > cvs tag −b release−3_4−fixes cvs tag: Tagging . 2.4 3.6 2.1.2 T README hello.c T Makefile Makefile README – p. 17/19 T hello.c

  18. CVS Tutorial checkout (revisited) cvs −d repository−name checkout module−name = latest revisions on HEAD branch (main trunk) cvs −d repository−name checkout −r release−tag module−name = revisions selected by tag name cvs −d repository−name checkout −r branch−tag module−name = latest revisions on specified branch also: −D date examples: −D "13:45 1 December 1997" −D "5 days ago" – p. 18/19

  19. CVS Tutorial Command Summary cvs −d repository init = create a new repository cvs −d repository import module vendor−tag release−tag = create a new module cvs −d repository checkout [−r tag] module cvs update [−r tag] cvs add file ... cvs remove file ... cvs commit cvs tag −c [−b] tag cvs log = list log messages, tags, etc cvs status = up−to−date, locally−modified, etc cvs diff −r rev1 −r rev2 file – p. 19/19 = difference between specified revisions

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend