man SVK::XD () - svk depot and checkout handling.

NAME

SVK::XD - svk depot and checkout handling.

SYNOPSIS

  use SVK::XD;
  $xd = SVK::XD->new (depotmap => { '' => '/path/to/repos'});

TERMINOLOGY

depot
A repository referred by a name. The default depot is '' (the empty string).
depotpath
A path referred by a depot name and the path inside the depot. For example, //foo/bar means /foo/bar in the default depot '', and /test/foo/bar means /foo/bar in the depot test.
copath
Checkout path. A path in the file system that has a checked out version of a certain depotpath.

CONSTRUCTOR

Options to CWnew:

depotmap
A hash reference for depot name and repository path mapping.
checkout
A Data::Hierarchy object for checkout paths mapping.
giantlock
A filename for global locking.
statefile
Filename for serializing CWSVK::XD object.
svkpath
Directory name of CWgiantlock and CWstatefile.

METHODS

Serialization and locking

load
Load the serialized CWSVK::XD data from statefile. Initialize CW$self if there's nothing to load. The giant lock is acquired when calling CWload.
store
store
Serialize CW$self to the statefile. If giant lock is still ours, overwrite the file directly. Otherwise load the file again and merge the paths we locked into the new state file. After CWstore is called, giant is unlocked.
lock
Lock the given checkout path, store the state with the lock info to prevent other instances from modifying locked paths. The giant lock is released afterward.
unlock
Unlock All the checkout paths that was locked by this instance.
giant_lock
Lock the statefile globally. No other instances need to wait for the lock before they can do anything.
giant_unlock
Release the giant lock.

Depot and path translation

find_repos
Given depotpath and an option about if the repository should be opened. Returns an array of repository path, the path inside repository, and the CWSVN::Repos object if caller wants the repository to be opened.
find_repos_from_co
Given the checkout path and an option about if the repository should be opened. Returns an array of repository path, the path inside repository, the absolute checkout path, the checkout info, and the CWSVN::Repos object if caller wants the repository to be opened.
find_repos_from_co_maybe
Like CWfind_repos_from_co, but falls back to see if the given path is a depotpath. In that case, the checkout paths returned iwll be undef.
find_depotname
condense

Checkout handling

get_editor
Returns the SVK::XD::Editor object. Apply target translation if target is given in options. Also returns the callback hash used by SVK::Editor::Merge when called in array context.
auto_prop
Return a hash of properties that should attach to the file automatically when added.
depot_delta
Generate CWSVN::Delta::Editor calls to represent the changes between CW(oldroot, oldpath) and CW(newroot, newpath). oldpath is a array ref for anchor and target, newpath is just a string. Options:
editor
The editor receiving delta calls.
no_textdelta
Don't generate text deltas in CWapply_textdelta calls.
no_recurse
notice_ancestry
checkout_delta
Generate CWSVN::Delta::Editor calls to represent the local changes made to the checked out revision. Options:
delete_verbose
Generate delete_entry calls for sub-entries within deleted entry.
absent_verbose
Generate absent_* calls for sub-entries within absent entry.
unknown_verbose
generate cb_unknown calls for sub-entries within absent entry.
absent_ignore
Don't generate absent_* calls.
expand_copy
Mimic the behavior like SVN::Repos::dir_delta, lose copy information and treat all copied descendents as added too.
cb_ignored
Called for ignored items if defined.
cb_unchanged
Called for unchanged files if defined.
get_entry($copath)
Returns the Data::Hierarchy entry and the schedule of the entry.
get_fh
Returns a file handle with keyword translation and line-ending layers attached.
get_props
Returns the properties associated with a node. Properties schedule for commit are merged if CW$copath is given.

AUTHORS

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT

Copyright 2003-2005 by Chia-liang Kao <clkao@clkao.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>