Skip to content

Commit 2268c1d

Browse files
committed
Add more svn scenario's to the documentation
1 parent 4dfe2ac commit 2268c1d

6 files changed

Lines changed: 77 additions & 21 deletions

File tree

dfetch/commands/check.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
66
.. uml:: /static/uml/check.puml
77
8-
.. scenario-include:: ../features/check-git-repo.feature
8+
.. tabs::
9+
10+
.. tab:: Git
11+
12+
.. scenario-include:: ../features/check-git-repo.feature
13+
14+
.. tab:: SVN
15+
16+
.. scenario-include:: ../features/check-svn-repo.feature
917
1018
Child-manifests
1119
~~~~~~~~~~~~~~~

dfetch/commands/diff.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@
1919
2020
dfetch diff some-project
2121
22-
.. scenario-include:: ../features/diff-in-git.feature
22+
.. tabs::
23+
24+
.. tab:: Git
25+
26+
.. scenario-include:: ../features/diff-in-git.feature
27+
28+
.. tab:: SVN
29+
30+
.. scenario-include:: ../features/diff-in-svn.feature
2331
2432
Using the generated patch
2533
=========================
@@ -29,13 +37,19 @@
2937
The generated patch is a relative patch and should be by applied specifying the base directory of the *git repo*.
3038
See below for the version control specifics. The patch will also contain the content of binary files.
3139
32-
.. code-block:: sh
40+
.. tabs::
3341
34-
# For git repo's
35-
git apply --verbose --directory='some-project' some-project.patch
42+
.. tab:: Git
43+
44+
.. code-block:: sh
45+
46+
git apply --verbose --directory='some-project' some-project.patch
47+
48+
.. tab:: SVN
49+
50+
.. code-block:: sh
3651
37-
# For svn repo's
38-
svn patch some-project.patch
52+
svn patch some-project.patch
3953
4054
.. warning::
4155

dfetch/commands/update.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
66
.. uml:: /static/uml/update.puml
77
8-
.. scenario-include:: ../features/fetch-git-repo.feature
8+
.. tabs::
9+
10+
.. tab:: Git
11+
12+
.. scenario-include:: ../features/fetch-git-repo.feature
13+
14+
.. tab:: SVN
15+
16+
.. scenario-include:: ../features/fetch-svn-repo.feature
917
1018
Child-manifests
1119
~~~~~~~~~~~~~~~

dfetch/manifest/project.py

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,15 @@
142142
src: src/*.h
143143
repo-path: cpputest/cpputest
144144
145-
.. scenario-include:: ../features/fetch-file-pattern-git.feature
145+
.. tabs::
146+
147+
.. tab:: Git
148+
149+
.. scenario-include:: ../features/fetch-file-pattern-git.feature
150+
151+
.. tab:: SVN
152+
153+
.. scenario-include:: ../features/fetch-file-pattern-svn.feature
146154
147155
Ignore
148156
######
@@ -172,7 +180,15 @@
172180
And the ignores will be applied *after* the ``src:`` pattern was applied.
173181
License files will never be excluded, since you likely shouldn't be doing that.
174182
175-
.. scenario-include:: ../features/fetch-with-ignore-git.feature
183+
.. tabs::
184+
185+
.. tab:: Git
186+
187+
.. scenario-include:: ../features/fetch-with-ignore-git.feature
188+
189+
.. tab:: SVN
190+
191+
.. scenario-include:: ../features/fetch-with-ignore-svn.feature
176192
177193
VCS type
178194
########
@@ -226,23 +242,31 @@
226242
repo-path: cpputest/cpputest
227243
patch: local_changes.patch
228244
229-
The patch can be generated using the *Dfetch* :ref:`Diff` command.
230-
Alternately the patch can be generated manually as such. Note that it should be *relative*.
245+
The patch should be generated using the *Dfetch* :ref:`Diff` command.
246+
Alternately the patch can be generated manually as such.
247+
Note that the patch should be *relative* to the projects root.
248+
249+
.. tabs::
250+
251+
.. tab:: Git
252+
253+
.. code-block:: sh
254+
255+
git diff --relative=path/to/project HEAD > my_patch.patch
256+
257+
For more details see the `git-diff <https://git-scm.com/docs/git-diff>`_ documentation.
231258
232-
.. code-block:: sh
259+
.. scenario-include:: ../features/diff-in-git.feature
233260
234-
# For git repo's
235-
git diff --relative=path/to/project HEAD > my_patch.patch
261+
.. tab:: SVN
236262
237-
# For svn repo's
238-
svn diff -r HEAD path/to/my_project > my_patch.patch
263+
.. code-block:: sh
239264
240-
For more details see the `git-diff`_ or `svn-diff`_ documentation.
265+
svn diff -r HEAD path/to/my_project > my_patch.patch
241266
242-
.. _`git-diff`: https://git-scm.com/docs/git-diff
243-
.. _`svn-diff`: http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html
267+
For more details see the `svn-diff <http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html>`_ documentation.
244268
245-
.. scenario-include:: ../features/diff-in-git.feature
269+
.. scenario-include:: ../features/diff-in-svn.feature
246270
247271
"""
248272

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"sphinxcontrib.details.directive",
4040
"sphinx-jsonschema",
4141
"sphinxcontrib.programoutput",
42+
"sphinx_tabs.tabs",
4243
]
4344

4445
# Add any paths that contain templates here, relative to this directory.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ docs = [
9797
'sphinx-sitemap==2.9.0',
9898
'sphinx-jsonschema==1.19.2',
9999
'sphinxcontrib-programoutput==0.18',
100+
'sphinx-tabs==3.4.7',
100101
]
101102
test = ['pytest==8.4.2', 'pytest-cov==7.0.0', 'behave==1.3.3']
102103
casts = ['asciinema==2.4.0']

0 commit comments

Comments
 (0)