Page MenuHomePhabricator

`arc land` should update timestamp of the commit
Closed, WontfixPublic

Description

Hello!

Sometimes code takes a long time from the first arc diff to arc land Currently what happens is that the commit date (What's returned by git or hg log) will have the date of when arc diff was first run (or when the first commit was made). It would be really nice if this date could be updated on arc land to the current date/time so that we'll have a better idea of *when* the commit actually landed.

Thanks!

Event Timeline

deuresti raised the priority of this task from to Needs Triage.
deuresti updated the task description. (Show Details)
deuresti added a subscriber: deuresti.
epriestley claimed this task.
epriestley added a subscriber: epriestley.

Git stores two dates, the "author date" and the "commit date". We update these in a way which is consistent with Git semantics (specifically, we do not use flags like --committer-date-is-author-date or --ignore-date to alter the semantics). The result is faithful to the result you'd get if you ran the same commands with git, and produces the values for "author date" and "commit date" which are most consistent with the internal meaning of these fields in Git. You can use "%cd", "--format=fuller", or similar settings to review commit dates.

Cool. I noticed our git repos were in a bit of a better state. How about mercurial? :)

Mercurial records only one date, but the story is basically the same: we don't pass any special flags, and you get the same result you'd get if you ran hg commands manually. In particular, hg commit --amend and hg rebase do not update commit dates for the amended or rebased commits. If you don't like this behavior, you could try raising it to the Mercurial upstream. But we're respecting the underlying VCS and using the semantics which are most consistent with its interpretation of dates.

I wonder if other teams would prefer a behavior where the timestamp is updated to reflect "land time" rather than some random commit time in the past. I know I certainly get confused.

We haven't seen any reports to that effect, and it seems equally likely that teams would be confused about arc exhibiting behavior which was not faithful to the underlying VCS behavior.

I don't think the proposed behavior is overwhelmingly superior. I think the VCS behavior is basically reasonable, and that arc land should generally have the least surprising behavior it can.

Dates in both VCSes are, in general, not trustworthy. The only trustworthy date is the "Push Date" recorded in Diffusion, although we don't currently expose this on the CLI.

We could conceivably write an arc log which provided an annotated view of git log / hg log and surfaced push dates, audit status, associated revisions/tasks, etc., but we haven't seen any requests for this and I'm not sure it would really see any use.

angie added a project: Restricted Project.May 20 2015, 5:05 PM
angie moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 3 2015, 8:35 PM
angie moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 16 2015, 8:50 PM
angie moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 16 2015, 8:54 PM