blob: 6c2879a65a5f4d04981b0655e6f218eaa27616c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
.. -*- mode: rst -*-
.. _appendix-guides-vcs:
=======================
Version control systems
=======================
The sections in this guide only cover the basics steps in the setup of
the different version control systems for usage with the Bcfg2.
Git
===
.. _Git tutorial: http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
Adding the :ref:`server-plugins-version-git` plugin will allow you to
store version information in the statistics database. For tracking the
configuration files in the ``/var/lib/bcfg2`` directory a git repository
needs to be established::
git init
For more detail about the setup of git please refer to a `git tutorial`_.
The first commit can be the empty or the already populated directory::
git add . && git commit -a
While running ``bcfg2-info`` the following line will show up::
Initialized git plugin with git directory = /var/lib/bcfg2/.git
Mercurial
=========
The :ref:`server-plugins-version-hg` plugin also allows you to store
version information in the statistics database.
To use mercurial to track your configuration files, the repository must
be initialized::
hg init
Mercurial will not commit the files to the repository until a user name
is defined in ``/var/lib/bcfg2/.hg/``
.. code-block:: sh
cat <<END_ENTRY >> /var/lib/bcfg2/.hg/hgrc
[ui]
username = Yor name <you@example.com>
END_ENTRY
Now you are able to make submissions to the repository::
hg commit
While running ``bcfg2-info`` the following line will show up::
Initialized hg plugin with hg directory = /var/lib/bcfg2/.hg
Darcs
=====
The :ref:`server-plugins-version-darcs` plugin also allows you to store
version information in the statistics database.
To use darcs to track your configuration files, the repository must
be initialized::
darcs initialize
To commit to the darcs repository an author must be added to the
``_darcs/prefs/author`` file. If the ``author`` file is missing,
darcs will ask you to enter your e-mail address.
.. code-block:: sh
cat <<END_ENTRY >> /var/lib/bcfg2/_darcs/prefs/author
you@example.com
END_ENTRY
All files in the ``/var/lib/bcfg2`` directory should be added to darcs
now::
darcs add *
After that you can submit them to the repository::
darcs record
While running ``bcfg2-info`` the following line will show up::
Initialized Darcs plugin with darcs directory = /var/lib/bcfg2/_darcs
Cvs
===
The :ref:`server-plugins-version-cvs` plugin also allows you to store
version information in the statistics database.
plugins = Base,Bundler,Cfg,...,Cvs
The CVS repository must be initialized::
cvs -d /var/lib/bcfg2 init
|