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
Unknown Object (File)
Tue, May 7, 7:46 AM
Unknown Object (File)
Fri, May 3, 8:44 AM
Unknown Object (File)
Wed, Apr 24, 10:52 PM
Unknown Object (File)
Mon, Apr 15, 12:55 PM
Unknown Object (File)
Thu, Apr 11, 10:05 AM
Unknown Object (File)
Apr 1 2024, 1:40 PM
Unknown Object (File)
Mar 28 2024, 12:34 PM
Unknown Object (File)
Mar 10 2024, 6:53 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).