VCS::LibCVS::Branch - A named branch in the repository.


VCS-LibCVS documentation Contained in the VCS-LibCVS distribution.

Index


Code Index:

NAME

Top

VCS::LibCVS::Branch - A named branch in the repository.

SYNOPSIS

Top

DESCRIPTION

Top

Represents a named branch in the repository.

This branch may exist on any number of files. This class is not much more than a wrapper around a branch name.

The main branch (usually branch number 1) is named using the special name .TRUNK.

CLASS ROUTINES

Top

new()

$branch = VCS::LibCVS::Branch->new($repo, $name)

return type: VCS::LibCVS::Branch
argument 1 type: VCS::LibCVS::Repository
argument 2 type: scalar string

INSTANCE ROUTINES

Top

get_name()

$b_name = $branch->get_name()

return type: scalar string

equals()

if ($branch->equals($other_branch)) { . . .

return type: scalar boolean

SEE ALSO

Top

  VCS::LibCVS


VCS-LibCVS documentation Contained in the VCS-LibCVS distribution.
#
# Copyright (c) 2004,2005 Alexander Taler (dissent@0--0.org)
#
# All rights reserved. This program is free software; you can redistribute it
# and/or modify it under the same terms as Perl itself.
#

package VCS::LibCVS::Branch;

use strict;
use Carp;

###############################################################################
# Class constants
###############################################################################

use constant REVISION => '$Header: /cvsroot/libcvs-perl/libcvs-perl/VCS/LibCVS/Branch.pm,v 1.4 2005/10/10 12:52:11 dissent Exp $ ';

###############################################################################
# Class variables
###############################################################################

###############################################################################
# Private variables
###############################################################################

# $self->{Repository}  The VCS::LibCVS::Repository in which the branch lives.
#
# $self->{Name}         scalar string which is the name of the branch.

###############################################################################
# Class routines
###############################################################################

sub new {
  my $class = shift;
  my $that = bless {}, $class;

  ($that->{Repository}, $that->{Name}) = @_;

  return $that;
}

###############################################################################
# Instance routines
###############################################################################

sub get_name() {
  return shift->{Name};
}

sub equals() {
  my $self = shift;
  my $other = shift;
  return (($self->{Repository}->equals($other->{Repository}))
           && ($self->{Name} eq $other->{Name}));
}

###############################################################################
# Private routines
###############################################################################


1;