Page MenuHomePhabricator

Improve clarity of commit and symbol handling in DiffusionRequest
ClosedPublic

Authored by epriestley on May 13 2014, 1:49 PM.
Tags
None
Referenced Files
F14033468: D9098.id21634.diff
Sat, Nov 9, 5:42 PM
F14033467: D9098.id21610.diff
Sat, Nov 9, 5:42 PM
F14033466: D9098.id.diff
Sat, Nov 9, 5:42 PM
F14020567: D9098.diff
Wed, Nov 6, 12:45 AM
F14002847: D9098.id21610.diff
Fri, Oct 25, 11:08 PM
F13994039: D9098.diff
Wed, Oct 23, 3:18 AM
F13974342: D9098.id21634.diff
Fri, Oct 18, 5:11 AM
F13968482: D9098.id21610.diff
Wed, Oct 16, 9:20 PM
Subscribers

Details

Summary

Ref T2683. Currently, DiffusionRequest has four different "commitey" things:

  • commit
  • rawCommit
  • symbolicCommit
  • stableCommit

Of these, only two are actually distinct, useful values: symbolicCommit (which holds the value the request originally contained, if one existed) and stableCommit (which resolves that value, or the value implied by its omission, into a stable, permanent commit identifier).

  • rawCommit is equivalent to symbolicCommit and can be simply removed.
  • commit has some sketchy magic around it that needs to be pulled out before it can be jettisoned.
Test Plan

Viewed SVN, Git, and Mercurial repositories. Viewed brwose/history/change/tag/branch/etc views.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Improve clarity of commit and symbol handling in DiffusionRequest.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

V. glad you're cleaning this up btw. This always confused me a bunch.

src/applications/diffusion/controller/DiffusionChangeController.php
56

should be Symbolic maybs?

src/applications/diffusion/controller/DiffusionController.php
101–111

what's up with stable vs symbolic here, given it was all raw before?

I think stable makes more sense for a link and maybe we had bugs before where raw / symbolic were omitted. How come not just use it in both places?

src/applications/diffusion/controller/DiffusionHistoryController.php
155

D9091 merge issue methinks

This revision is now accepted and ready to land.May 13 2014, 4:48 PM
src/applications/diffusion/controller/DiffusionController.php
101–111

These were theoretically buggy but they aren't normally reachable if the raw commit has a value which can trigger issues. The commit property could also get expanded sometimes and basically was unpredictable black magic through and through.

I'm using stable for the name because rendering something like "rPHEAD^^^" in the UI doesn't make sense.

I'm using symbolic for the link because if you're not pinned to a specific commit (or at "HEAD^^^" or something because you edited the URL or we add that kind of capability in the future) we don't (usually) want to pin you to one.

Haha -- actually, since it's a commit link they should both be "stable".

src/applications/diffusion/request/DiffusionRequest.php
623–633

Particularly, because of this nonsense rawCommit would often not be the raw commit at all, but instead equivalent to stableCommit.

epriestley updated this revision to Diff 21634.

Closed by commit rP347252fda85a (authored by @epriestley).