Skip to content

Commit

Permalink
Change contributing instructions regarding use of git subrepo.
Browse files Browse the repository at this point in the history
Ensure that .gitrepo remote is updated correctly
  • Loading branch information
mrclary committed Nov 8, 2022
1 parent 5f158e3 commit 86c0521
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ As an example, let's assume that (i) your Github user name is `myuser`; (ii) you
```
$ cd ~/spyder
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/myuser/spyder-kernels.git external-deps/spyder-kernels -b fix_in_kernel -f
$ git subrepo pull external-deps/spyder-kernels -r https://github.com/myuser/spyder-kernels.git -b fix_in_kernel -u -f
```

* You can now open a PR on `https://github.com/spyder-ide/spyder` and on `https://github.com/spyder-ide/spyder-kernels` for each of your branches.
Expand All @@ -181,14 +181,14 @@ As an example, let's assume that (i) your Github user name is `myuser`; (ii) you
$ cd ~/spyder
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/myuser/spyder-kernels.git external-deps/spyder-kernels -b fix_in_kernel -f
$ git subrepo pull external-deps/spyder-kernels -r https://github.com/myuser/spyder-kernels.git -b fix_in_kernel -u -f
$ git push origin fix_in_spyder
```

* When your `fix_in_kernel` PR is merged, you need to update Spyder's `fix_in_spyder` branch because the clone in Spyder's repo must point out again to the spyder-kernel's repo and not to your own clone. For that, please run:

```
$ git subrepo clone https://github.com/spyder-ide/spyder-kernels.git external-deps/spyder-kernels -b <branch> -f
$ git subrepo pull external-deps/spyder-kernels -r https://github.com/spyder-ide/spyder-kernels.git -b <branch> -u -f
```

where `<branch>` needs to be `2.x` if your `fix_in_spyder` branch was done against Spyder's `5.x` branch; and `master`, if you did it against our `master` branch here.
Expand All @@ -206,14 +206,14 @@ Due to that, a clone of those projects is placed in the `external-deps` director

```
$ git checkout -b fix_in_spyder
$ git subrepo clone https://github.com/myuser/python-lsp-server.git external-deps/python-lsp-server -b fix_in_external_dep -f
$ git subrepo pull external-deps/python-lsp-server -r https://github.com/myuser/python-lsp-server.git -b fix_in_external_dep -u -f
```

in case the fix is in python-lsp-server, or

```
$ git checkout -b fix_in_spyder
$ git subrepo clone https://github.com/myuser/qtconsole.git external-deps/qtconsole -b fix_in_external_dep -f
$ git subrepo pull external-deps/qtconsole -r https://github.com/myuser/qtconsole.git -b fix_in_external_dep -u -f
```

if the fix is in qtconsole. And then commit the changes you need to make in Spyder.
Expand All @@ -222,30 +222,30 @@ Due to that, a clone of those projects is placed in the `external-deps` director

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/myuser/python-lsp-server.git external-deps/python-lsp-server -b fix_in_external_dep -f
$ git subrepo pull external-deps/python-lsp-server -r https://github.com/myuser/python-lsp-server.git -b fix_in_external_dep -u -f
$ git push origin fix_in_spyder
```

or

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/myuser/qtconsole.git external-deps/qtconsole -b fix_in_external_dep -f
$ git subrepo pull external-deps/qtconsole -r https://github.com/myuser/qtconsole.git -b fix_in_external_dep -u -f
$ git push origin fix_in_spyder
```

* After `fix_in_external_dep` is merged, you need to update the python-lsp-server or qtconsole subrepos in your `fix_in_spyder` branch with

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/python-lsp/python-lsp-server.git external-deps/python-lsp-server -b develop -f
$ git subrepo pull external-deps/python-lsp-server -r https://github.com/python-lsp/python-lsp-server.git -b develop -u -f
```

or

```
$ git checkout fix_in_spyder
$ git subrepo clone https://github.com/jupyter/qtconsole.git external-deps/qtconsole -b master -f
$ git subrepo pull external-deps/qtconsole -r https://github.com/jupyter/qtconsole.git -b master -u -f
```


Expand Down

0 comments on commit 86c0521

Please sign in to comment.