##// END OF EJS Templates
phabricator: add a small language to query Differential Revisions...
phabricator: add a small language to query Differential Revisions Previously, `phabread` can only be used to read a single patch, or a single stack of patches. In the future, we want to have more complex queries like filtering with status (open, accepted, closed, etc), or maybe more complex like filtering by reviewers etc. The command line flag approach won't scale with that. Besides, we might want to have other commands to update Differential Revision status in batch, like accepting a stack using a single command. Therefore, this patch adds a small language. It has basic set operations: `&`, `+`, `-` and an ancestor operator to support `--stack`. Test Plan: Try querying this Phabricator instance: hg phabread 1+2 # 1, 2 hg phabread D2+D1 # 2, 1 hg phabread ':118-115+:2-1' # 114, 116, 117, 118, 2 hg phabread '((:118-(D115+117)))&:117' # 114, 116 hg phabread ':2&:117' --debug # differential.query is called only once Make sure the output is expected and prefetch works. Differential Revision: https://phab.mercurial-scm.org/D125

File last commit:

r29000:2d3837a4 stable
r33831:53954177 default
Show More
map-cmdline.status
20 lines | 957 B | text/plain | TextLexer
Jordi Gutiérrez Hermoso
log: add a status template...
r25006 %include map-cmdline.default
# Override base templates
changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}{lfiles}\n'
changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{description}{lfiles}\n'
changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{extras}{description}{lfiles}\n'
# Override the file templates
lfiles = '{if(files,
label('ui.note log.files',
Yuya Nishihara
log: fix status template to list copy source per dest (issue5155)...
r29000 'files:\n'))}{lfile_mods}{lfile_adds}{lfile_dels}'
Jordi Gutiérrez Hermoso
log: add a status template...
r25006
Yuya Nishihara
log: fix status template to list copy source per dest (issue5155)...
r29000 lfile_adds = '{file_adds % "{lfile_add}{lfile_src}"}'
lfile_mods = '{file_mods % "{lfile_mod}{lfile_src}"}'
Jordi Gutiérrez Hermoso
log: add a status template...
r25006 lfile_add = '{label("status.added", "A {file}\n")}'
Yuya Nishihara
log: fix status template to list copy source per dest (issue5155)...
r29000 lfile_mod = '{label("status.modified", "M {file}\n")}'
lfile_src = '{ifcontains(file, file_copies_switch,
label("status.copied", " {get(file_copies_switch, file)}\n"))}'
Jordi Gutiérrez Hermoso
log: add a status template...
r25006
lfile_dels = '{file_dels % "{label('status.removed', 'R {file}\n')}"}'