Page MenuHomePhabricator

config option to make 'arc land --hold' default behavior
Closed, WontfixPublic

Description

Well, title pretty much says it all. We use phab/arc for Blender project, and when landing a revision, I always use --hold to be able to make ultimate minor checks and revisions before pushing changes (we use git, so can use --amend on latest commit until it has been pushed).

Unfortunately, I sometimes forget the --hold option… So I’d appreciate highly if it could be set as default behavior in some config file (and consequently probably add a --no-hold option for consistency).

I just hope this is not yet possible (making this report useless), but I really checked all available doc on web and found nothing about it.

Thanks for that nice set of tools, btw! :)

Event Timeline

mont29 created this task.Apr 2 2014, 2:01 PM
mont29 raised the priority of this task from to Wishlist.
mont29 updated the task description. (Show Details)
mont29 added a project: Arcanist.
mont29 added a subscriber: mont29.

As a workaround, you can create an alias, like arc hand ("hold land"?):

arc alias hand -- land --hold

...and then use arc hand instead of arc land.

I'm hesitant to add configuration flags and inverse options for every flag, and this is the only request we've ever received to allow defaults for --hold. I'll keep this open in case we get more reports, but using an alias might be the most reasonable workaround, at least for now.

mont29 added a comment.Apr 2 2014, 2:08 PM

Ah, thanks for the tip, did not thought about that. Will do the trick for me, for sure.

I'd also appreciate the ability to set my default land to --hold.

We have a use case where having --hold be the default behavior would be desirable (configurable per repository). For now being able to alias should work fine since we are currently only utilizing differential revisions for every commit only for a small team of engineers.

We clone (mercurial) the repository every time we branch versions (we switched to mercurial in a time when their branching system was unreliable in our workflow). Each branched repository has a hook setup to prevent pushes until the version it was branched from also has the change. This enforces changes are upstream before going into the central build repository for that version.

For example, we have a repo stable which we create a clone of for a version-branch release-1.1. Our script for creating the version branch then updates a file in the remote location for release-1.1 to prevent any commits that are not existent in the history of stable.

We would run arc land --hold on differentials in release-1.1, and then (quickly) get those changes merged into stable and upstream, allowing for the diff to be finalized afterwards. Otherwise a regular arc land fails because of our hook.

I was going to write up a story about a phabricator training session I held, but I'll simplify my thoughts from after it. The arc land command is the only one in the differential process that pushes changes upstream (that we'll be using, among diff, which, patch, help). If a repository could have the configuration for --hold to be the default behavior it would reduce the possibility of someone pushing booched changes upstream.

Additionally, we don't currently host the repositories on phabricator so we have to manage access in other ways. For the time being we're preventing some users from pushing (new hires, interns, etc.) but that means if they try to land (when a revision is accepted they get an email stating they should now do arc land) then they'll receive errors in the process.

girtsf added a subscriber: girtsf.Jun 28 2017, 8:48 PM

I too wish that there was some confirmation mode for arc land (and maybe arc diff too?).

I envision arc land doing what arc land --preview currently does, perhaps listing affected files as well, and then waiting for a Ok to commit? (Y/n).

epriestley closed this task as Wontfix.Sep 24 2018, 3:55 PM
epriestley claimed this task.

I don't plan to pursue this, as requested.

In the original case, I don't know what "minor checks and revisions" occur. I'd prefer to make the workflow more robust so that they are unnecessary, but don't have enough information to pursue that.