== ✅ Subversion tests (simple checkout) ==
See that Subversion finally works. Tested on my Subversion repository on my Phorge, with this checkout:
```
svn checkout svn+ssh://git@gitpull.it/source/example-svn-repo/ example-svn-repo-root
```
| Working directory | Test command | Before | After |
|----------------------|--------------|--------|-------|
|`./example-svn-repo-root` | `arc browse README.md` | ❌ [[ https://gitpull.it/diffusion/SVNEXAMPLE/browse/master/README.md | link ]] | ✅ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/README.md|link]]
|`./example-svn-repo-root` | `arc browse asd/lol/OTHER.md` | ❌ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/master/asd/lol/OTHER.md | link ]] | ✅ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/asd/lol/OTHER.md|link]] |
|`./example-svn-repo-root/asd` | `arc browse lol/OTHER.md` | ❌ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/master/asd/lol/OTHER.md | link ]] | ✅ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/asd/lol/OTHER.md|link]] |
|`./example-svn-repo-root/asd/lol` | `arc browse OTHER.md` | ❌ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/master/asd/lol/OTHER.md | link ]] | ✅ [[https://gitpull.it/diffusion/SVNEXAMPLE/browse/asd/lol/OTHER.md|link]] |
|`./example-svn-repo-root/asd/lol` | `arc browse ../../README.md` | ❌ [[https://gitpull.it/source/example-svn-repo/browse/master/README.md|link]] | ✅ [[https://gitpull.it/source/example-svn-repo/browse/README.md|link]]
|`./example-svn-repo-root` | `arc browse --branch wtfbranch README.md` | ❌ [[https://we.phorge.it/source/arcanist/browse/wtfbranch/README.md | link]] | ✅ [[https://gitpull.it/source/example-svn-repo/browse/README.md|link]] ("BRANCH OPTION NOT AVAILABLE") |
See that finally SVN works.
The last example uses the git option `--branch` that has little sense in SVN so it works but with a warning, to omit `--branch` in SVN.
Note that if you have not the `.arcconfig` file this does not work, with and without the change.
== ✅ Extra Subversion tests (deep checkout) ==
See that Subversion finally works (tested on my Subversion repository on my Phorge):
```
svn checkout svn+ssh://git@gitpull.it/source/example-svn-repo/asd example-svn-repo-subdir
```
| Working directory | Test command | Before | After |
|----------------------|--------------|--------|-------|
|`./example-svn-repo-subdir` | `arc browse lol` | ❌ [[https://gitpull.it/source/example-svn-repo/browse/master/lol| link ]] | ✅ [[https://gitpull.it/source/example-svn-repo/browse/asd/lol|link]] |
|`./example-svn-repo-subdir` | `arc browse lol/OTHER.md` | ❌ [[ https://gitpull.it/source/example-svn-repo/browse/master/OTHER.md | link ]] | ✅ [[https://gitpull.it/source/example-svn-repo/browse/asd/lol/OTHER.md|link]] |
Note that if you have not the `.arcconfig` file this does not work, with and without the change.
Note that if you checked a partial sub-directory (like in this example) you cannot indeed access parent files from the command line (as design in SVN).
== ✅ Git tests ==
See that git still works. Tested on `master` current local branch.
| Working Directory | Test command | Before | After |
|------------------------|-----------------------|--------|----------|
|`./phorge` |`arc browse README.md`|✅ [[ https://we.phorge.it/source/phorge/browse/master/README.md | link ]] | ✅ same |
|`./phorge` |`arc browse src/docs/user/userguide/remarkup_cowsay.diviner`|✅ [[ https://we.phorge.it/source/phorge/browse/master/src/docs/user/userguide/remarkup_cowsay.diviner | link ]] |✅ same |
|`./phorge/src/docs/user`|`arc browse userguide/remarkup_cowsay.diviner`| ✅ [[ https://we.phorge.it/source/phorge/browse/master/src/docs/user/userguide/remarkup_cowsay.diviner | link ]] |✅ same |
|`./phorge/src/docs/user`|`arc browse ../../../README.md`|✅ [[ https://we.phorge.it/source/phorge/browse/master/README.md | link ]] | ✅ same |
|`./phorge` |`arc browse --branch stable README.md` |✅ [[ https://we.phorge.it/source/phorge/browse/stable/README.md | link ]] | ✅ same |
|`./phorge` |`arc browse --branch stable src/docs/user/userguide/remarkup_cowsay.diviner`|✅ [[ https://we.phorge.it/source/phorge/browse/stable/src/docs/user/userguide/remarkup_cowsay.diviner | link ]] | ✅ same |
|`./phorge/src/docs/user`|`arc browse --branch stable userguide/remarkup_cowsay.diviner`|✅ [[ https://we.phorge.it/source/phorge/browse/stable/src/docs/user/userguide/remarkup_cowsay.diviner | link ]] | ✅ same |
|`./phorge/src/docs/user`|`arc browse --branch stable ../../../README.md`|✅ [[ https://we.phorge.it/source/phorge/browse/stable/README.md | link ]] | ✅ same |
== Other Tests ==
From the `arcanist` directory, these still work, same result before and after the patch:
| `arc browse T15541` | ✅ https://we.phorge.it/T15541 |
| `arc browse -- T15541` | ✅ https://we.phorge.it/T15541 |
| `arc browse HEAD` | ✅ https://we.phorge.it/rARCb3d45c71041478c1410bfae2aaf88a95106cfc5b |
| `arc browse -- HEAD` | ✅ https://we.phorge.it/rARCb3d45c71041478c1410bfae2aaf88a95106cfc5b or https://we.phorge.it/D25823 (it depends on your last commit) |
| `arc browse --help` | ✅ Still shows help message |
| `arc browse -- --help` | ✅ Unable to resolve argument "--help" |
== Test narration ==
You stand in the middle of a small clearing in the woods of your Phorge.
Create a new Subversion repository in Diffusion with some contents, like these:
README.md
trunk/lol.txt
/tags/17_04_2019/lol.txt
Then clone that repository with your usual URL, that is:
svn checkout svn+ssh://phab@phorge.localhost/source/example-svn-repository example-svn-repository
All of these finally work in SVN:
- arc browse README.md
- you are redirected to https://phorge.localhost/source/myrepo/browse/README.md
- arc browse trunk/lol.txt
- you are redirected to https://phorge.localhost/source/myrepo/browse/trunk/lol.txt
- cd trunk; arc browse lol.txt; cd -
- you are redirected to https://phorge.localhost/source/myrepo/browse/trunk/lol.txt
- arc browse --branch /tags/17_04_2019/ lol.txt
- you are redirected to https://phorge.localhost/source/myrepo/browse/tags/17_04_2019/lol.txt
----
In the very same SVN repository, manually go to the Diffusion > Subversion menu and set "trunk/"
as sub-directory - so the web interface only shows the trunk directory.
All of these still work:
- arc browse trunk/lol.txt
- cd trunk; arc browse lol.txt; cd -
----
Inside the directory of arcanist (git), all of these still work as expected, opening the browser
web on the specified file and on the specified branch:
- arc browse README.md
- arc browse bin/arc
- arc browse README.md --branch stable
- arc browse README.md --branch master
- arc browse bin/arc --branch stable
- arc browse bin/arc --branch master
- cd bin; arc browse arc; cd -
- arc browse bin/arc
The browser web carefully opens as expected.
If it worked before, it works now, but also on Subversion repos.