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
F14731623: D16437.diff
Sat, Jan 18, 9:05 AM
Unknown Object (File)
Mon, Jan 13, 5:33 PM
Unknown Object (File)
Sun, Jan 12, 3:31 PM
Unknown Object (File)
Wed, Jan 8, 4:31 AM
Unknown Object (File)
Sat, Dec 28, 5:19 PM
Unknown Object (File)
Tue, Dec 24, 9:10 PM
Unknown Object (File)
Dec 14 2024, 4:21 PM
Unknown Object (File)
Dec 13 2024, 1:01 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
Branch
hint4
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13404
Build 17213: Run Core Tests
Build 17212: arc lint + arc unit

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.