Information for OPL maintainers

From WeBWorK
(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
  
 
# Go to [http://github.com github] and create an account (if you do not have one already).  It is free.
 
# Go to [http://github.com github] and create an account (if you do not have one already).  It is free.
# Step 2
+
# Contact one of principal OPL maintainers with your github login to have them add you the list of committers
 +
# If you do not have an ssh key (look for a file ending in ".pub" in your <code>~/.ssh</code> directory
  
 
==When Fixing a Bug==
 
==When Fixing a Bug==
  
# `cd` to your copy of the OPL git repository
+
# <code>cd</code> to your copy of the OPL git repository
# `git pull` -- this brings in any changes made to OPL problems
+
# <code>git pull</code> -- this brings in any changes made to OPL problems
# fix a bug
+
# Fix a bug
# `git commit -a`, and give a useful commit message.  Note, this will commit changes to *every* file you have modified.  If you see that more files are going to be committed which you did not intend, leave the commit message blank; it will abort the commit.
+
# <code>git commit -a</code>, and give a useful commit message.  In particular, if this is a bug from bugzilla, mention that you fixed the bug with the bug number.  Note, this will commit changes to *every* file you have modified.  If you see that more files are going to be committed which you did not intend, leave the commit message blank; it will abort the commit.
# `git add path/to/file`  
+
# Alternatively, if you want to only commit a change to a particular file, first give `git add path/to/file`, and then `git commit`
 +
# <code>git push</code> -- this sends your changes back to github
 +
# Mark the bug as fixed in bugzilla with a brief note about the fix
  
 
==Auxilliary Commands==
 
==Auxilliary Commands==
Line 20: Line 23:
 
On your home machine, cd to the OPL git repository.  From there you can
 
On your home machine, cd to the OPL git repository.  From there you can
  
* `git status` -- shows a list of problems which have been modified on your machine
+
* <code>git status</code> -- shows a list of problems which have been modified on your machine
 +
* <code>git diff</code> -- shows diffs for all problems which have been modified on your machine

Revision as of 17:56, 10 March 2013

Here is information for OPL maintainers.


Initial Setup

The OPL is kept as a git repository at github. There is a little work to do to get set up, but then committing your bug fixes back to the main repository is fairly easy. Steps in this section only need to be done once.

  1. Go to github and create an account (if you do not have one already). It is free.
  2. Contact one of principal OPL maintainers with your github login to have them add you the list of committers
  3. If you do not have an ssh key (look for a file ending in ".pub" in your ~/.ssh directory

When Fixing a Bug

  1. cd to your copy of the OPL git repository
  2. git pull -- this brings in any changes made to OPL problems
  3. Fix a bug
  4. git commit -a, and give a useful commit message. In particular, if this is a bug from bugzilla, mention that you fixed the bug with the bug number. Note, this will commit changes to *every* file you have modified. If you see that more files are going to be committed which you did not intend, leave the commit message blank; it will abort the commit.
  5. Alternatively, if you want to only commit a change to a particular file, first give `git add path/to/file`, and then `git commit`
  6. git push -- this sends your changes back to github
  7. Mark the bug as fixed in bugzilla with a brief note about the fix

Auxilliary Commands

On your home machine, cd to the OPL git repository. From there you can

  • git status -- shows a list of problems which have been modified on your machine
  • git diff -- shows diffs for all problems which have been modified on your machine
follow us