Page MenuHomePhabricator

Allow "arc browse <symbol>" to resolve symbolic commits
ClosedPublic

Authored by epriestley on Aug 4 2014, 6:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 19 2024, 2:22 AM
Unknown Object (File)
Oct 17 2024, 12:06 AM
Unknown Object (File)
Oct 15 2024, 10:25 AM
Unknown Object (File)
Oct 8 2024, 11:47 PM
Unknown Object (File)
Oct 1 2024, 8:15 AM
Unknown Object (File)
Sep 5 2024, 1:58 PM
Unknown Object (File)
Sep 4 2024, 10:23 PM
Unknown Object (File)
Aug 27 2024, 10:34 PM

Details

Summary

Ref T5781. This makes things like arc browse master work (but they open the commit, not a revision).

Test Plan

Ran arc browse master.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Allow "arc browse <symbol>" to resolve symbolic commits.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, csilvers.

I'm not sure I understand when you use plural arguments -- does that mean you can do arc browse D1234 T5678? If so, am I reading the current review right that it will either interpret all arguments as commits, or all arguments as objects, or all arguments as files? I'm probably not.

You can specify multiple objects, yes. We try to resolve them in this order:

  • object names (like T123).
  • if you're in a working copy:
    • symbolic commits.
    • paths which exist in the working copy.
    • (with --force: force everything that's left to resolve as a path).

They fall through if they fail an earlier resolution:

$ arc browse T234 master README
Opening T234 as an object.
Opening master as a commit.
Opening README as a repository path.
$ 

(There's no way to force T123 to resolve as a symbolic commit or a path, nor to force master to resolve as a path, but I suspect no one will ever care, and we could introduce some --path flag if they do.)

Oh, I think i was just misundersatnding how the php works. I see the unset commands now, and the logic makes more sense to me. But clearly I am not the best person to be reviewing this...

epriestley edited edge metadata.
  • Rebase to pick up $paths handling fix.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Aug 4 2014, 6:57 PM
epriestley updated this revision to Diff 24398.

Closed by commit rARC26b71baf0919 (authored by @epriestley).