Mercurial > public > mercurial-scm > hg
comparison hgext/phabricator.py @ 44076:a7c4bcf7018a
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
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 14 Jan 2020 16:37:45 -0500 |
parents | b0867b7751ba |
children | 59b3fe1e2021 |
comparison
equal
deleted
inserted
replaced
44075:2122ffa903ea | 44076:a7c4bcf7018a |
---|---|
1063 update an existing Differential Revision, or create a new one. | 1063 update an existing Differential Revision, or create a new one. |
1064 """ | 1064 """ |
1065 opts = pycompat.byteskwargs(opts) | 1065 opts = pycompat.byteskwargs(opts) |
1066 revs = list(revs) + opts.get(b'rev', []) | 1066 revs = list(revs) + opts.get(b'rev', []) |
1067 revs = scmutil.revrange(repo, revs) | 1067 revs = scmutil.revrange(repo, revs) |
1068 revs.sort() # ascending order to preserve topological parent/child in phab | |
1068 | 1069 |
1069 if not revs: | 1070 if not revs: |
1070 raise error.Abort(_(b'phabsend requires at least one changeset')) | 1071 raise error.Abort(_(b'phabsend requires at least one changeset')) |
1071 if opts.get(b'amend'): | 1072 if opts.get(b'amend'): |
1072 cmdutil.checkunfinished(repo) | 1073 cmdutil.checkunfinished(repo) |