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.

Repository Administration* Dumped revision 2.…* Dumped revision 25.* Dumped revision 26.At the end of the process, you will have a single file (dumpfile in the previous example)that contains all the data stored in your repository in the requested range of revisions. Notethat svnadmin dump is reading revision trees from the repository just like any other“reader” process would (e.g., svn checkout), so it's safe to run this command at any time.The other subcommand in the pair, svnadmin load, parses the standard input stream as a<strong>Subversion</strong> repository dump file and effectively replays those dumped revisions into thetarget repository for that operation. It also gives informative feedback, this time using thestandard output stream:$ svnadmin load newrepos < dumpfile>>…>>The result of a load is new revisions added to a repository—the same thing you get bymaking commits against that repository from a regular <strong>Subversion</strong> client. Just as in a commit,you can use hook programs to perform actions before and after each of the commitsmade during a load process. By passing the --use-pre-commit-hook and --use-post-commit-hook options to svnadmin load, you can instruct <strong>Subversion</strong> to executethe pre-commit and post-commit hook programs, respectively, for each loaded revision.You might use these, for example, to ensure that loaded revisions pass through thesame validation steps that regular commits pass through. Of course, you should use theseoptions <strong>with</strong> care—if your post-commit hook sends emails to a mailing list for each newcommit, you might not want to spew hundreds or thousands of commit emails in rapid successionat that list! You can read more about the use of hook scripts in the section called“Implementing Repository Hooks”.Note that because svnadmin uses standard input and output streams for the repositorydump and load processes, people who are feeling especially saucy can try things such asthis (perhaps even using different versions of svnadmin on each side of the pipe):$ svnadmin create newrepos$ svnadmin dump oldrepos | svnadmin load newrepos141

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

Saved successfully!

Ooh no, something went wrong!