Tiny doc patch

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tiny doc patch

Jennifer Barnabee
Mark et al -
I want to add to the docs, but before I do that, I figured I'd start with
something small and make sure I'm following the steps correctly... I'm
hoping you can check my work and answer my question about the final step...

Per what you told Ben, I went into the /nifi-docs directory and then into
the asciidoc directory and simply copy-edited the overview.adoc file.
Really minor stuff... added a few commas, fixed a few typos... nothing
major. It's already very well written and clear.

I saved the file and did 'mvn install' from the nifi-docs directory. Then,
I looked at the files in the target/generated-docs directory. It appeared
to update the overview.html file with my changes.

Then, I followed these steps that you gave Ben...

From the incubator-nifi directory (I hope that's correct...)

   - git add nifi-docs
   - git commit -m "updated docs"

//At this point, it told me:
On branch develop
Your branch is up-to-date with 'origin/develop'.

nothing to commit, working directory clean
//I'm not sure if that's what I should expect or if it means I did
something wrong...

I went ahead and did the next step:

   - git format-patch origin/develop

Per what you told Ben - that will create a patch, and I can attach the
patch to the JIRA ticket. However, I become clue-free at this point...
Where would it have created the patch and what file would I attach?

I see that these were the most recent things updated, so I'm wondering if I
want to attach one of the snapshots?

nifi-docs-0.0.1-SNAPSHOT-resources.zip
nifi-docs-0.0.1-SNAPSHOT.jar

I'm sure this is probably something obvious, but I'm missing it. Thanks for
bearing with me! :-)

When I get the hang of this, I plan to help with something real. What are
you using to customize your screenshots? I want to make sure that anything
I add is in keeping with the style you are using. Thanks.
-Jenn
Reply | Threaded
Open this post in threaded view
|

Re: Tiny doc patch

Joe Witt
Jenn,

A page with a good description of patching:
https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/

In your case it seems like a good way to make the patch would be (assuming
in your local develop branch):

git format-patch origin/develop --stdout > NIFI-XYZ.patch

Also when making your commits please consider including the ticket number
you're working on.  Believe it can be anywhere in the commit message though
at the start of it definitely works.  So for instance if you're working on
say 'NIFI-162' then you'd do your thing and make edits and then once ready
do :

git status                [this should reveal that you have changes]
git add .                 [this should then cause your changes to be primed
for commit]
git commit -m "NIFI-162 : How many widgets could a woodchuck widget if a
woodchuck could widget widgets"

Then do
git status              [now it should show you are 1 or more commits ahead
of origin/develop]

Then you should be able to make that patch

git format-patch origin/develop --stdout > NIFI-162.patch

Then you should have a file 'NIFI-162.patch' that you can attach to a JIRA
ticket.  Doing this through Github is all quite nice too in that you can
initiate pull requests which just make it a bit more straightforward
perhaps.  I don't know what the setup is like there though.

Here is a complete start to finish run-through:

[Clone a repository]
git clone http://git-wip-us.apache.org/repos/asf/incubator-nifi.git
patch-test

cd patch-test

[Checkout the 'develop' branch]
git checkout develop

[You should see something like "
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'"]

cd nifi-docs/src/main/asciidoc/

vi overview.adoc
[make some changes - for instance I'll add 'baseball' to the title]

[see if git realizes something has changed]

git status

[output will be: "
# On branch develop
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working
directory)
#
# modified:   overview.adoc
#
no changes added to commit (use "git add" and/or "git commit -a")
"]

[tell git you want to stage your change for commit]

git add .

[check what git thinks now]

git status

[and you'll see "# On branch develop
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
# modified:   overview.adoc
#
"]

[commit with a good message]

git commit -m "NIFI-162 For demonstration purposes I added -Baseball to the
title"

[you'll see "[develop 032536c] NIFI-162 For demonstration purposes I added
-Baseball to the title
 1 file changed, 3 insertions(+), 3 deletions(-)
"]

[now create the patch]

git format-patch origin/develop --stdout > NIFI-162.patch

[now you have a fille 'NIFI-162.patch' with the following content]


[

From 032536c0ba2edc0f32d2512fcbb7439522cd9a95 Mon Sep 17 00:00:00 2001
From: joewitt <[hidden email]>
Date: Sun, 4 Jan 2015 12:50:35 -0500
Subject: [PATCH] NIFI-162 For demonstration purposes I added -Baseball to
the
 title

---
 nifi-docs/src/main/asciidoc/overview.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nifi-docs/src/main/asciidoc/overview.adoc
b/nifi-docs/src/main/asciidoc/overview.adoc
index 3e32bc5..8992e5c 100644
--- a/nifi-docs/src/main/asciidoc/overview.adoc
+++ b/nifi-docs/src/main/asciidoc/overview.adoc
@@ -14,8 +14,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-Apache NiFi Overview
-====================
+Apache NiFi Overview - Baseball
+===============================

]


And you can attach that patch to the appropriate ticket.

Thanks!

Joe








Thanks
Joe

On Sun, Jan 4, 2015 at 12:07 PM, Jennifer Barnabee <
[hidden email]> wrote:

> Mark et al -
> I want to add to the docs, but before I do that, I figured I'd start with
> something small and make sure I'm following the steps correctly... I'm
> hoping you can check my work and answer my question about the final step...
>
> Per what you told Ben, I went into the /nifi-docs directory and then into
> the asciidoc directory and simply copy-edited the overview.adoc file.
> Really minor stuff... added a few commas, fixed a few typos... nothing
> major. It's already very well written and clear.
>
> I saved the file and did 'mvn install' from the nifi-docs directory. Then,
> I looked at the files in the target/generated-docs directory. It appeared
> to update the overview.html file with my changes.
>
> Then, I followed these steps that you gave Ben...
>
> From the incubator-nifi directory (I hope that's correct...)
>
>    - git add nifi-docs
>    - git commit -m "updated docs"
>
> //At this point, it told me:
> On branch develop
> Your branch is up-to-date with 'origin/develop'.
>
> nothing to commit, working directory clean
> //I'm not sure if that's what I should expect or if it means I did
> something wrong...
>
> I went ahead and did the next step:
>
>    - git format-patch origin/develop
>
> Per what you told Ben - that will create a patch, and I can attach the
> patch to the JIRA ticket. However, I become clue-free at this point...
> Where would it have created the patch and what file would I attach?
>
> I see that these were the most recent things updated, so I'm wondering if I
> want to attach one of the snapshots?
>
> nifi-docs-0.0.1-SNAPSHOT-resources.zip
> nifi-docs-0.0.1-SNAPSHOT.jar
>
> I'm sure this is probably something obvious, but I'm missing it. Thanks for
> bearing with me! :-)
>
> When I get the hang of this, I plan to help with something real. What are
> you using to customize your screenshots? I want to make sure that anything
> I add is in keeping with the style you are using. Thanks.
> -Jenn
>
Reply | Threaded
Open this post in threaded view
|

Re: Tiny doc patch

Jennifer Barnabee
Joe,
Thanks a ton. That helped a lot.

I gave it a whirl, so you'll have to let me know if the patch came through
okay on the ticket. Now, I'll feel like I can start adding to the User
Guide.
-Jenn

On Sun, Jan 4, 2015 at 12:54 PM, Joe Witt <[hidden email]> wrote:

> Jenn,
>
> A page with a good description of patching:
> https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
>
> In your case it seems like a good way to make the patch would be (assuming
> in your local develop branch):
>
> git format-patch origin/develop --stdout > NIFI-XYZ.patch
>
> Also when making your commits please consider including the ticket number
> you're working on.  Believe it can be anywhere in the commit message though
> at the start of it definitely works.  So for instance if you're working on
> say 'NIFI-162' then you'd do your thing and make edits and then once ready
> do :
>
> git status                [this should reveal that you have changes]
> git add .                 [this should then cause your changes to be primed
> for commit]
> git commit -m "NIFI-162 : How many widgets could a woodchuck widget if a
> woodchuck could widget widgets"
>
> Then do
> git status              [now it should show you are 1 or more commits ahead
> of origin/develop]
>
> Then you should be able to make that patch
>
> git format-patch origin/develop --stdout > NIFI-162.patch
>
> Then you should have a file 'NIFI-162.patch' that you can attach to a JIRA
> ticket.  Doing this through Github is all quite nice too in that you can
> initiate pull requests which just make it a bit more straightforward
> perhaps.  I don't know what the setup is like there though.
>
> Here is a complete start to finish run-through:
>
> [Clone a repository]
> git clone http://git-wip-us.apache.org/repos/asf/incubator-nifi.git
> patch-test
>
> cd patch-test
>
> [Checkout the 'develop' branch]
> git checkout develop
>
> [You should see something like "
> Branch develop set up to track remote branch develop from origin.
> Switched to a new branch 'develop'"]
>
> cd nifi-docs/src/main/asciidoc/
>
> vi overview.adoc
> [make some changes - for instance I'll add 'baseball' to the title]
>
> [see if git realizes something has changed]
>
> git status
>
> [output will be: "
> # On branch develop
> # Changes not staged for commit:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working
> directory)
> #
> # modified:   overview.adoc
> #
> no changes added to commit (use "git add" and/or "git commit -a")
> "]
>
> [tell git you want to stage your change for commit]
>
> git add .
>
> [check what git thinks now]
>
> git status
>
> [and you'll see "# On branch develop
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> # modified:   overview.adoc
> #
> "]
>
> [commit with a good message]
>
> git commit -m "NIFI-162 For demonstration purposes I added -Baseball to the
> title"
>
> [you'll see "[develop 032536c] NIFI-162 For demonstration purposes I added
> -Baseball to the title
>  1 file changed, 3 insertions(+), 3 deletions(-)
> "]
>
> [now create the patch]
>
> git format-patch origin/develop --stdout > NIFI-162.patch
>
> [now you have a fille 'NIFI-162.patch' with the following content]
>
>
> [
>
> From 032536c0ba2edc0f32d2512fcbb7439522cd9a95 Mon Sep 17 00:00:00 2001
> From: joewitt <[hidden email]>
> Date: Sun, 4 Jan 2015 12:50:35 -0500
> Subject: [PATCH] NIFI-162 For demonstration purposes I added -Baseball to
> the
>  title
>
> ---
>  nifi-docs/src/main/asciidoc/overview.adoc | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/nifi-docs/src/main/asciidoc/overview.adoc
> b/nifi-docs/src/main/asciidoc/overview.adoc
> index 3e32bc5..8992e5c 100644
> --- a/nifi-docs/src/main/asciidoc/overview.adoc
> +++ b/nifi-docs/src/main/asciidoc/overview.adoc
> @@ -14,8 +14,8 @@
>  // See the License for the specific language governing permissions and
>  // limitations under the License.
>  //
> -Apache NiFi Overview
> -====================
> +Apache NiFi Overview - Baseball
> +===============================
>
> ]
>
>
> And you can attach that patch to the appropriate ticket.
>
> Thanks!
>
> Joe
>
>
>
>
>
>
>
>
> Thanks
> Joe
>
> On Sun, Jan 4, 2015 at 12:07 PM, Jennifer Barnabee <
> [hidden email]> wrote:
>
> > Mark et al -
> > I want to add to the docs, but before I do that, I figured I'd start with
> > something small and make sure I'm following the steps correctly... I'm
> > hoping you can check my work and answer my question about the final
> step...
> >
> > Per what you told Ben, I went into the /nifi-docs directory and then into
> > the asciidoc directory and simply copy-edited the overview.adoc file.
> > Really minor stuff... added a few commas, fixed a few typos... nothing
> > major. It's already very well written and clear.
> >
> > I saved the file and did 'mvn install' from the nifi-docs directory.
> Then,
> > I looked at the files in the target/generated-docs directory. It appeared
> > to update the overview.html file with my changes.
> >
> > Then, I followed these steps that you gave Ben...
> >
> > From the incubator-nifi directory (I hope that's correct...)
> >
> >    - git add nifi-docs
> >    - git commit -m "updated docs"
> >
> > //At this point, it told me:
> > On branch develop
> > Your branch is up-to-date with 'origin/develop'.
> >
> > nothing to commit, working directory clean
> > //I'm not sure if that's what I should expect or if it means I did
> > something wrong...
> >
> > I went ahead and did the next step:
> >
> >    - git format-patch origin/develop
> >
> > Per what you told Ben - that will create a patch, and I can attach the
> > patch to the JIRA ticket. However, I become clue-free at this point...
> > Where would it have created the patch and what file would I attach?
> >
> > I see that these were the most recent things updated, so I'm wondering
> if I
> > want to attach one of the snapshots?
> >
> > nifi-docs-0.0.1-SNAPSHOT-resources.zip
> > nifi-docs-0.0.1-SNAPSHOT.jar
> >
> > I'm sure this is probably something obvious, but I'm missing it. Thanks
> for
> > bearing with me! :-)
> >
> > When I get the hang of this, I plan to help with something real. What are
> > you using to customize your screenshots? I want to make sure that
> anything
> > I add is in keeping with the style you are using. Thanks.
> > -Jenn
> >
>