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)
Sun, Mar 24, 7:00 AM
Unknown Object (File)
Tue, Mar 19, 7:00 PM
Unknown Object (File)
Tue, Mar 19, 6:14 PM
Unknown Object (File)
Fri, Mar 15, 4:30 AM
Unknown Object (File)
Fri, Mar 8, 10:50 PM
Unknown Object (File)
Feb 9 2024, 8:25 AM
Unknown Object (File)
Feb 8 2024, 8:01 PM
Unknown Object (File)
Feb 7 2024, 5:17 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).