Differences between revisions 1 and 17 (spanning 16 versions)
Revision 1 as of 2006-12-03 20:34:39
Size: 408
Comment: Describe .hg/requires file
Revision 17 as of 2010-10-22 19:28:37
Size: 2242
Editor: abuehl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Starting with Mercurial version XXX there is a file `.hg/requires` which specifies the capabilities needed by a client to access this repository. It is a text file, where each line contains the name of a capability and optionally a parameter separated by a `=` character. #pragma section-numbers 2
Line 3: Line 3:
== Capabilities == = Requires File =
Line 5: Line 5:
 * `store`
   The directory `.hg/store` contains the subdirectories `data` and `meta`. XXX
 * `foo`
   bar
The '''requires file''' is a file inside the [[Repository|repository]] which is used to describe the
general format and layout of the repository. This provides a basic mechanism for introducing new
repository formats.

<<TableOfContents>>

== Details ==

Starting with Mercurial version 0.9.2 there is a file `.hg/requires` which specifies the capabilities needed by a client to access this repository. It is a text file, where each line contains the name of a capability and optionally (separated by a `=` character from the name) a list of parameters, each separated by a comma (`,`).

Currently there are only capabilities which don't need parameters.

The requires file only describes the format of the persistent representation of a repository on
disk or backup media. Which is completely unrelated to how this information is transferred
over the [[WireProtocol|wire]] (for example, when pushing and pulling).

== Older Mercurial versions ==

If an older Mercurial version tries to access a repository that was created by a newer
Mercurial version, an error message like

{{{
abort: requirement 'dotencode' not supported!
}}}

may be displayed, which means the Mercurial version used to access that repository doesn't know how to
interpret it, because accessing it would require knowledge about the 'fncache' capability.

If such an error message appears, a newer Mercurial version must be used to access the repository or
the repository must be converted to an older format understood by that version.

The format configuration option may be used to instruct Mercurial to create older repository formats.

== Known capabilities ==

 || `store` || The directory `.hg/store` contains the subdirectories `data` (see CaseFoldingPlan) ||
 || `revlogv1` || [[RevlogNG]] is used. ||
 || `fncache` || store files are named to work around Windows limitations described in [[fncacheRepoFormat]]. ||
 || `dotencode` || Leading '.' (period) or ' ' (space) in store filenames are encoded<<BR>> (see [[http://selenic.com/repo/hg/rev/34d8247a4595|34d8247a4595]], appears in 1.7). ||

== See also ==
 * [[CompatibilityRules]]

----
CategoryInternals

Requires File

The requires file is a file inside the repository which is used to describe the general format and layout of the repository. This provides a basic mechanism for introducing new repository formats.

1. Details

Starting with Mercurial version 0.9.2 there is a file .hg/requires which specifies the capabilities needed by a client to access this repository. It is a text file, where each line contains the name of a capability and optionally (separated by a = character from the name) a list of parameters, each separated by a comma (,).

Currently there are only capabilities which don't need parameters.

The requires file only describes the format of the persistent representation of a repository on disk or backup media. Which is completely unrelated to how this information is transferred over the wire (for example, when pushing and pulling).

2. Older Mercurial versions

If an older Mercurial version tries to access a repository that was created by a newer Mercurial version, an error message like

abort: requirement 'dotencode' not supported!

may be displayed, which means the Mercurial version used to access that repository doesn't know how to interpret it, because accessing it would require knowledge about the 'fncache' capability.

If such an error message appears, a newer Mercurial version must be used to access the repository or the repository must be converted to an older format understood by that version.

The format configuration option may be used to instruct Mercurial to create older repository formats.

3. Known capabilities

  • store

    The directory .hg/store contains the subdirectories data (see CaseFoldingPlan)

    revlogv1

    RevlogNG is used.

    fncache

    store files are named to work around Windows limitations described in fncacheRepoFormat.

    dotencode

    Leading '.' (period) or ' ' (space) in store filenames are encoded
    (see 34d8247a4595, appears in 1.7).

4. See also


CategoryInternals

RequiresFile (last edited 2013-09-13 22:34:47 by mpm)