11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Advanced Topicshe could explicitly list only the files that make up that changelist on the svn diff commandline.$ svn diff integer.c mathops.cIndex: integer.c===================================================================--- integer.c (revision 1157)+++ integer.c (working copy)…Index: mathops.c===================================================================--- mathops.c (revision 1157)+++ mathops.c (working copy)…$That works okay for a few files, but what if Harry's change touched 20 or 30 files? Thatwould be an annoyingly long list of explicitly named files. Now that he's using changelists,though, Harry can avoid explicitly listing the set of files in his changelist from now on, andinstead provide just the changelist name:$ svn diff --changelist math-fixesIndex: integer.c===================================================================--- integer.c (revision 1157)+++ integer.c (working copy)…Index: mathops.c===================================================================--- mathops.c (revision 1157)+++ mathops.c (working copy)…$And when it's time to commit, Harry can again use the --changelist option to limit thescope of the commit to files in a certain changelist. He might commit his user interface fixby doing the following:$ svn ci -m "Fix a UI bug found while working on math logic." \--changelist ui-fixSending button.cTransmitting file data .Committed revision 1158.$In fact, the svn commit command provides a second changelists-related option: --keep-changelists. Normally, changelist assignments are removed from files after theyare committed. But if --keep-changelists is provided, <strong>Subversion</strong> will leave thechangelist assignment on the committed (and now unmodified) files. In any case, committingfiles assigned to one changelist leaves other changelists undisturbed.$ svn status--- Changelist 'math-fixes':M integer.cM mathops.c$80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!