NAME

SVK::XD - svk depot and checkout handling.

SYNOPSIS

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

DESCRIPTION

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 new:

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 SVK::XD object.

svkpath

Directory name of giantlock and statefile.

METHODS

Serialization and locking

load

Load the serialized SVK::XD data from statefile. Initialize $self if there's nothing to load. The giant lock is acquired when calling load.

store

Serialize $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 store 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 SVN::Repos object if caller wants the repository to be opened.

find_repos_from_co

Given the checkout path and an optiona bout 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 SVN::Repos object if caller wants the repository to be opened.

find_repos_from_co_maybe

Like find_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.

depot_delta

Generate SVN::Delta::Editor calls to represent the changes between (oldroot, oldpath) and (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 apply_textdelta calls.

no_recurse
notice_ancestry
checkout_delta

Generate SVN::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.

AUTHORS

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT

Copyright 2003-2004 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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1341:

You forgot a '=back' before '=head1'