This function returns a timestamp for the working copy revision.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers
Tested manually by executing the raw commands in a git, hg and svn repository.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- repo-timestamp
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 666 Build 666: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
Hrrm, what's the goal of this?
The behavior might be confusing if the working copy isn't clean.
Comment Actions
I think this probably gets into a lot of sketchy territory. For example:
- I think the name "working copy timestamp" is a bit misleading, as my first assumption was that it included the modification times of dirty files. We could name this something like "getMostRecentCommitOnCurrentBranchTimestamp()" to resolve this.
- This probably does not work correctly in empty repositories in any of the VCSes?
- I can't really think of uses for this other than D9265. Use cases I can imagine would maybe be better served with a slightly more general getCommitInformation($commit) sort of API. There's some precedent for this in getLocalCommitinformation().
- (And I'm pretty sure I caught one actual issue.)
Rather than expose somewhat-misleading, sort-of-functional, maybe-not-really-that-useful public API, what do you think about hard-coding the git actions in arc version for now instead? We could generalize them eventually after developing a better use case for this, or building getCommitInformation($commit), or whatever else.
src/repository/api/ArcanistMercurialAPI.php | ||
---|---|---|
516–518 | This one definitely doesn't work, since it doesn't return? |