]> khamidou — GitHub mirrors - arcanist.git/commit
[hg - arc patch] make mercurial bookmark with arc patch
authorkatherine <kzak@fb.com>
Sat, 18 Aug 2012 18:23:56 +0000 (11:23 -0700)
committerkatherine <kzak@fb.com>
Sat, 1 Sep 2012 00:05:46 +0000 (17:05 -0700)
commitb0cfe9d94d38f0ae7f2b3dedc4f7290a9a000069
tree52cc8ad3fe73dca763c77e4cdfb70a41e0279a4d
parentd79664a30d43f2406a008b85231c5c185304736c
[hg - arc patch] make mercurial bookmark with arc patch

Summary:
w00t!

Created new functions getBookmarkName, createBookmark that use mercurial
commands to create a new bookmark and apply the commit message when
running arc patch. Like with git, it checks if the bookmark already
exists. If it does, creates arcpatch-DXXX-1, -2 etc

Updated the mercurial section of run() to include applying the commit
message.

Pretty new to programming in general still, so I wasn't sure if I should
have just modified getBranchName and createBranch to work with Mercurial
(instead of creating new functions). This was easier for me to make sure
I didn't break the git functionality. Let me know I can merge the
functions.

Test Plan:
Tested in my www-hg repository. Probably need to test further (suggestions?)

Ran the following trials with arc patch D539987
1) the bookmark arcpatch-D539987 already existed
2) the bookmark did not exist
3) tried an invalid commit, arc patch R539987
4) --nobookmark flag (bookmark was not created, but the commit applied)
5) --nocommit flag (boomark was created, and the commit was not applied)
6) --nocommit and --nobokmark

Here's the summary of the results:
https://secure.phabricator.com/P493

Reviewers: dschleimer

Reviewed By: dschleimer

CC: aran, epriestley, phleet, bos, csilvers
Differential Revision: https://secure.phabricator.com/D3334
src/workflow/ArcanistPatchWorkflow.php