package VCI::VCS::Hg; use Moose; use LWP::UserAgent; use VCI::Util; extends 'VCI'; our $VERSION = '0.5.2'; has 'x_ua' => (is => 'ro', isa => 'LWP::UserAgent', lazy_build => 1); has 'x_timeout' => (is => 'ro', isa => 'Int', default => sub { 60 }); sub _build_x_ua { my $self = shift; return LWP::UserAgent->new( agent => __PACKAGE__ . " $VERSION", protocols_allowed => [ 'http', 'https'], timeout => $self->x_timeout); } __PACKAGE__->meta->make_immutable; 1; __END__ =head1 NAME VCI::VCS::Hg - The Mercurial (aka Hg) implementation of VCI =head1 DESCRIPTION This is a "driver" for L for the Mercurial version-control system. You can find out more about Mercurial at L. For information on how to use VCI::VCS::Hg, see L. Currently VCI::VCS::Hg actually interacts with HgWeb, not directly with Hg repositories. The only supported connections are C or C. Local repositories are not yet supported. =head1 CONNECTING TO A MERCURIAL REPOSITORY For the L argument to L, choose the actual root of your hgweb installation. For example, for C, the C would be C. =head1 REVISION IDENTIFIERS Mercurial has two revision identifiers on a commit: an integer and a hex string. VCI::VCS::Hg uses the hex string as the revision id for Commit, File, and Directory objects, and does not understand integer revision ids. =head1 LIMITATIONS AND EXTENSIONS These are limitations of VCI::VCS::Hg compared to the general API specified in the C modules. =head2 VCI::VCS::Hg You can only connect to hgweb installations. You cannot use ssh, static-http, or local repositories. In the future we plan to support local repositories, but ssh and static-http repositories will probably never be supported. (Mercurial cannot work with them without cloning them, at which point they are just a local repository.) =head2 VCI::VCS::Hg::Directory =over =item * Directory objects without a revision specified (such as those that you get through VCI::Abstract::Project::get_path, get_directory, and get_file) will always have the revision "tip", even if this wasn't the revision they were modified most recently in. This also means that their C