3.5.2 Getting started
To get started, open a Changes & Versions tool with
| Changes & Versions
, and choose VCS
. This opens the
generator from Graph, which contains the settings for VCS integration:
name to use for this MetaEdit+ repository in your VCS,
$dbName. By default in a new repository
this uses __(internal 'dbName' read) to
pick up the name of the repository shown in the Startup Launcher; it is better
to change this to simply assign the name as a fixed string, e.g.
choice of VCS, $vcs = 'git' or
base VCS working directory on your
base URL of a VCS repository: optional
Git (e.g. a GitHub account URL), an obligatory
repository for SVN. |
The full paths to the
working directory on your disk and to the URL are then formed by appending the
name you chose for your MetaEdit+ repository. Under a single base directory and
URL you can thus have multiple MetaEdit+ repositories, each of which is
In this section we will detail the settings necessary for
a single user MetaEdit+ repository. Extra information for multi-user
repositories is provided in Section 3.5.5
On Linux, note that you must install xterm
MetaEdit+ generates VCS and shell commands in
files, and these are run via the
script, which opens them in
and runs them as
Install Git – you can use the defaults or your own
preferences. When MetaEdit+ runs Git commands, it will add Git to the path as
needed, use Git’s built-in credential caching, and use the cmd terminal
(or xterm on Linux).
On your OS command line, run the following:
git config --global user.name "Your Name"
git config --global user.email firstname.lastname@example.org
to fit your needs, choosing
. Make sure the
point to the desired
directories, and that those directories already exist. The
will be built from
appending the given $dbName
your changes to
Git does not necessarily require a
– the local working directory has a full git repository in itself. You can
have a $gitBaseURL
if you want, and
versioning will then keep that remote git repository in sync with your local
working directory’s git repository. The remote git repository must already
exist or be created manually: You can set up an account on GitHub or
Bitbucket.org, and create an empty git repository there with the same name as
dbName in _vcsPaths()
. You should set
to the URL for your
will be built
from that by appending the given
Select Extra VCS Commands
. This, and its
create and run gitInit.bat to:
the working directory for this MetaEdit+ db,
up credential caching to remember the password for this
$gitProjectURL (you will be prompted
for the password on the command line, once only),
the necessary file types and line end handling for this platform and
multi-platform use, and
up the link to $gitProjectURL, if
TortoiseSVN and SVN
If on Linux, simply install SVN (1.8 or later). If on Windows,
install TortoiseSVN (1.8 or later). Plain SVN lacks certain functions that are
needed on Windows for VCS integration. A TortoiseSVN installation will include
SVN, and MetaEdit+ calls those SVN commands directly to perform some tasks, and
opens a TortoiseSVN window for other tasks that require a UI.
SVN requires an
be a remote URL, or a file:/// URL for a local SVN repository) and requires that
the SVN repository exists.
Create the directories: by default we use X:\svn and an
X:\svn\svn_working base directory within which we will have a working directory
per MetaEdit+ repository.
If you are creating a local SVN repository rather than
using an existing remote repository, create the empty SVN repository:
Windows: create X:\svn\svn_repos, right-click it and choose TortoiseSVN |
Create Repository Here.... You do not need to choose ‘Create folder
Linux: snvadmin create
VCS Settings | Paths to adjust
_vcsPaths() to fit your needs, choosing
$vcs='svn'. Make sure the
$svnBaseURL point to the desired
locations, and that those locations already exist.
On Windows the settings for a local SVN repository might
$svnBaseDir = 'X:\svn\svn_working'
$svnBaseURL = 'file:///X:/svn/svn_repos'
On Linux the
settings for a local SVN repository might be:
$svnBaseDir = '/home/myUser/svn/svn_working'
$svnBaseURL = 'file:///home/myUser/svn/svn_repos'
$svnProjectURL will be built from these
by appending the given $dbName.
Save your changes to
Select Extra VCS Commands
.This, and its
create and run svnInit.bat to create an SVN project for your MetaEdit+ db.
If on Windows, when pressing Save
to check in, remember to always press the
link above the file list in the TortoiseSVN dialog that opens, so
that added and deleted files are