From 4b1c4238bc427f8f3e913bcd3bb5e7893436a411 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 16 Feb 2011 18:47:17 -0800 Subject: [PATCH] Fix two common points of confusion: - show "push upstream" instructions after arc amend - parse 'diffcamp revision' Summary: Test Plan: Reviewers: CC: --- .../commitmessage/ArcanistDifferentialCommitMessage.php | 3 ++- src/workflow/amend/ArcanistAmendWorkflow.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/differential/commitmessage/ArcanistDifferentialCommitMessage.php b/src/differential/commitmessage/ArcanistDifferentialCommitMessage.php index 5b45084f..728397ca 100644 --- a/src/differential/commitmessage/ArcanistDifferentialCommitMessage.php +++ b/src/differential/commitmessage/ArcanistDifferentialCommitMessage.php @@ -30,8 +30,9 @@ class ArcanistDifferentialCommitMessage { $obj = new ArcanistDifferentialCommitMessage(); $obj->rawCorpus = $corpus; + // TODO: Remove "Diffcamp" backward compatibility. $match = null; - if (preg_match('/^Differential Revision:\s*D?(\d+)/m', $corpus, $match)) { + if (preg_match('/^(?:Differential|DiffCamp) Revision:\s*D?(\d+)/im', $corpus, $match)) { $obj->revisionID = (int)$match[1]; } diff --git a/src/workflow/amend/ArcanistAmendWorkflow.php b/src/workflow/amend/ArcanistAmendWorkflow.php index afa5c605..a41f3b46 100644 --- a/src/workflow/amend/ArcanistAmendWorkflow.php +++ b/src/workflow/amend/ArcanistAmendWorkflow.php @@ -126,6 +126,10 @@ EOTEXT } } + echo phutil_console_wrap( + "You may now push this commit upstream, as appropriate (e.g. with ". + "'git push', or 'git svn dcommit', or by printing and faxing it).\n"); + return 0; }