diff tests/test-phabricator.t @ 46037:9624bf057c2a

phabricator: allow local revisions to be specified with `phabupdate` It's way easier and less error prone to specify a revset after importing a series than to manually type in a series of Differentials. Unlike most revision oriented commands, this requires the `--rev` option explicitly because the existing `DREVSPEC` doesn't need to have the leading 'D', and therefore the meaning is ambiguous. I wouldn't have a problem giving precedence to the local revnum, but `phabread` and `phabimport` also use DREVSPEC, and local revisions make no sense there. I would be fine with modifying that definition to require the leading 'D', but I'm not sure how many people are used to not specifying it. Differential Revision: https://phab.mercurial-scm.org/D9356
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 21 Nov 2020 00:10:36 -0500
parents 294aab57a5f3
children 466236e99eac
line wrap: on
line diff
--- a/tests/test-phabricator.t	Fri Nov 20 10:51:07 2020 +0100
+++ b/tests/test-phabricator.t	Sat Nov 21 00:10:36 2020 -0500
@@ -590,6 +590,14 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     create beta for phabricator test
   
+phabupdate can convert from local revisions
+
+  $ hg phabupdate --reclaim D7917 -r '.: and not public()'
+  abort: cannot specify both DREVSPEC and --rev
+  [10]
+
+  $ hg phabupdate --reclaim -r '.: and not public()' --test-vcr "$VCR/phabupdate-revs.json"
+
 Phabimport accepts multiple DREVSPECs
 
   $ hg rollback --config ui.rollback=True