Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
557c031
Update patch naming documentation and fix markdown lint errors (close…
avinab-neogy Jun 13, 2025
ce6a533
Fix markdown lint errors
avinab-neogy Jun 13, 2025
7fc24fb
minor edits to patch tutorial
hturner Jun 13, 2025
fd2bffa
Merge pull request #231 from avinab-neogy/docs/220-patch-naming
hturner Jun 13, 2025
539e6f9
update mkdocs workflow
hturner Jun 16, 2025
1d18d29
Merge pull request #238 from r-devel/docs/deploy
hturner Jun 16, 2025
51db03f
update paths to trigger mkdocs action
hturner Jun 16, 2025
899ea1b
Merge branch 'main' into docs/deploy
hturner Jun 16, 2025
b729f23
Merge pull request #239 from r-devel/docs/deploy
hturner Jun 16, 2025
5313251
try setting GH PAT in credential.helper store
hturner Jun 16, 2025
289b16c
Merge pull request #242 from r-devel/workflows/gh-pat
hturner Jun 16, 2025
0babdff
Add files via upload
Siddd-hrr Aug 29, 2025
76c06a9
Add files via upload
Siddd-hrr Aug 29, 2025
521792e
Merge branch 'devel' into Add_Using_Source_Control_Docs
Siddd-hrr Oct 6, 2025
76c6f13
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Oct 6, 2025
a995f9d
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Oct 6, 2025
7ad11b0
Rename Using_Source_Control_View .md to Using_Source_Control_View.md
Siddd-hrr Oct 6, 2025
1279568
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Oct 6, 2025
b83e27b
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Oct 6, 2025
1e8ac3b
Update Using_Source_Control_View.md
Siddd-hrr Oct 10, 2025
b7a0a8e
Update Using_Source_Control_View.md
Siddd-hrr Oct 10, 2025
43981fa
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Oct 10, 2025
76f8aa0
Update Using_Source_Control_View.md
Siddd-hrr Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 25 additions & 38 deletions .github/workflows/build-mkdocs-website.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Build MkDocs website
name: Build MKDocs website

on:
workflow_dispatch:
push:
branches: ["main","devel"]
paths:
- '.github/workflows/build-mkdocs-website.yml'
pull_request:
branches: ["main","devel"]
types: [closed]
Expand All @@ -18,28 +14,14 @@ jobs:
build-and-deploy:
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
github.event.pull_request.merged == true)
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Validate PAT
env:
GH_PAT: ${{ secrets.R_DEV_ENV_DOCS }}
run: |
curl -H "Authorization: token $GH_PAT" \
https://api.github.com/user || {
echo "PAT is invalid or expired" >&2
exit 1
}

- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.R_DEV_ENV_DOCS }}

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -49,36 +31,41 @@ jobs:
- name: Install dependencies
run: pip install mkdocs mkdocs-material[imaging]

- name: Determine target repo
- name: Determine deployment settings
id: config
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT"
echo "target_repo=${{ github.repository }}" >> "$GITHUB_OUTPUT"
echo "url=https://contributor.r-project.org/r-dev-env" >> "$GITHUB_OUTPUT"
else
echo "repo=${{ github.repository }}-devel" >> "$GITHUB_OUTPUT"
echo "target_repo=r-devel/r-dev-env-devel" >> "$GITHUB_OUTPUT"
echo "url=https://contributor.r-project.org/r-dev-env-devel" >> "$GITHUB_OUTPUT"
fi

- name: Modify site_url for development documentation
- name: Modify site_url in mkdocs.yml
run: |
if [[ "${{ github.ref_name }}" != "main" ]]; then
site_url=https://contributor.r-project.org/r-dev-env-devel
echo "Setting site_url to '${site_url}'"
sed -i "s|^site_url:.*|site_url: '${site_url}'|" mkdocs.yml
fi
echo "Setting site_url to ${{ steps.config.outputs.url }}"
sed -i "s|^site_url:.*|site_url: '${{ steps.config.outputs.url }}'|" mkdocs.yml

- name: Build MkDocs
run: mkdocs build

- name: Validate PAT
env:
GH_PAT: ${{ secrets.R_DEV_ENV_DOCS }}
run: |
curl -H "Authorization: token $GH_PAT" https://api.github.com/user || {
echo "PAT is invalid or expired" >&2
exit 1
}

- name: Deploy to GitHub Pages
env:
GH_PAT: ${{ secrets.R_DEV_ENV_DOCS }}
run: |
echo "Deploying from branch: ${{ github.ref_name }}"
echo "Commit: ${{ github.sha }}"
echo "Deploying to: ${{ steps.config.outputs.repo}}"

git config --global user.email "github-actions@github.com"
git config --global user.name "github-actions"

git remote set-url origin \
https://github.com/${{ steps.config.outputs.repo }}
mkdocs gh-deploy --config-file mkdocs.yml \
--remote-branch gh-pages --force
git config --global credential.helper store
echo "https://x-access-token:${GH_PAT}@github.com" > ~/.git-credentials
git remote set-url origin https://github.com/${{ steps.config.outputs.target_repo }}
mkdocs gh-deploy --config-file mkdocs.yml --remote-branch gh-pages --force
3 changes: 0 additions & 3 deletions INIT

This file was deleted.

Binary file added docs/assets/svn1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/svn9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions docs/tutorials/Using_Source_Control_View.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

### Where to find ***"Source Control"*** ?

(`Ctrl + Shift + G`)
![alt text](../assets/svn1.png)

### What exactly Source Control is ?

1. Source Control in Visual Studio Code (VS Code) is a built-in
feature that helps you to track, manage, and collaborate on
code changes using version control systems, especially Git.

2. Source Control tracks every change you make to your code,
lets you undo mistakes, and helps you work with others.

3. *for example*:- *Let's take a example rewriting a
code of askYesNo() function which we have seen
previously in*
[contribution_workflow.md](https://upgraded-computing-machine-4j6p6p44q5vvcq74x-8000.app.github.dev/tutorials/contribution_workflow/)

*

![alt text](../assets/svn2.png)

### What are the different features of Source Control?

Shows all modified, added, deleted, and renamed files
since the last commit.

***Files are grouped into:***

* Changes ->
* Files that have been modified, created, or deleted but
not yet staged.
* These are shown uncommitted.

![alt text](../assets/svn9.png)

### How to make a Change List ?

![alt text](../assets/svn5.png)

* Enter the name of your change-List

After just Press `Enter` to create a Change-List
for your Changes

![alt text](../assets/svn8.png)

* ***Open Accessible Diff Viewer: (`F7`)***

![alt text](../assets/svn10.png)
* View your changes(Diff) made at Present:(`F7`)
* ![alt text](../assets/svn12.png)

* ***Revert Changes***
* All the edits we have done in askYesNo() function
will undone
* ![alt text](../assets/svn3.png)

* Output:
* ![alt text](../assets/svn7.png)

* **Note:**
*Creating a Change-List for your changes helps
you revert a block of changes, undoing all of
them at once.*

* **Note:**
*When we restart our VSCode, Codespace session,
or workspace, it forgets about the SVN repository
that we fetched.*

* *The svn command lets you recognize your fetched SVN
repository again in the Source Control panel.*

```bash
cd $TOP_SRCDIR
svn update
```

* ***Update:***
* The Update option shown in the image below provides
the same output as the command mentioned above.

* ![alt text](../assets/svn15.png)
16 changes: 13 additions & 3 deletions docs/tutorials/patch_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,24 @@ this first.

Go to the source directory and use `svn diff` to create a patch.

**Use a descriptive patch name with the bug number and a short description,
rather than a generic name like `patch.diff`.**

```bash
cd $TOP_SRCDIR
svn diff > $PATCHDIR/patch.diff
svn diff > $PATCHDIR/16629-infinite-recursion.diff
```

The example above uses `16629-infinite-recursion.diff` - this name follows the
convention: bug number (16629), short description (infinite-recursion), and
`.diff` extension, making patches easy to identify and review.

The patch file will be saved in the directory specified by the PATCHDIR
environment variable that is defined when the codespace starts
environment variable that is defined when the codespace starts.

```bash
echo $PATCHDIR/patch.diff
ls $PATCHDIR
```

lists all patch files in your patch directory, allowing you to easily
see and verify the patch files you have created.