This is an archive of the discontinued Mercurial Phabricator instance.

phabricator: use Phabricator's last node information
ClosedPublic

Authored by quark on Jul 18 2017, 12:20 AM.

Details

Summary

This makes it more strict when checking whether or not we should update a
Differential Revision. For example,

a) Alice updates D1 to content 1.
b) Bob updates D1 to content 2.
c) Alice tries to update D1 to content 1.

Previously, c) will do nothing because phabsend detects the patch is not
changed. A more correct behavior is to override Bob's update here, hence the
patch.

This also makes it possible to return a reaonsable "last node" when there is
no tags but only Differential Revision commit messages.

Test Plan
for i in A B C; do echo $i > $i; hg ci -m $i -A $i; done

hg phabsend 0::
# D40: created
# D41: created
# D42: created

echo 3 >> C; hg amend; hg phabsend .
# D42: updated

hg tag --local --hidden -r 2 -f D42
# move tag to the previous version

hg phabsend .
# D42: skipped (previously it would be "updated")

rm -rf .hg; hg init
hg phabread --stack D42 | hg import -
hg phabsend .
# D42: updated
hg tag --local --remove D42
hg commit --amend
hg phabsend .
# D42: updated (no new diff uploaded, previously it will upload a new diff)

The old diff object is now returned, which could be useful in the next
patch.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

quark created this revision.Jul 18 2017, 12:20 AM
quark edited the test plan for this revision. (Show Details)Jul 18 2017, 12:22 AM
mitrandir accepted this revision.Jul 18 2017, 10:27 AM
quark abandoned this revision.Jul 18 2017, 5:37 PM
quark reclaimed this revision.Aug 1 2017, 4:39 PM
quark updated this revision to Diff 484.
quark edited the test plan for this revision. (Show Details)Aug 4 2017, 3:54 PM
quark updated this revision to Diff 550.
This revision was automatically updated to reflect the committed changes.