phabricator: post revisions in ascending topological order (issue6241)
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 14 Jan 2020 16:37:45 -0500
changeset 44076 a7c4bcf7018a
parent 44075 2122ffa903ea
child 44077 05881d002cb2
phabricator: post revisions in ascending topological order (issue6241) The parent in phabricator ends up being the last revision posted, so sorting the user input into ascending order should be enough to preserve the proper relationships. Differential Revision: https://phab.mercurial-scm.org/D7874
hgext/phabricator.py
--- a/hgext/phabricator.py	Tue Jan 14 16:29:03 2020 -0500
+++ b/hgext/phabricator.py	Tue Jan 14 16:37:45 2020 -0500
@@ -1065,6 +1065,7 @@
     opts = pycompat.byteskwargs(opts)
     revs = list(revs) + opts.get(b'rev', [])
     revs = scmutil.revrange(repo, revs)
+    revs.sort()  # ascending order to preserve topological parent/child in phab
 
     if not revs:
         raise error.Abort(_(b'phabsend requires at least one changeset'))