just playing with tangled
1# NOTE: ensure you update docs/revsets.md with documentation when
2# adding/updating any of these aliases
3
4[revsets]
5fix = "reachable(@, mutable())"
6simplify-parents = "reachable(@, mutable())"
7# log revset is also used as the default short-prefixes. If it failed to
8# evaluate, lengthy warning messages would be printed. Use present(expr) to
9# suppress symbol resolution error.
10log = "present(@) | ancestors(immutable_heads().., 2) | present(trunk())"
11# Emit the working-copy branch first, which is usually most interesting.
12# This also helps stabilize output order.
13log-graph-prioritize = "present(@)"
14sign = "reachable(@, mutable())"
15
16[revset-aliases]
17# trunk() can be overridden as '<bookmark>@<remote>'. Use present(trunk()) if
18# symbol resolution error should be suppressed.
19'trunk()' = '''
20latest(
21 remote_bookmarks(exact:"main", exact:"origin") |
22 remote_bookmarks(exact:"master", exact:"origin") |
23 remote_bookmarks(exact:"trunk", exact:"origin") |
24 remote_bookmarks(exact:"main", exact:"upstream") |
25 remote_bookmarks(exact:"master", exact:"upstream") |
26 remote_bookmarks(exact:"trunk", exact:"upstream") |
27 root()
28)
29'''
30
31# If immutable_heads() failed to evaluate, many jj commands wouldn't work. Use
32# present(expr) to suppress symbol resolution error.
33'builtin_immutable_heads()' = 'present(trunk()) | tags() | untracked_remote_bookmarks()'
34'immutable_heads()' = 'builtin_immutable_heads()'
35'immutable()' = '::(immutable_heads() | root())'
36'mutable()' = '~immutable()'