NAME

Darcs::Inventory::Patch - Object interface to patches read from the darcs inventory file

SYNOPSIS

use Darcs::Inventory;
$i = Darcs::Inventory->new("darcs_repo_dir");
for ($i->patches) {
    print $_->date, "\n";         # eg: 1193248123
    print $_->darcs_date, "\n";   # eg: 'Wed Oct 24 10:48:43 PDT 2007'
    print $_->raw_date, "\n";     # eg: '20071024174843'
    print $_->author, "\n";       # eg: 'David Caldwell <david@porkrind.org>'
    print $_->undo, "\n";         # a boolean
    print $_->name, "\n";         # First line of recorded message
    print $_->long, "\n";         # Rest of recorded message (including newlines)
    print $_->hash, "\n";         # eg: '20071024174843-c490e-9dab450fd814405d8391c2cff7a4bce33c6a8234.gz'
    print $_->file, "\n";         # eg: '0000001672-d672e8c18c22cbd4cc8e65fe80a39e68384133083b0f623ae5d57cc563e5630b'
                                  # (Usually found in "_darcs/patches/")
    print $_->raw, "\n";          # The unparsed lines from the inventory for this patch
}

# Or, if you want to do it by hand for some reason:
use Darcs::Inventory::Patch;
@raw = Darcs::Inventory::read("darcs_repo_dir/_darcs/inventory");
$patch = Darcs::Inventory::Patch->new($raw[0]);