Page MenuHomePhabricator

Arc patch update
Closed, DuplicatePublic

Description

Root Problem: In order to share WIP feature code, I want to be able to have remote feature branches. Unfortunately, once a revision is created, it seems the workflow breaks down as there doesn't seem to be a good way of keeping the remote branch and the revision up to date without the revision automatically closing.

More Specific Problem: If you use arc patch to create a local branch with the changes, it is very similar to pulling down a feature branch from a remote. Currently, there is no way of checking if the revision has been updated (similar to git fetch) or pulling (similar to git pull) in the updates to the revision without running the command again. (in which now you have two branches instead of just 1 updated one)

Possible Solutions: Add arc fetch and arc pull that use the revision number of local branch names to pull in changes. Alternatively, running the arc patch command from the already patched local branch could prompt to replace the current branch with the updated patch

Event Timeline

I'm not sure if this solves your problem, but just switch off autoclose for some prefix? We just have autoclose on master, as we don't consider anything on any branch that isn't master as done.

Interesting, how can I turn off autoclose for certain branches?

Why does the workflow break down?

The expectation is that you can simply run arc patch again to get a fresh copy of the current code.

Maybe see also T3277. But it sounds like there's no actual problem here that isn't solved by running git branch -D slightly more often, and the root problem is a minor convenience issue, not a workflow breakdown? Everything works fine, you just don't want extra branches because you have to spend a few extra seconds cleaning them up later?

@anthony-verge just edit the repo, scroll down, branch stuff is somewhere around there.

Sorry, the comment "it seems the workflow breaks down" was referring to the auto-close that was occurring on feature branches and the inability (or at least I thought so) to keep the remote feature branch and the revision synchronized . @benjumanji's suggestion to turn off autoclose on branches outside of master/develop I think fixes my root problem.

I agree the arc patch fetch was just to eliminate me having to do that consistently to compensate for the inability to complete the root problem.

I suppose this is the exact reason why you guys ask for the root problem and not the suggested solution :)

Thanks for all your efforts guys!

I'm merging this into T10691 under the assumption that the real root problem is the one described there (your users want to treat git push as "save a copy", not "publish").