-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from r-devel/patch-docs
[build website]patch docs
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## Creating a Patch File | ||
|
||
We can also create a patch file for the update and changes that we made to the source code. | ||
|
||
1) Assuming we have made a change and we want to submit a patch. | ||
|
||
If necessary, update the version of R you are working on, with the latest changes in <https://svn.r-project.org/R/trunk/>. | ||
|
||
E.g. if the version of R you are working on is named "R-devel-working" | ||
|
||
```bash | ||
cd $TOP_SRCDIR/R-devel-working | ||
svn update | ||
cd $BUILDDIR/R-devel-working | ||
make # this will run the configure as before | ||
``` | ||
|
||
2) Now run R's test suite to make sure that your change has not broken anything: | ||
|
||
```bash | ||
make check | ||
``` | ||
|
||
3) Then create a patch. The patch file will be saved inside the patchdir directory. | ||
|
||
```bash | ||
cd "$TOP_SRCDIR" | ||
svn update | ||
svn diff > $PATCHDIR/patch.diff | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
## Updating Source Code | ||
|
||
After following through the Contribution workflow and making the following changes, we need to update it inside the source code directory. To do so, first we need to follow this steps: | ||
|
||
#### 1) Change Directory to TOP_SRCDIR | ||
|
||
If you are currently inside the BUILDDIR directory or root directory(/workspaces/r-dev-env) make sure to change it to TOP_SRCDIR so that we can update the changes made inside our source code. | ||
|
||
```bash | ||
cd $TOP_SRCDIR | ||
``` | ||
|
||
#### 2) Update using svn | ||
|
||
Now we want to update the source code for that we will use svn command update | ||
|
||
```bash | ||
svn update | ||
``` | ||
|
||
#### 3) Check changes made using diff | ||
|
||
To cross check the changes we made in source code. We will use this command | ||
|
||
```bash | ||
svn diff | ||
``` | ||
|
||
#### 4) Revert Changes(Optional step) | ||
|
||
In some cases, we might want to revert the changes we made. We can use the revert command | ||
|
||
To revert the changes made in specific file, we can use | ||
|
||
```bash | ||
svn revert src/library/utils/R/askYesNo.R | ||
``` | ||
|
||
To revert changes in a directory | ||
|
||
```bash | ||
svn revert src/lib/utils | ||
``` | ||
|
||
To revert all local changes | ||
|
||
```bash | ||
svn revert -R . | ||
``` | ||
|
||
#### 5) Change Directory and Rebuild | ||
|
||
To rebuild the R version and reflect on the changes made, we want to change directory to BUILDDIR from TOP_SRCDIR | ||
|
||
```bash | ||
cd $BUILDDIR | ||
``` | ||
|
||
#### 6) Rebuild the Source Code | ||
|
||
Now rebuild using make command | ||
|
||
```bash | ||
make check | ||
make | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters