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
Unknown Object (File)
Tue, Apr 9, 4:20 PM
Unknown Object (File)
Mon, Apr 8, 5:14 PM
Unknown Object (File)
Sun, Apr 7, 5:26 PM
Unknown Object (File)
Fri, Mar 29, 8:33 PM
Unknown Object (File)
Wed, Mar 27, 5:01 AM
Unknown Object (File)
Mon, Mar 18, 12:28 PM
Unknown Object (File)
Jan 28 2024, 9:40 AM
Unknown Object (File)
Jan 23 2024, 9:24 AM
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.