---
name: "Arch::Session"
section: "3pm"
platform: "linux"
package: "libarch-perl"
version: "0.5.2-2"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/Arch::Session"
---

# Arch::Session(3pm)

access arch archives

## NAME

Arch::Session - access arch archives

## SYNOPSIS

```
    use Arch::Session;
    my $session = Arch::Session->new;
    my $rev  = 'migo@homemail.com--Perl-GPL/arch-perl--devel--0--patch-1';
    my $log  = $session->get_revision_log($rev);
    my $cset = $session->get_revision_changeset($rev);
    my $tree = $session->get_tree($rev);
```

## DESCRIPTION

Arch::Session provides an interface to access changesets and logs stored in arch archives.

## METHODS

The following common methods (inherited and pure virtual that this class implements) are documented in Arch::Storage:

**new**, **init**, **working\_name**, **working\_names**, **fixup\_name\_alias**, **is\_archive\_managed**, **expanded\_revisions**.

**archives**, **categories**, **branches**, **versions**, **revisions**, **get\_revision\_descs**, **expanded\_archive\_info**, **get\_revision\_changeset**, **get\_changeset**, **get\_revision\_log**, **get\_log**.

Additionally, the following methods are available:

**get\_specified\_changeset**, **clear\_cache**, **get\_tree**, **init\_tree**, **my\_id**.

- **get\_specified\_changeset** *arg*

  Get changeset object (Arch::Changeset) by a user specified input. *arg* may be revision name, or changeset directory, or tree directory (then changeset for tree changes is constructed), and in the future local tarball filepath or remote tarball url.

- **clear\_cache** \[*key* ..\]

  For performance reasons, most method results are cached (memoized in fact). Use this method to explicitly request this cache to be cleared.

  By default all cached keys are cleared; *key* may be one of the strings 'archives', 'categories', 'branches', 'versions', 'revisions' or 'revision\_descs'.

- **get\_tree** \[{ *options* }\] \[*revision* \[*dir*\]\]

  Construct a working tree for *revision* or **working\_name** in *dir*. If *dir* is not specified, a new temporary directory is automatically created.

  Keys of *options* may be *pristine*, *link*, *library*, *sparse*, *non\_sparse*, *no\_greedy\_add*; all are false by default. See `"tla get"`.

- **init\_tree** *dir*

  Run `"tla init-tree"` in *dir*.

- **my\_id** \[*newid*\]

  Get or set `"tla my-id"`.

## BUGS

No known bugs.

## AUTHORS

Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).

Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).

## SEE ALSO

For more information, see tla, Arch::Storage, Arch::Library, Arch::Name, Arch::Log, Arch::Changeset.
