]> khamidou — GitHub mirrors - arcanist.git/commit
Add "nocommit" git-only flag to arc patch workflow
authorBob Trahan <bob.trahan@gmail.com>
Tue, 17 Jan 2012 23:47:00 +0000 (15:47 -0800)
committerBob Trahan <bob.trahan@gmail.com>
Wed, 18 Jan 2012 23:25:54 +0000 (15:25 -0800)
commit51cccfd21e034a75fb178144b82ce6fce3cae961
tree1770c8c768092de7bec379dd6bfe5eeca2b50db8
parent293b91d6b5bb16503fd654076713b0929baac3d6
Add "nocommit" git-only flag to arc patch workflow

Summary:
without "nocommit" we commit the patch to the working copy. add the nocommit
flag and this commit does not happen.

making this happen required adding revisionID to arc bundle to fetch the proper
commit message.  if we can't get a commit message -- suppose the fetch fails or
the source is self::SOURCE_PATCH, we ask the user for the commit message on the
command line

Test Plan:
git reset --hard <SOME_REV>
arc patch DX, where this got us to <SOME_REV + 1>
observe correct patch committed with correct commit message in working copy

git reset --hard <SOME_REV>
arc patch --nocommit DX, where this got us to <SOME_REV + 1>
observe correct patch landed BUT NOT committed.  note "commit message" does not
exist since there isn't a commit...!

git diff HEAD^1 > ~/file.patch
git reset --hard HEAD^1
arc patch --patch ~/file.patch
observe prompted for commit message and patch committed with commit message i
typed in

Reviewers: epriestley

Reviewed By: epriestley

CC: aran
Maniphest Tasks: T479

Differential Revision: https://secure.phabricator.com/D1450
src/parser/bundle/ArcanistBundle.php
src/workflow/base/ArcanistBaseWorkflow.php
src/workflow/export/ArcanistExportWorkflow.php
src/workflow/patch/ArcanistPatchWorkflow.php
src/workflow/patch/__init__.php