hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11937) Update patch submission guidelines to stop using --no-prefix
Date Thu, 11 Sep 2014 17:27:34 GMT

    [ https://issues.apache.org/jira/browse/HBASE-11937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14130336#comment-14130336
] 

stack commented on HBASE-11937:
-------------------------------

[~busbey] I tried git apply with a patch that starts out like this:

{code}
kalashnikov:hbase.git.commit stack$ head HBASE-11619.patch
diff --git hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
index 3ad7fd4..1fc6b22 100644
--- hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
+++ hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java
@@ -34,7 +34,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.NavigableSet;
-import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
...
{code}


and got ...

kalashnikov:hbase.git.commit stack$ git apply --check HBASE-11619.patch
error: src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogSplit.java: No such
file or directory

git patch -p0 worked.

What am I doing wrong (trying to follow above instruction)

> Update patch submission guidelines to stop using --no-prefix
> ------------------------------------------------------------
>
>                 Key: HBASE-11937
>                 URL: https://issues.apache.org/jira/browse/HBASE-11937
>             Project: HBase
>          Issue Type: Improvement
>          Components: documentation
>            Reporter: Sean Busbey
>            Priority: Minor
>
> Right now the submission guidelines include the use of --no-prefix in the Methods to
Create Patches section:
> {quote}
> Git
> git format-patch is preferred because it preserves commit messages. Use git squash first,
to combine smaller commits into a single larger one.
> * git format-patch --no-prefix origin/master --stdout > HBASE-XXXX.patch
> * git diff --no-prefix origin/master > HBASE-XXXX.patch
> {quote}
> The use of --no-prefix means that users of {{git apply}} and {{git am}} have to know
to specify {{-p0}} and (which strips 0 levels of prefix). Both of those tools default to stripping
the 1 level of prefix git makes by default.
> The guide for HBase committers section on reviewing doesn't give any suggestions on how
to apply patches from contributors. It should probably give examples for using {{git am}}
and {{git apply}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message