Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

arch::changeset(3pm) [debian man page]

Arch::Changeset(3pm)					User Contributed Perl Documentation				      Arch::Changeset(3pm)

Arch::Changeset - class representing Arch changeset SYNOPSIS
Arch::Changeset objects may be created directly if you got a changeset directory: use Arch::Changeset; my $changeset = Arch::Changeset->new( '', '/tmp/,,changeset-6', ); But often are created indirectly by other objects: use Arch::Session; $changeset = Arch::Session->new->get_revision_changeset( '' ); use Arch::Library; $changeset = Arch::Library->new->get_revision_changeset( '' ); print scalar $changeset->get_patch("perllib/Arch/"); my $diff_file = ($changeset->get_patch("README", 1))[2]; print Arch::Util::load_file($diff_file); DESCRIPTION
This class represents the changeset concept in Arch and provides some useful methods. METHODS
The following methods are available: new, get_patch, get_index, get_changes, get_all_diffs, join_all_diffs, ancestor. new revision-spec dir-name Construct the Arch::Changeset object associated with the given fully-qualified revision-spec and the existing directory dir-name. get_patch file-path get_patch file-path type get_patch file-path type full-file-asis Return the patch (or otherwise content) of the given file-path in the changeset. type is integer: 0 (unknown, try to autodetect, this is the default), 1 (modified file, or metadata change), 2 (new file), 3 (removed file). The default behaviour is to create a fake diff against /dev/null for non-binary new and removed files; the full-file-asis flag, if set to true, changes this behaviour and causes to return the content of such file as-is. Binary new and removed files are always returned as-is regardless of the flag. This flag is also ignored if type is 1. In the scalar content return the patch in diff(1) format (or the whole file content as described above). In the list content return 4 scalars: the patch, the file name on the disk containing this patch (or the whole file), the change type (that is "patch", "new" or "removed") and the as-is flag. The returned values that follow the first one (the patch/file content) share the order of the corresponding parameters; the parameters are more hints, while the returned values accurately describe the content. get_index name Returns the content of the index file name as an ID => path hash. Valid names are 'orig-dirs-index', 'orig-files-index', 'mod-dirs-index' and 'mod-files-index'. get_changes Returns a list of changes in the changeset. get_all_diffs Returns all diffs in the changeset (array or arrayref). This includes changes of types MODIFY, ADD and DELETE. join_all_diffs Returns concatenated output of all diffs in the changeset. ancestor Return the ancestor of the changeset. If =ancestor file is found (that is the case for library changesets) its content is returned, otherwise try to guess the ancestor of the revision using Arch::Util::adjacent_revision. BUGS
Awaiting for your reports. AUTHORS
Mikhael Goikhman ( SEE ALSO
For more information, see tla, Arch::Session, Arch::Library, Arch::Util. perl v5.10.1 2006-04-15 Arch::Changeset(3pm)

Check Out this Related Man Page

Arch::Backend(3pm)					User Contributed Perl Documentation					Arch::Backend(3pm)

Arch::Backend - Arch backend feature specific functions SYNOPSIS
use Arch::Backend qw(arch_backend is_baz has_file_diffs_cmd); my $exe = arch_backend(); print "Not in tree, try '$exe init-tree' "; my $version = Arch::Backend::arch_backend_version; print "Using baz $version as a backend " if is_baz(); my $cmd = has_file_diffs_cmd() ? "file-diffs" : "file-diff"; Arch::Util::run_tla($cmd, $filename); DESCRIPTION
A set of helper functions suitable for GNU Arch related projects in Perl. Higher (object oriented) levels of Arch/Perl library make use of these helper functions to query certain aspects (like incompatible features) of the actual arch backend used. FUNCTIONS
The following functions are available: arch_backend, arch_backend_name, arch_backend_version, is_tla, is_baz, has_archive_setup_cmd, has_file_diffs_cmd, has_register_archive_name_arg, has_tree_version_dir_opt, has_tree_id_cmd, has_set_tree_version_cmd, has_cache_feature, get_cache_config, has_commit_version_arg, has_commit_files_separator, has_revlib_patch_set_dir. arch_backend [exe] Return or set the arch backend executable, like "/opt/bin/tla" or "baz-1.3". By default, the arch backend executable is taken from environment variable $ARCH_BACKEND (or $TLA, or $BAZ). If no environment variable is set, then "tla" is used. arch_backend_name Return the brand name of the arch backend, "tla" or "baz". arch_backend_version Return the arch backend version, like "1.3.1". is_tla Return true if arch_backend_name is "tla". is_baz Return true if arch_backend_name is "baz". has_archive_setup_cmd Return true if the arch backend has "archive-setup" command. baz removed this command. has_file_diffs_cmd Return true if the arch backend has "file-diffs" command. It was renamed to "file-diff" in tla-1.3. has_register_archive_name_arg Return true if the arch backend's "register-archive" command supports two positional arguments, one of which is archive name. baz-1.3 removed such syntax; the previous baz versions supported this syntax, but it was useless, since the archive was accessed anyway. has_tree_version_dir_opt Return true if the arch backend's "tree-version" command supports "-d" options. This is true for baz. has_tree_id_cmd Return true if the arch backend has "tree-id" command. This is true for baz. has_set_tree_version_cmd Return true if the arch backend has "set-tree-version" command. baz removed this command and merged it into "tree-version". has_cache_feature Return true if the arch backend supports Arch Cache feature. This is true for baz. get_cache_config Return hash with the following keys: dir - directory of the local cache (or undef if not applicable). has_commit_version_arg Return true if the arch backend's "commit" command supports version argument. baz-1.4 removed this functionality. has_commit_files_separator Return true if the arch backend's "commit" command requires "--" argument to separate files. baz-1.4 removed this separator. has_revlib_patch_set_dir Return true if the arch backend's creates ,,patch-set subdirectory in revision library. baz-1.4 removed this functionality. BUGS
This module uses heuristics and does not (intend to) provide the perfect information. Requires constant updating. AUTHORS
Mikhael Goikhman ( SEE ALSO
For more information, see tla, baz, Arch. perl v5.10.1 2005-10-23 Arch::Backend(3pm)
Man Page

Featured Tech Videos