Difference between revisions of "Version Control"
Foxfirefey (Talk | contribs) |
Foxfirefey (Talk | contribs) |
||
Line 41: | Line 41: | ||
--no-space-changes -b Do not display whitespace differences. | --no-space-changes -b Do not display whitespace differences. | ||
− | == Updating to the latest code == | + | === Updating to the latest code === |
See the [[Dev Maintenance]] article for instructions on this. | See the [[Dev Maintenance]] article for instructions on this. | ||
− | == Displaying code changes == | + | === Displaying code changes === |
This will show all the changes you've made to the code: | This will show all the changes you've made to the code: | ||
Line 55: | Line 55: | ||
.$LJHOME/bin/cvsreport.pl -diff > PATCHFILE. | .$LJHOME/bin/cvsreport.pl -diff > PATCHFILE. | ||
− | == Reverting changes == | + | === Reverting changes === |
There is unfortunately no <code>.$LJHOME/bin/cvsreport.pl -revert</code>. One way to revert changes is to delete the file with the changes from the live code and then run: | There is unfortunately no <code>.$LJHOME/bin/cvsreport.pl -revert</code>. One way to revert changes is to delete the file with the changes from the live code and then run: |
Revision as of 17:47, 16 September 2008
The Dreamwidth code uses a Mercurial repository. However, it also uses code that uses different repository systems like subversion.
Contents
Checking out the code
Get the bootstrap script that downloads all of the code:
wget http://hg.dwscoalition.org/dw-free/raw-file/e4be2e864b95/bin/bootstrap.pl
If your $LJHOME
environment variable is set up (see Dreamwidth Scratch Installation for more information on this), run the script:
perl bootstrap.pl
Checking out all the various packages and repositories will take same time. Afterwards, you can delete the bootstrap script:
rm bootstrap.pl
Working with $LJHOME/bin/cvsreport.pl
The workhorse that ties all the version control systems of all the code bases together is $LJHOME/bin/cvsreport.pl
. With it, you can update to new versions and track changes.
Here is a list of the options that come up with bin/cvsreport.pl -help
:
--help Get this help --sync Put files where they need to go. All files, unless you specify which ones. --diff Show diffs of changed files. --cvsonly Don't consider files changed in live dirs. --liveonly Don't consider files changed in the CVS dirs. --init Copy all files from cvs to main, unconditionally. --update Updates files in the CVS dirs from the cvs repositories. --justfiles -1 Only output files, not the old -> new arrow. (good for xargs) --livelist -ll Output the list of all accounted-for files. --which Output the source of the given file --these -t Refuse to --sync if no files are specified. --map Like --livelist and --which combined. --all Overrides --these, allowing --sync to run with no args. --print-current-branches -pcb Print repositories and their current branches --print-branches -pb Print repositories and their branches. --print-repos -pr Print repositories and their resource URLs. --print-vars -pv Print configuration variables specified in .conf files. --no-space-changes -b Do not display whitespace differences.
Updating to the latest code
See the Dev Maintenance article for instructions on this.
Displaying code changes
This will show all the changes you've made to the code:
.$LJHOME/bin/cvsreport.pl -diff
You can make a patch by directing this output to a file (see Dev Patches for more information on patches):
.$LJHOME/bin/cvsreport.pl -diff > PATCHFILE.
Reverting changes
There is unfortunately no .$LJHOME/bin/cvsreport.pl -revert
. One way to revert changes is to delete the file with the changes from the live code and then run:
bin/cvsreport.pl -sync -cvsonly
Committing changes
Right now, only xb95 can do this.
- Apply patch to live code
- Test the patch
- Sync to the cvs copy of the code:
-
hg diff
in the repository -
hg commit
-
hg push