docs: explain remote tag checkout branch requirements

This commit is contained in:
Gatefixer
2026-11-05 01:40:19 +00:00
parent 5a64529add
commit ab62f979db
3 changed files with 29 additions and 0 deletions
+7
View File
@@ -1471,6 +1471,13 @@ page).
The tags API supports the standard CRUD operations (create, list, update, delete),
plus checking out by tag name.
A tag identifies both a branch and a version. On remote tables, a tag must belong
to the handle's current branch; checking out a tag on another branch raises an
error without changing the current selection. Obtain a handle for the tag's
branch first: in Python, use `branch_table = table.branches.checkout("exp")`, then
`branch_table.checkout("baseline")` to read a tag named `baseline` on `exp`.
See [Branches](/tables/branching) for more on branch handles.
<CodeGroup>
<CodeBlock filename="Python" language="Python" icon="python">
{VersioningTags}
+10
View File
@@ -307,6 +307,16 @@ class RemoteTable(Table):
)
def checkout(self, version: Union[int, str]):
"""Check out a version number or tag as a read-only view in place.
A tag must belong to this handle's current branch. To read a tag on
another branch, first obtain that branch's handle with
`table.branches.checkout("branch_name")`, then call `checkout(tag)` on
that handle. A tag on another branch raises an error without changing
the current selection.
Call `checkout_latest()` to return to the latest version of this branch.
"""
result = LOOP.run(self._table.checkout(version))
self._checkout_version = self.version
return result
+12
View File
@@ -3464,6 +3464,12 @@ class Table(ABC):
out state. To return the table to a normal state use
`[Self::checkout_latest]`.
For remote tables, a tag must belong to this handle's current branch.
To read a tag on another branch, first obtain that branch's handle with
`table.branches.checkout("branch_name")`, then call `checkout(tag)` on
that handle. A tag on another branch raises an error without changing
the current selection.
Parameters
----------
version: int | str,
@@ -7994,6 +8000,12 @@ class AsyncTable:
out state. To return the table to a normal state use
`[Self::checkout_latest]`.
For remote tables, a tag must belong to this handle's current branch.
To read a tag on another branch, first obtain that branch's handle with
`await table.branches.checkout("branch_name")`, then call
`await branch_table.checkout(tag)` on that handle. A tag on another
branch raises an error without changing the current selection.
Parameters
----------
version: int | str,