Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Distributed Versioning Documentation | 2025.1

# ArchiveLimits: entries

An `ArchiveLimits:` entry consists of a sequence of one or more lines of the form `filespec depth`, where:

- ArchiveLimits: is specified as a path in the local (receiving) server, such as

      DepotMap:
      //stream/main/... //depot/main/...

      ArchiveLimits:
      //stream/main/... 1

- filespec is a file or subdirectory of files
- depth dictates how many relative revisions of the archive files Versioned files that users have submitted to a depot. to store

The `depth` field can be a non-negative integer, or the special word `all`, which tells the server to store all revisions of the file or files specified in that line’s `filespec`. Setting `depth` to `0` tells the server not to store any archives for files specified in this line’s `filespec`.

The integer value `0` means that a fetch will not store any archive files, just metadata, for the files specified in the `filespec` entry on this line.

A positive integer N means that no more than N archives should be stored for each file in this section of your repo. For example, suppose you have a file whose latest revision is 17 and the `depth` setting for the `ArchiveLimits:` entry governing this file is `2`. This means that when the file is fetched, the server will store the archive for revisions 17 and 16 only.

ArchiveLimits: behavior operates at the level of a filespec, so you can separate what the server does with digital assets files from what it does with source code:

1. Store the digital assets files in a distinct folder from the source code files
2. Describing `ArchiveLimits:` behavior for each of these folders on separate lines

Consider the following sample `ArchiveLimits:` entry:

    ArchiveLimits:
        //.../*.zip 1
        //.../*.iso 0
        //.../*.rpm 0
        //depot/main/.../*.zip 3
        //depot/rel*/.../*.zip all
        //depot/.../*.mp4 2

This would result in the server behavior summarized in the following table:

File or files | Server behavior
--- | ---
`//depot/main/my/proj/component/MyClass.java` | All revisions of the archive file are stored on the server
`//artifacts/Windows/Windows10.iso` | No archive is ever stored for this file
`//depot/main/my/proj/builds/myProj.zip` | The three most recent revisions of the archives are stored on the server
`//depot/dev/my/proj/builds/myProj.zip` | Only the most recent revision of the archive is stored on the server
`//depot/rel1.0/my/proj/builds/myProj.zip` | All revisions of archives are stored on the server

Your search for returned results