Updated to match our current hg practices.
diff --git a/ContributionReviews.wiki b/ContributionReviews.wiki index f9caee8..30a3095 100644 --- a/ContributionReviews.wiki +++ b/ContributionReviews.wiki
@@ -72,24 +72,9 @@ [MailingListsGuidelines#Developer_list developer mailing list] when a [ContributionReviews#Committers committer] commits a change using `hg`. -Patches should be presented for review in the "unified `diff`" format, -which is the output resulting from the `svn diff` command for Subversion (the same format -as that produced by `diff -uNr`) or `hg diff` command for Mercurial. This is also the same format as the diff contained in the commit log messages emailed to the developer mailing list. - -One special note about creating patches: please create the patch from -the main directory (or the `/wiki/` directory if it is a documentation -change, please note that `/wiki' directory is still on SVN repository), so that the reviewers and potential committers can apply the -patch from the base of their main working copy. For example, for -a checkout of `http://soc.googlecode.com/hg/` to `~/code/melange`, -create the code review patch with something like: - -using SVN: - -{{{ -cd ~/code/melange -svn diff soc/models/new_model.py soc/views/deleted_model.py > my_change.diff -}}} - +Patches should be presented for review either in the "unified `diff`" format, +which is the output resulting from the `hg diff` command for Mercurial (the same format +as that produced by `diff -uNr`), in "git patch" format, which is generated by `git diff` if using git, or in `hg patch` format. using Mercurial: {{{ @@ -103,13 +88,6 @@ hg diff -r REV1 -r REV2 > my_change.diff }}} -Using git (assuming origin/master is current upstream and that the desired changes have been committed): - -{{{ -cd ~/code/melange -git format-patch --no-color --no-prefix --no-numbered origin/master.. -}}} - In this example, `new_model.py` would be a newly-added module, and `deleted_model.py` would be a just-deleted module. The reviewer can then apply the patch using something like: @@ -119,14 +97,7 @@ patch -p0 < my_change.diff }}} -Or, if using git: - -{{{ -cd ~/code/melange -git apply --whitespace=fix -p0 my_change.diff -}}} - -The same root directory approach should be used with +The same root approach should be used with [http://codereviews.googleopensourceprograms.com/static/upload.py `upload.py`] to submit [ContributionReviews#Using_Rietveld_for_code_reviews Rietveld code reviews]. @@ -143,46 +114,7 @@ both "small" and "non small" ones, include the diff itself as an email attachment, to make it easier for reviewers to patch the change into a working copy with `patch`. Such a diff attachment can be produced with -something like: - -using SVN: - -{{{ -svn diff some_module.py > some_module.diff -}}} - -using Mercurial: - -{{{ -hg diff some_module.py > some_module.diff -}}} - -Or, if using git: - -{{{ -git format-patch --no-color origin/master.. -}}} - -For multiple files changed in the same patch, use something like: - -using SVN: - -{{{ -svn diff some_module.py some_other_module.py > my_new_feature.diff -}}} - -and Mercurial: - -{{{ -hg diff some_module.py some_other_module.py > my_new_feature.diff -}}} - -If using git just commit the changes and use format-patch to generate the diff. -If using Mercurial and you have already committed your changes locally you can command below to create a patch of changes between two revisions: - -{{{ -hg diff -r REV1 -r REV2 > my_change.diff -}}} +the methods described above: Alternately, committers can use `upload.py` to submit [ContributionReviews#Using_Rietveld_for_code_reviews Rietveld code reviews]. @@ -209,86 +141,11 @@ -- soc/models/new_model.py soc/models_deleted_model.py }}} -Or, if using git: - -{{{ -cd ~/code/melange -./thirdparty/rietveld/upload.py origin/master -}}} - To upload an updated diff for an existing code review in progress, simply supply the extra `--issue=<the existing issue number>` option. Rietveld will then display the deltas between the previously supplied diff and the new one. -==== Using gcl to manage change sets (*Depracated since we switched to Mercurial repository and gcl supports only SVN)*==== - -Another useful tool for collecting multiple changes into a single "change -set" for review is `gcl.py`. A copy of `gcl.py` that has been customized -to upload change sets to -[http://codereviews.googleopensourceprograms.com the Melange instance of Rietveld] -can be found in `thirdparty/chromium/gcl.py`. `gcl.py` has quite a few features, -but to get started creating a change set: - -{{{ -cd ~/svn/soc -./thirdparty/chromium/gcl.py change some_change_set_name -}}} - -where `some_change_set_name` is the mnemonic name of the change set you are -creating. This will open an editor where you can modify the change set -description. The editor will contain something like: - -{{{ ----All lines above this line become the description. ----Repository Root: /home/joe/svn/soc ----Paths in this changelist (some_change_set_name): - - ----Paths modified but not in any changelist: - -M trunk/app/soc/models/document.py -A trunk/app/soc/logic/user -M trunk/app/index.yaml -}}} - -which you then modify something like: - -{{{ -Add Foo feature to document.py. - -Patch by: Joe User ----All lines above this line become the description. ----Repository Root: /home/joe/svn/soc ----Paths in this changelist (some_change_set_name): - -M trunk/app/soc/models/document.py - ----Paths modified but not in any changelist: - -A trunk/app/soc/logic/user -M trunk/app/index.yaml -}}} - -The "description" will become the `svn` log message, so be sure -to follow the -[ContributionReviews#svn_commit_messages message format] -in this "description" portion of the change set. By the way, you can -omit this part of the log message format from your "description": - -{{{ -Review issue: N -Review URL: http://codereviews.googleopensourceprograms.com/N -}}} - -since `gcl.py` will add the "Review URL" for you when you commit -(which is very convenient). - -The `gcl.py upload` command is used to upload the change set to -[http://codereviews.googleopensourceprograms.com the Melange instance of Rietveld] -for code review. See `gcl.py help` for a complete command list -and additional details. - ==== Suggested patches from casual contributors ==== The Melange community is interested in patches and other contributions @@ -340,12 +197,6 @@ This feature can also be used by project owners and members to do review-after-commit style code reviews. -=== Other code review possibilities === - -In the future, tools like -[http://code.google.com/p/gvn/ Gvn Versions Nicely] might be used for -"review then commit" code reviews that make use of a "change branch" model. - === Committing === Once all of the @@ -362,12 +213,12 @@ Committers should use the template below for `hg commit` log messages: {{{ -One line, under 60-80 characters giving a short description of the change +One line, under 70 characters giving a short description of the change After a blank line, a more detailed log message explaining the reason of the change (not necessarily what was changed, as that can be seen by readin the patch). Please wrap your lines -at 60-80 characters again. +at 70 characters again. }}} Optionally if committing contributor patch please include: @@ -377,7 +228,7 @@ }}} Note that previously the person listed with "Patch by:" was the contributor (that -is, author) of the patch, however recently we have switched to Mercurial and now we are committing patch from contributors as if they would have commit access using command: +is, author) of the patch, however we have switched to Mercurial and now we are committing patch from contributors as if they would have commit access using command: {{{ hg commit -u "FirstName LastName <somebody@example.com>"