YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Global Functions

Local Variables

Local Functions

Info:

File: modules/ConfigHistory.ycp Package: Maintain history of configuration files Summary: ConfigHistory settings, input and output functions Authors: Jiri Srain

$Id: ConfigHistory.ycp 41350 2007-10-10 16:59:00Z dfiser $

Routines for tracking configuration files in a subversion repository

Use: - at your module start, call ConfigHistory::Init(); which will initialize the repo if needed and also commits any uncommitted changes - at the module finish, call ConfigHistory::CommitChanges("module name"); which will commit the changes made to SVN with appropriate comment mentioning the module name in the log - to ensure all configuration files are in SVN after initialization, call ConfigHistory::InitFiles(["file1", "file2"]) immediatelly after calling Init(); which will ensure the changes made are tracked during the first run as well

local history_location -> string

Location of SVN repo

local changes_timestamp -> string

Location of timestamp for detecting changed files out of version control

local log_directories -> list<string>

Directories to put under version control

local use_svn -> boolean

Is the SVN history active?

local store_whole_subtree -> boolean

Always have whole subtree in SVN, not only files changed by YaST

local nested_transactions -> integer

Count of nested transactions (module calling another module)

local commit_needed -> boolean

If true, force commit at the end of initialization/finalization

local UseSvn () -> boolean

Is the SVN history in use?

Return value:
true to log to SVN
local InitSvnRepository () -> boolean

Initialize a SVN repository for config files in /var/lib/YaST2

Return value:
true on success, false otherwise
local CheckSvnRepository () -> boolean

Check the presence of SVN repo for storing changes

Return value:
true if repo exists
local CheckRepoLinked () -> boolean

Check whether repo has been deployed to the filesystem

Return value:
true if yes (/.svn exists), false otherwise
local InitDirectories (boolean recursive) -> boolean

Initialize predefined directories for SVN

Parameters:
recursive boolean true to add whole directories incl. subtree, false to add directory itself only
Return value:
true on success, false on failure
local CheckUncommitedChanges () -> boolean

Check for files in version control which had been changed but not committed

Return value:
true on success
local CreateTimeStamp () -> boolean

Create a timestamp to find changed files which are not under version control

Return value:
true on success
local CheckChangedFilesOutOfVersionControl () -> boolean

Check for changed files which are not under verison control (e.g. new created files) Schedule them for next commit

Return value:
true on success, false on failure
local CheckAllFilesOutOfVersionControl () -> boolean

Find all files which are not under version control Schedule such files for next commit

Return value:
true on success, false otherwise
local RemoveDeletedFiles () -> boolean

Check for files which had been deleted, but are still in SVN Schedule such files for deletion with next commit

Return value:
true on success, false otherwise
local DoCommit (string mod) -> boolean

Do commit to subversion

Parameters:
mod
Return value:
tru eon success
local UpdateCheckout () -> boolean

Update check-out from SVN to avoid commit conflicts

Return value:
true on success
global Init () -> boolean

Initialize before module is started Do not call CommitChanges unless Init returns true!

Return value:
true on success, false on failure
global CommitChanges (string module_name) -> boolean

Commit changes done by YaST into the SVN repo

Parameters:
module_name string name of YaST module which does commit used only in the commit log
Return value:
true on success, false on failure
global InitFiles (list<string> files) -> boolean

Initialize specified files for version control; useful when not having whole directory under version control, but only relevant files

Parameters:
files a list of files to add to repo (resp. ensure they are in)
Return value:
true on success, false otherwise