Page MenuHomePhabricator

When commits have a "rewritten" hint, try to show that in handles in other applications
ClosedPublic

Authored by epriestley on Aug 24 2016, 1:28 PM.
Tags
None
Referenced Files
F15447591: D16437.id39543.diff
Fri, Mar 28, 12:40 AM
F15447589: D16437.id39528.diff
Fri, Mar 28, 12:40 AM
F15447588: D16437.id.diff
Fri, Mar 28, 12:40 AM
F15445083: D16437.id39543.diff
Thu, Mar 27, 12:25 PM
F15442584: D16437.diff
Wed, Mar 26, 11:49 PM
F15433981: D16437.id.diff
Tue, Mar 25, 1:24 AM
F15433532: D16437.diff
Mon, Mar 24, 11:41 PM
F15433333: D16437.id39528.diff
Mon, Mar 24, 10:38 PM
Subscribers
None

Details

Summary

Ref T11522. This tries to reduce the cost of rewriting a repository by making handles smarter about rewritten commits.

When a handle references an unreachable commit, try to load a rewrite hint for the commit. If we find one, change the handle name to "OldHash > NewHash" to provide a strong hint that the commit was rewritten and that copy/pasting the old hash (say, to the CLI) won't work.

I think this notation isn't totally self-evident, but users can click it to see the big error message on the page, and it's at least obvious that something weird is going on, which I think is the important part.

Some possible future work:

  • Not sure this ("Recycling Symbol") is the best symbol? Seems sort of reasonable but mabye there's a better one.
  • Putting this information directly on the hovercard could help explain what this means.
Test Plan

Screen Shot 2016-08-24 at 6.24.42 AM.png (890×885 px, 119 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to When commits have a "rewritten" hint, try to show that in handles in other applications.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.

recycling seems fine, I guess. seems rare?

This revision is now accepted and ready to land.Aug 24 2016, 4:09 PM

Yeah, it stands out pretty well, sort-of-makes-sense (the old commit has kind of been "recycled" into a similar new commit), and this situation should be exceptionally rare.

(At least, until I come up with a reason to rewrite out stuff to get rid of that silly . commit.)

This revision was automatically updated to reflect the committed changes.