-
Notifications
You must be signed in to change notification settings - Fork 15
[build website]patch docs #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
``` |
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. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
```bash | ||||||||||
cd $TOP_SRCDIR | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
``` | ||||||||||
|
||||||||||
#### 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 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
``` | ||||||||||
|
||||||||||
#### 6) Rebuild the Source Code | ||||||||||
|
||||||||||
Now rebuild using make command | ||||||||||
|
||||||||||
```bash | ||||||||||
make check | ||||||||||
make | ||||||||||
Comment on lines
+64
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
``` |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.