Jun Wu <quark@fb.com> [Tue, 18 Jul 2017 02:05:19 -0700] rev 33834
phabricator: add phabupdate command to update status in batch
Changing status (accept, etc) on the webpage is not very convenient -
currently there is no way to accept (or abandon etc.) a stack using a single
click or command.
This patch adds a `phabupdate` command that could be used to change status
in batch. It also supports `--comment` which will write a comment on the
last revision, which is similar to what we do using emails.
Differential Revision: https://phab.mercurial-scm.org/D127
Jun Wu <quark@fb.com> [Tue, 18 Jul 2017 01:34:55 -0700] rev 33833
phabricator: add status to revision query language
This patch adds status words (ex. `abandoned`, `accepted`, `needsreview`,
`needsrevision`, `closed`) to the revision query language so people can
select revision in a more flexible way.
Test Plan:
Try something like `phabread ':2 & accepted'`, `phabread ':105 - closed` and
make sure they have desired outputs.
Differential Revision: https://phab.mercurial-scm.org/D126
Jun Wu <quark@fb.com> [Mon, 17 Jul 2017 23:19:11 -0700] rev 33832
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
Jun Wu <quark@fb.com> [Mon, 17 Jul 2017 23:14:06 -0700] rev 33831
phabricator: change "readpatch" to be more flexible
Previously, `readpatch` and `querydrev` take a same `params` and `stack`
parameters. This patch changes `readpatch` so it takes the output of
`querydrev`, not the input of `querydrev`. This makes the code more
flexible and cleaner.
Differential Revision: https://phab.mercurial-scm.org/D124
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 22:46:16 -0700] rev 33830
filemerge: extract `_picklabels` as a helper function
This shortens `simplemerge()` and is a bit cleaner, IMO.
Differential Revision: https://phab.mercurial-scm.org/D376
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 22:46:03 -0700] rev 33829
simplemerge: write merge result to the localctx, if passed
Differential Revision: https://phab.mercurial-scm.org/D375
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33828
simplemerge: use contexts to read file data from, if passed
Differential Revision: https://phab.mercurial-scm.org/D374
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33827
filemerge: pass contexts to simplemerge
Otherwise, this should be a no-op.
Differential Revision: https://phab.mercurial-scm.org/D373
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33826
simplemerge: add optional context parameters to simplemerge
Rename the existing parameters for clarity.
These will, in subsequent patches, allow callers to redirect reads (of the
three sides of the merge) and writes (of the result) to the given contexts,
instead of using the filesystem.
While in most cases, the writes will go to a workingfilectx, this opens the
door for it to be a memfilectx in the case of an in-memory merge.
Repo will be necessary in a subsequent comit.
Differential Revision: https://phab.mercurial-scm.org/D372
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33825
simplemerge: extract verifytext as a helper function
This will be used in a subsequent commit.
Differential Revision: https://phab.mercurial-scm.org/D371