]> khamidou — GitHub mirrors - arcanist.git/commit
Make arc patch create a bookmark by default in hg
authordurham <durham@fb.com>
Fri, 22 Mar 2013 00:52:07 +0000 (17:52 -0700)
committerdurham <durham@fb.com>
Fri, 22 Mar 2013 00:52:07 +0000 (17:52 -0700)
commitba78000b385d737ca805345a578b5a16ca8baaa5
tree2b6477068da840f16e98c04cb1a9922abd0f256f
parent2900ab6abdc4867f5b7451fad76bf8ebe6d9887d
Make arc patch create a bookmark by default in hg

Summary:
Previously, arc patch would create a new commit under the existing
current bookmark in mercurial. There have been two discussions about what the
right behavior should be (D3334 and D3658). One side wants no commit at all,
and one side wants a commit under a new bookmark. The current implementation is
the worst of both worlds :(

This change makes it create a new bookmark at the revision's base before commiting,
same as the --bookmark flag used to do (which is now obsolete). That way the
existing bookmark doesn't move (in mercurial >=1.8). This is the same behavior
git has, which is convienent for groups migrating between the two.

Also makes hg's getCanonicalRevision handle svn revisions just like git. This way
arc patch will try to apply the patch to the appropriate revision in the history.

Test Plan:
Ran:
arc patch - Verified it created a new bookmark and commited on top of the
revision's base commit.

arc patch --nobranch - Verified it put the new commit on top of the current
bookmark without a new bookmark.

arc patch --nocommit - Verified it left all the changes in the working copy.

Also verified arc patch still works with git.

Reviewers: epriestley

Reviewed By: epriestley

CC: sid0, bos, dschleimer, aran, Korvin
Differential Revision: https://secure.phabricator.com/D5408
src/repository/api/ArcanistMercurialAPI.php
src/workflow/ArcanistPatchWorkflow.php