When you run arc diff on a range of commits, we currently smush them all together and discard information.
For example, arc diff HEAD^^^^^ followed by arc patch produces a single local commit. Instead, it should produce 5 local commits.
When you run arc diff on a range of commits, we currently smush them all together and discard information.
For example, arc diff HEAD^^^^^ followed by arc patch produces a single local commit. Instead, it should produce 5 local commits.
Enabling this by default sounds reasonable to me. It might let us merge the "Local Commits" table into the "Revision Update History" table too.
It will probably need some UI work to avoid being confusing. We might also need to start compressing the hunk table.
I tried manually doing the arc diff on each commit in a branch, and discovered I couldn't actually view a single commit in isolation. Comparing two adjacent diffs in the revision still seemed to show all of the file moves which had been done in the other commits.
@ccope Try running this over your branch:
git rebase -i --exec 'arc diff -C HEAD HEAD^' origin/master
@fooishbar That looks nifty, but I think what I did was functionally the same? I made a new branch at the base commit of my old branch, then repeatedly cherry-picked my old commits + ran arc diff.
@ccope: Yeah, (almost) functionally identical; just a bit slower. The 'almost' is that if you have a branched named T123 in order to automatically link revisions to tasks, your cherry-pick method will succeed (as the branch at time of 'arc diff' is T123), but the rebase method won't (as you'll be on a detached HEAD at the time).
This would be a useful feature as well for myself and the rest of my team. We also find the local commits quite useful.
Please add support to have each local commit translate into a revision update, as suggested at the top of the thread. That would be fantastic.
I tried to use the above rebase command, but it created a separate revision for each commit, instead of merging them into the same revision as different updates.
Oh, that's actually a different task, I don't currently plan to implement that. Let me me rename this to be more clear...
Now I'm even more confused. This ticket still doesn't conform to modern Feature Requests rules :)
We already support uploading the local commits to Staging, but arc-patch doesn't use that information; I think we mentioned something about it in T8238, and in T182, which are the consumers of Revision information.
Do you consider this ticket just "make arc patch restore all local commits", or something more?
Do you consider this ticket just "make arc patch restore all local commits", or something more?
Very nearly just that -- it would probably also involve a way to view the individual commits from the web UI (e.g., on the "Commits" tab of a revision, the commit hash becomes a link to view just that commit).
I generally think this isn't terribly useful (which is why I haven't touched it in the last 4 years) but is something we should have from a completeness perspective (it's bad that arc diff + arc patch are a destructive operation when they don't need to be) and worth sorting out before trying to create revisions from branches/tags/refs, since it will be harder to fix after that and we'll probably see a lot more "push 20 different things to a branch and make a review out of it" behavior once you can create a revision from a branch.