2

More or less, I created this scenario on purpose:

# We use git-flow.
$ git flow feature start <feature>

# update a file
$ git commit <file> -m '<message>'
$ git rebase -i develop
$ git push -u origin <feature-branch>

# Try arcanist now
$ arc diff

# diff was accepted
$ git flow feature finish <feature>

# feature branch removed, now in develop, let's push
$ git push

So now I'm in a state where the branch is gone, and I cannot arc land due to the local branch being unavailable. NOTE: git (and gitolite) works just fine

$ arc land

Exception
Branch "<feature-branch>" does not exist in the local working copy.

/rant.. I don't see my feature branch in Phabricator's Maniphest. Why not?

I can pull that branch back:

$ git fetch -a
$ git checkout <feature-branch>

But I am still unable to land:

$ arc land
Landing current branch '<feature-branch>'.
TARGET  Landing onto "<feature-branch>", selected by following tracking branches upstream to the closest remote.
REMOTE  Using remote "origin", selected by following tracking branches upstream to the closest remote.
FETCH  Fetching origin/<feature-branch>...

Usage Exception: There are no commits on "<feature-branch>" which are not already present on the target.

And as far as I can tell, I have no recourse for closing that diff. How do I recover?

Brian Bruggeman
  • 5,008
  • 2
  • 36
  • 55

1 Answers1

2

arc close-revision <Diff-ID> should close it. Basically you have two competing Git add-ons that are "landing" your changes. git flow feature finish <feature> already "landed" your changes so when you run arc land, it isn't able to perform its primary function of "landing" your changes.

CEPA
  • 2,592
  • 25
  • 31
  • Thank you. I'm new to phabricator and I purposefully set this up, so I was well aware of the competition. But I didn't see where phabricator had the option of closing. It turns out there must also be a background process, because everything seemed to move forward on its own (diff close, updates to show branches, etc.). – Brian Bruggeman Sep 29 '16 at 02:09
  • I thought about mentioning the automated processes. More information on what is happening there can be found here: https://secure.phabricator.com/book/phabricator/article/diffusion_updates/ – CEPA Sep 29 '16 at 14:44