You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/02 04:39:18 UTC

svn commit: r1728036 - in /brooklyn/site/v/0.9.0-SNAPSHOT: dev/code/submodules.html misc/javadoc/overview-summary.html

Author: heneveld
Date: Tue Feb  2 03:39:18 2016
New Revision: 1728036

URL: http://svn.apache.org/viewvc?rev=1728036&view=rev
Log:
Update Brooklyn website

Modified:
    brooklyn/site/v/0.9.0-SNAPSHOT/dev/code/submodules.html
    brooklyn/site/v/0.9.0-SNAPSHOT/misc/javadoc/overview-summary.html

Modified: brooklyn/site/v/0.9.0-SNAPSHOT/dev/code/submodules.html
URL: http://svn.apache.org/viewvc/brooklyn/site/v/0.9.0-SNAPSHOT/dev/code/submodules.html?rev=1728036&r1=1728035&r2=1728036&view=diff
==============================================================================
--- brooklyn/site/v/0.9.0-SNAPSHOT/dev/code/submodules.html (original)
+++ brooklyn/site/v/0.9.0-SNAPSHOT/dev/code/submodules.html Tue Feb  2 03:39:18 2016
@@ -389,40 +389,50 @@ and fetch set up to get pull-request bra
 
 <p>Assuming you’ve checked out from the Apache GitHub repos 
 following <a href="index.html">the standard instructions</a>
-(such that that repo is the <code>origin</code> remote and you don’t have any forks in your GitHub account – 
-if you do you should probably delete them as their upstream is likely to be wrong!),
+(such that that repo is the <code>origin</code> remote),
 then you can use the following script to automatically do the fork at GitHub and modify your locally-defined remote repos:</p>
 
-<div class="highlight"><pre><code class="language-bash" data-lang="bash">hub fork
-<span class="c"># the above triggers a fork at GitHub and then does a git remote rename of origin to upstream </span>
-<span class="c"># and a git add origin pointing to your fork</span>
-
-<span class="c"># configure upstream so pushes go to origin</span>
-git remote <span class="nb">set</span>-url --push upstream <span class="k">$(</span>git remote -v <span class="p">|</span> grep origin <span class="p">|</span> grep push <span class="p">|</span> awk <span class="s1">&#39;{print $2}&#39;</span><span class="k">)</span>
-<span class="c"># and configure master branch to pull/push against &quot;upstream&quot;, i.e. pull from apache/ and push to your repo</span>
-git checkout master <span class="o">&amp;&amp;</span> git branch --set-upstream-to upstream/master
-
-<span class="c"># configure git to fetch pull-request branches</span>
-git config --local --add remote.upstream.fetch <span class="s1">&#39;+refs/pull/*/head:refs/remotes/upstream/pr/*&#39;</span>
-
-<span class="c"># configure the apache-git remote as the canonical Apache git server (not GitHub)</span>
-git remote add apache-git https://git-wip-us.apache.org/repos/asf/brooklyn
-
-<span class="k">for</span> x in brooklyn-* <span class="p">;</span> <span class="k">do</span>
-  <span class="c"># repeat the above for each subproject</span>
-  <span class="nb">pushd</span> <span class="nv">$x</span>
-  hub fork
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">GITHUB_ID</span><span class="o">=</span>YOUR_ID_HERE
+
+<span class="k">for</span> DIR in . brooklyn-* <span class="p">;</span> <span class="k">do</span>
+  <span class="nb">pushd</span> <span class="nv">$DIR</span>
+  <span class="nv">PROJ</span><span class="o">=</span><span class="k">$(</span>basename <span class="k">$(</span><span class="nb">pwd</span><span class="k">))</span>
+  <span class="nb">echo </span>adding repos <span class="k">for</span> <span class="nv">$PROJ</span>
+
+  <span class="k">if</span> curl --fail https://github.com/<span class="k">${</span><span class="nv">GITHUB_ID</span><span class="k">}</span>/<span class="k">${</span><span class="nv">PROJ</span><span class="k">}</span> &gt; /dev/null 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="p">;</span> <span class="k">then</span>
+    <span class="c"># fork exists; rename locally and add fork as origin</span>
+    git remote rename origin upstream <span class="o">&amp;&amp;</span> git remote add origin git@github.com:<span class="k">${</span><span class="nv">GITHUB_ID</span><span class="k">}</span>/<span class="k">${</span><span class="nv">PROJ</span><span class="k">}</span>
+  <span class="k">else</span>
+    <span class="c"># fork does not exist; create it. this will also do the rename and new remote add as origin</span>
+    hub fork
+  <span class="k">fi</span>
+  git fetch origin
+  git fetch upstream
+
+  <span class="c"># configure upstream so pushes go to origin</span>
   git remote <span class="nb">set</span>-url --push upstream <span class="k">$(</span>git remote -v <span class="p">|</span> grep origin <span class="p">|</span> grep push <span class="p">|</span> awk <span class="s1">&#39;{print $2}&#39;</span><span class="k">)</span>
+  <span class="c"># and configure master branch to pull/push against &quot;upstream&quot;, i.e. pull from apache/ and push to your repo</span>
   git checkout master <span class="o">&amp;&amp;</span> git branch --set-upstream-to upstream/master
+
+  <span class="c"># configure git to fetch pull-request branches</span>
   git config --local --add remote.upstream.fetch <span class="s1">&#39;+refs/pull/*/head:refs/remotes/upstream/pr/*&#39;</span>
-  git remote add apache-git https://git-wip-us.apache.org/repos/asf/<span class="nv">$x</span>
+
+  <span class="c"># configure the apache-git remote as the canonical Apache git server (not GitHub)</span>
+  git remote add apache-git https://git-wip-us.apache.org/repos/asf/<span class="k">${</span><span class="nv">PROJ</span><span class="k">}</span>
+
+  <span class="c"># and if you want your id as an org set up the same as origin</span>
+  git remote add <span class="k">${</span><span class="nv">GITHUB_ID</span><span class="k">}</span> git@github.com:<span class="k">${</span><span class="nv">GITHUB_ID</span><span class="k">}</span>/<span class="k">${</span><span class="nv">PROJ</span><span class="k">}</span>
+
   <span class="nb">popd</span>
 <span class="k">done</span></code></pre></div>
 
 <p>This requires the command-line tool <code>hub</code> <a href="https://github.com/github/hub">from github</a> (or <code>sudo npm install -g hub</code>), 
 run in the directory of the uber-project checked out earlier.</p>
 
-<p>You should then be able pull and update from upstream, push to origin, and create pull requests in each sub-project.</p>
+<p>You should then be able pull and update from upstream, push to origin, and create pull requests in each sub-project.
+To check it, run <code>git remote -v &amp;&amp; git submodule foreach "git remote -v"</code>.</p>
+
+<h2 id="multi-project-changes">Multi-Project Changes</h2>
 
 <p>Cross-project changes will require multiple PRs: 
 try to minimise these, especially where one depends on another,
@@ -433,7 +443,7 @@ in the dependent PR to help reviewers
 
 <p>For information on reviewing and committing PRs, see <a href="/developers/committers/merging-contributed-code.html">the committer’s guide</a>.</p>
 
-<h2 id="things-you-should-know">Things You Should Know</h2>
+<h2 id="other-things-you-should-know">Other Things You Should Know</h2>
 
 <p>Our submodules track <strong>branches</strong>, rather than specific commits,
 although due to the way <code>git</code> works there are still references to specific commits.</p>
@@ -484,18 +494,45 @@ very quickly become stale on <code>maste
 
 <h3 id="useful-aliases">Useful Aliases</h3>
 
-<div class="highlight"><pre><code class="language-bash" data-lang="bash">git config --global alias.sup <span class="s1">&#39;submodule update --remote --merge --recursive&#39;</span>
-git config --global alias.sdiff <span class="s1">&#39;!git diff &amp;&amp; git submodule foreach &quot;git diff&quot;&#39;</span></code></pre></div>
+<p>This sets up variants of <code>pull</code>, <code>diff</code>, and <code>push</code> – called <code>sup</code>, <code>sdiff</code>, and <code>spush</code> – which act across submodules:</p>
+
+<div class="highlight"><pre><code class="language-bash" data-lang="bash">git config --global alias.sup <span class="s1">&#39;!git pull &amp;&amp; git submodule update --remote --merge --recursive&#39;</span>
+git config --global alias.sdiff <span class="s1">&#39;!git diff &amp;&amp; git submodule foreach &quot;git diff&quot;&#39;</span>
+git config --global alias.spush <span class="s1">&#39;!git push &amp;&amp; git submodule foreach &quot;git push&quot;&#39;</span></code></pre></div>
 
 <h3 id="getting-a-summary-of-submodules">Getting a Summary of Submodules</h3>
 
-<p>In addition, the <code>git-summary</code> script <a href="">here</a> makes working with submodules much more enjoyable,
+<p>The <code>git-summary</code> script <a href="https://gist.githubusercontent.com/ahgittin/6399a29df1229a37b092">here</a> makes working with submodules much more enjoyable,
 simply install and use <code>git ss</code> in the uber-project to see the status of each submodule:</p>
 
-<div class="highlight"><pre><code class="language-bash" data-lang="bash">curl https://gist.githubusercontent.com/ahgittin/6399a29df1229a37b092/raw/05f99aa95a5e8eb541bb79c6707324e26fc0f579/git-summary.sh <span class="se">\</span>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash">curl https://gist.githubusercontent.com/ahgittin/6399a29df1229a37b092/raw/208cf4b3ec2ede77297d2f6011821ae62cf9ac0c/git-summary.sh <span class="se">\</span>
   <span class="p">|</span> sudo tee /usr/local/bin/git-summary
 sudo chmod <span class="m">755</span> /usr/local/bin/git-summary  
-git config --global alias.ss <span class="s1">&#39;!git-summary ; echo ; git submodule foreach --quiet &quot;git summary&quot;&#39;</span></code></pre></div>
+git config --global alias.ss <span class="s1">&#39;!git-summary -r&#39;</span>
+git config --global alias.so <span class="s1">&#39;!git-summary -r -o&#39;</span></code></pre></div>
+
+<p>You’ll get output such as:</p>
+
+<div class="highlight"><pre><code class="language-bash" data-lang="bash">brooklyn: master &lt;- upstream/master <span class="o">(</span>up to date<span class="o">)</span>
+
+brooklyn-client: master &lt;- upstream/master <span class="o">(</span>up to date<span class="o">)</span>
+
+brooklyn-dist: master &lt;- upstream/master <span class="o">(</span>up to date<span class="o">)</span>
+
+brooklyn-docs: master &lt;- upstream/master <span class="o">(</span>uncommitted changes only<span class="o">)</span>
+  M guide/dev/code/submodules.md
+
+brooklyn-library: master &lt;- upstream/master <span class="o">(</span>up to date<span class="o">)</span>
+
+brooklyn-server: master &lt;- upstream/master <span class="o">(</span>up to date<span class="o">)</span>
+
+brooklyn-ui: <span class="nb">test</span> &lt;- origin/test <span class="o">(</span>upstream <span class="m">2</span> ahead of master<span class="o">)</span>
+  &gt; 62c553e Alex Heneveld, <span class="m">18</span> minutes ago: WIP 2
+  &gt; 22cd0ad Alex Heneveld, <span class="m">62</span> minutes ago: WIP 1
+ ?? wip-local-untracked-file</code></pre></div>
+
+<p>If you want it to run fast, or you’re offline, you can use <code>git so</code> to run in off-line mode.
+Run <code>git-summary --help</code> for more information.</p>
 
 <h3 id="other-handy-commands">Other Handy Commands</h3>
 

Modified: brooklyn/site/v/0.9.0-SNAPSHOT/misc/javadoc/overview-summary.html
URL: http://svn.apache.org/viewvc/brooklyn/site/v/0.9.0-SNAPSHOT/misc/javadoc/overview-summary.html?rev=1728036&r1=1728035&r2=1728036&view=diff
==============================================================================
--- brooklyn/site/v/0.9.0-SNAPSHOT/misc/javadoc/overview-summary.html (original)
+++ brooklyn/site/v/0.9.0-SNAPSHOT/misc/javadoc/overview-summary.html Tue Feb  2 03:39:18 2016
@@ -1152,7 +1152,7 @@ Javadoc for <a href="http://brooklyn.io"
 
 <p>
 <!-- BROOKLYN_VERSION_BELOW -->
-This is the Javadoc for v 0.9.0-SNAPSHOT (git SHA1 hash 4e4aed4b5a47772b18d0d047858f796685a27c4e) auto-generated on 2016-02-02.
+This is the Javadoc for v 0.9.0-SNAPSHOT (git SHA1 hash 1ff81617170ebdb3b922535891588c84152b90c2) auto-generated on 2016-02-02.
 </p></div>
 </div>
 </div>