You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/18 00:12:46 UTC

[01/50] git commit: Merge pull request #137 from bosqueviejo/master

Updated Branches:
  refs/heads/import [created] ad1da88a0


Merge pull request #137 from bosqueviejo/master

let vm.args and sys.config as optional

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/4dfdd726
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/4dfdd726
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/4dfdd726

Branch: refs/heads/import
Commit: 4dfdd726ada0cfc2015a6d6574976f6082ce4777
Parents: d5ca068 3732662
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 07:05:06 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 07:05:06 2013 -0700

----------------------------------------------------------------------
 src/rebar_upgrade.erl | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[14/50] git commit: Make update-deps honor apps= and skip_apps=

Posted by da...@apache.org.
Make update-deps honor apps= and skip_apps=

Because rebar_core handles skipping apps, we had to specialcase the
handling in the case of update-deps because it has to do its own dep
handling. The way this was done is not particularly clean, but there
currently does not exist another way for a command to signal rebar_core
that it doesn't want rebar_core to pay attention to skip_apps.

With this change, however, you can update-deps even with local
conflicting changes/commits by simply skipping the deps you don't wish
to update, or whitelisting he ones you do wish to update.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/d9aa65f1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/d9aa65f1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/d9aa65f1

Branch: refs/heads/import
Commit: d9aa65f118839f2ea76bbdace71166bad705423b
Parents: f46e7b2
Author: Andrew Thompson <an...@hijacked.us>
Authored: Mon Sep 23 15:19:51 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Mon Sep 23 15:19:51 2013 -0400

----------------------------------------------------------------------
 src/rebar_core.erl |  7 +++++++
 src/rebar_deps.erl | 15 ++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d9aa65f1/src/rebar_core.erl
----------------------------------------------------------------------
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 863d1d5..42e106e 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -163,6 +163,13 @@ skip_or_process_dir({_, ModuleSetFile}=ModuleSet, Config, CurrentCodePath,
 skip_or_process_dir1(AppFile, ModuleSet, Config, CurrentCodePath,
                      Dir, Command, DirSet) ->
     case rebar_app_utils:is_skipped_app(Config, AppFile) of
+        {Config1, {true, _SkippedApp}} when Command == 'update-deps' ->
+            %% update-deps does its own app skipping. Unfortunately there's no
+            %% way to signal this to rebar_core, so we have to explicitly do it
+            %% here... Otherwise if you use app=, it'll skip the toplevel
+            %% directory and nothing will be updated.
+             process_dir1(Dir, Command, DirSet, Config1,
+                         CurrentCodePath, ModuleSet);
         {Config1, {true, SkippedApp}} ->
             ?DEBUG("Skipping app: ~p~n", [SkippedApp]),
             Config2 = increment_operations(Config1),

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d9aa65f1/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 4a98ddf..40000ad 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -600,7 +600,10 @@ update_deps_int(Config0, UDD) ->
 
     %% Update each dep
     UpdatedDeps = [update_source(Config1, D)
-                   || D <- Deps, D#dep.source =/= undefined, not lists:member(D, UDD)],
+                   || D <- Deps, D#dep.source =/= undefined,
+                      not lists:member(D, UDD),
+                      not should_skip_update_dep(Config1, D)
+                  ],
 
     lists:foldl(fun(Dep, {Config, Updated}) ->
                         {true, AppDir} = get_deps_dir(Config, Dep#dep.app),
@@ -629,6 +632,16 @@ update_deps_int(Config0, UDD) ->
                 end, {Config1, lists:umerge(lists:sort(UpdatedDeps),
                                             lists:sort(UDD))}, UpdatedDeps).
 
+should_skip_update_dep(Config, Dep) ->
+    {true, AppDir} = get_deps_dir(Config, Dep#dep.app),
+    {true, AppFile} = rebar_app_utils:is_app_dir(AppDir),
+    case rebar_app_utils:is_skipped_app(Config, AppFile) of
+        {_Config, {true, _SkippedApp}} ->
+            true;
+        _ ->
+            false
+    end.
+
 %% Recursively walk the deps and build a list of them.
 collect_deps(Dir, C) ->
     case file:set_cwd(Dir) of


[38/50] git commit: rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)

Posted by da...@apache.org.
rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/37310820
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/37310820
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/37310820

Branch: refs/heads/import
Commit: 37310820f7d1c74b8eab14760f0f8ee67734323d
Parents: 988c9cd
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Tue Nov 26 21:15:04 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Tue Nov 26 21:15:04 2013 +0100

----------------------------------------------------------------------
 src/rebar_core.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/37310820/src/rebar_core.erl
----------------------------------------------------------------------
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 55778b7..631cef2 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -411,7 +411,7 @@ restore_code_path(no_change) ->
 restore_code_path({added, Paths}) ->
     %% Verify that all of the paths still exist -- some dynamically
     %% added paths can get blown away during clean.
-    [code:del_path(F) || F <- Paths, erl_prim_loader_is_file(F)],
+    _ = [code:del_path(F) || F <- Paths, erl_prim_loader_is_file(F)],
     ok.
 
 erl_prim_loader_is_file(File) ->


[28/50] git commit: Merge pull request #166 from mdaguete/no_runner_script_var

Posted by da...@apache.org.
Merge pull request #166 from mdaguete/no_runner_script_var

Init RUNNER_SCRIPT var in simplenode.runner

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/bef82867
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/bef82867
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/bef82867

Branch: refs/heads/import
Commit: bef82867067985332598e5b1d4f17f3426552acd
Parents: ed88055 e1d218f
Author: Jared Morrow <ja...@basho.com>
Authored: Mon Nov 18 21:08:32 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Mon Nov 18 21:08:32 2013 -0800

----------------------------------------------------------------------
 priv/templates/simplenode.runner | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------



[10/50] git commit: CONTRIBUTING: apply stylistic change suggested by dizzyd

Posted by da...@apache.org.
CONTRIBUTING: apply stylistic change suggested by dizzyd


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/6fa51996
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/6fa51996
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/6fa51996

Branch: refs/heads/import
Commit: 6fa5199643917dbd337e761f18b94327dd030bfa
Parents: 7224728
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Fri Sep 20 22:38:49 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Fri Sep 20 22:42:00 2013 +0200

----------------------------------------------------------------------
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/6fa51996/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9aeccb5..30693d8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,7 +1,7 @@
 Contributing to rebar
 ---------------------
 
-Before implementing a new feature, you should submit a ticket for discussion on your plans.  
+Before implementing a new feature, please submit a ticket to discuss your plans.  
 The feature might have been rejected already, or the implementation might already be decided.
 
 See [Community and Resources](README.md#community-and-resources).


[34/50] git commit: Add missing dep examples and fix existing ones

Posted by da...@apache.org.
Add missing dep examples and fix existing ones


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/d7cef6b4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/d7cef6b4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/d7cef6b4

Branch: refs/heads/import
Commit: d7cef6b4c14419718eff5c11dd5b4e0d5de2d042
Parents: 988c9cd
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Sun Nov 24 15:36:54 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Tue Nov 26 20:30:16 2013 +0100

----------------------------------------------------------------------
 rebar.config.sample | 25 +++++++++++++++++++------
 src/rebar_deps.erl  | 28 +++++++++++++++++++++-------
 2 files changed, 40 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d7cef6b4/rebar.config.sample
----------------------------------------------------------------------
diff --git a/rebar.config.sample b/rebar.config.sample
index 97b5a02..e6071bd 100644
--- a/rebar.config.sample
+++ b/rebar.config.sample
@@ -152,11 +152,17 @@
 %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
 %% an application name, a version and the SCM details on how to fetch it (SCM
 %% type, location and revision).
-%% Rebar currently supports git, hg, bzr, svn, and rsync.
-{deps, [application_name,
-        {application_name, "1.0.*"},
-        {application_name, "1.0.*",
+%% Rebar currently supports git, hg, bzr, svn, rsync, and fossil.
+{deps, [app_name,
+        {rebar, "1.0.*"},
+        {rebar, ".*",
+         {git, "git://github.com/rebar/rebar.git"}},
+        {rebar, ".*",
+         {git, "git://github.com/rebar/rebar.git", "Rev"}},
+        {rebar, "1.0.*",
          {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
+        {rebar, "1.0.0",
+         {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
         %% Dependencies can be marked as 'raw'. Rebar does not require
         %% such dependencies to have a standard Erlang/OTP layout
         %% which assumes the presence of either
@@ -170,9 +176,16 @@
         %% Only a subset of rebar commands will be executed on the
         %% 'raw' subdirectories: get-deps, update-deps, check-deps,
         %% list-deps and delete-deps.
-        {application_name, "",
+        {rebar, "",
          {git, "git://github.com/rebar/rebar.git", {branch, "master"}},
-         [raw]}]}.
+         [raw]},
+        {app_name, ".*", {hg, "https://www.example.org/url"}},
+        {app_name, ".*", {rsync, "Url"}},
+        {app_name, ".*", {svn, "https://www.example.org/url"}},
+        {app_name, ".*", {svn, "svn://svn.example.org/url"}},
+        {app_name, ".*", {bzr, "https://www.example.org/url", "Rev"}},
+        {app_name, ".*", {fossil, "https://www.example.org/url"}},
+        {app_name, ".*", {fossil, "https://www.example.org/url", "Vsn"}}]}.
 
 %% == Subdirectories ==
 

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d7cef6b4/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 9911841..82716c5 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -257,13 +257,27 @@ info_help(Description) ->
        [
         Description,
         {deps_dir, "deps"},
-        {deps, [application_name,
-                {application_name, "1.0.*"},
-                {application_name, "1.0.*",
-                 {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
-                {application_name, "",
-                 {git, "git://github.com/rebar/rebar.git", {branch, "master"}},
-                 [raw]}]}
+        {deps,
+         [app_name,
+          {rebar, "1.0.*"},
+          {rebar, ".*",
+           {git, "git://github.com/rebar/rebar.git"}},
+          {rebar, ".*",
+           {git, "git://github.com/rebar/rebar.git", "Rev"}},
+          {rebar, "1.0.*",
+           {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
+          {rebar, "1.0.0",
+           {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
+          {rebar, "",
+           {git, "git://github.com/rebar/rebar.git", {branch, "master"}},
+           [raw]},
+          {app_name, ".*", {hg, "https://www.example.org/url"}},
+          {app_name, ".*", {rsync, "Url"}},
+          {app_name, ".*", {svn, "https://www.example.org/url"}},
+          {app_name, ".*", {svn, "svn://svn.example.org/url"}},
+          {app_name, ".*", {bzr, "https://www.example.org/url", "Rev"}},
+          {app_name, ".*", {fossil, "https://www.example.org/url"}},
+          {app_name, ".*", {fossil, "https://www.example.org/url", "Vsn"}}]}
        ]).
 
 %% Added because of trans deps,


[21/50] git commit: rebar_deps: 'depowner' has to be stored in xconf

Posted by da...@apache.org.
rebar_deps: 'depowner' has to be stored in xconf


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/95910c77
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/95910c77
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/95910c77

Branch: refs/heads/import
Commit: 95910c776410dc99bc09c7ad40d94465f1ce1d62
Parents: 6518b5f
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Oct 16 12:49:06 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Oct 16 12:51:22 2013 +0200

----------------------------------------------------------------------
 src/rebar_deps.erl | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/95910c77/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 22ffa4f..442a782 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -183,8 +183,9 @@ do_check_deps(Config) ->
     {ok, save_dep_dirs(Config2, lists:reverse(PulledDeps))}.
 
 'update-deps'(Config, _) ->
-    {Config2, UpdatedDeps} = update_deps_int(rebar_config:set(Config, depowner, dict:new()), []),
-    DepOwners = rebar_config:get(Config2, depowner, dict:new()),
+    Config1 = rebar_config:set_xconf(Config, depowner, dict:new()),
+    {Config2, UpdatedDeps} = update_deps_int(Config1, []),
+    DepOwners = rebar_config:get_xconf(Config2, depowner, dict:new()),
 
     %% check for conflicting deps
     _ = [?ERROR("Conflicting dependencies for ~p: ~p~n",
@@ -620,11 +621,12 @@ update_deps_int(Config0, UDD) ->
                         ok = file:set_cwd(AppDir),
                         Config3 = rebar_config:new(Config2),
                         %% track where a dep comes from...
-                        Config4 = rebar_config:set(Config3, depowner,
-                                                   dict:append(Dep, ConfDir,
-                                                               rebar_config:get(Config3,
-                                                                                depowner,
-                                                                                dict:new()))),
+                        DepOwner = dict:append(
+                                     Dep, ConfDir,
+                                     rebar_config:get_xconf(Config3, depowner,
+                                                            dict:new())),
+                        Config4 = rebar_config:set_xconf(Config3, depowner,
+                                                         DepOwner),
 
                         {Config5, Res} = update_deps_int(Config4, Updated),
                         {Config5, lists:umerge(lists:sort(Res),


[24/50] git commit: Fix update-deps with certain forms of the {tag, ...} type

Posted by da...@apache.org.
Fix update-deps with certain forms of the {tag, ...} type

Sometimes tags like 1.1-3-g3af5478 or d20b53f0 are encountered. The
first is the output of 'git describe', and the second is just a regular
git SHA. git fetch --tags will not pull these down, so do a full git
fetch instead.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/01df43e5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/01df43e5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/01df43e5

Branch: refs/heads/import
Commit: 01df43e58adbb3885a530eda098231ff4c957064
Parents: ed88055
Author: Andrew Thompson <an...@hijacked.us>
Authored: Tue Oct 15 17:37:40 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Wed Oct 16 12:43:01 2013 -0400

----------------------------------------------------------------------
 src/rebar_deps.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/01df43e5/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 5e4f482..5e69709 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -564,7 +564,7 @@ update_source1(AppDir, {git, _Url, {branch, Branch}}) ->
     rebar_utils:sh(?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]), ShOpts);
 update_source1(AppDir, {git, _Url, {tag, Tag}}) ->
     ShOpts = [{cd, AppDir}],
-    rebar_utils:sh("git fetch --tags origin", ShOpts),
+    rebar_utils:sh("git fetch origin", ShOpts),
     rebar_utils:sh(?FMT("git checkout -q ~s", [Tag]), ShOpts);
 update_source1(AppDir, {git, _Url, Refspec}) ->
     ShOpts = [{cd, AppDir}],


[35/50] git commit: Fix false reporting of (plain) vsn strings

Posted by da...@apache.org.
Fix false reporting of (plain) vsn strings

rebar used to mistakenly report plain version strings like
{vsn, "1.0.0"} as follows:
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: "1.0.0"

Properly detect unknown/unsupported version terms and abort
if we encounter one.

While at it, rename a variable in vcs_vsn/3 to be non-misleading.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/edef0962
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/edef0962
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/edef0962

Branch: refs/heads/import
Commit: edef0962d2030d462b7ebb150fa387e77ecc86c8
Parents: 988c9cd
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Sun Nov 24 17:37:59 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Tue Nov 26 20:33:34 2013 +0100

----------------------------------------------------------------------
 src/rebar_utils.erl | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/edef0962/src/rebar_utils.erl
----------------------------------------------------------------------
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 4a74661..618427f 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -200,12 +200,12 @@ expand_env_variable(InStr, VarName, RawVarValue) ->
             re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts)
     end.
 
-vcs_vsn(Config, Vcs, Dir) ->
-    Key = {Vcs, Dir},
+vcs_vsn(Config, Vsn, Dir) ->
+    Key = {Vsn, Dir},
     Cache = rebar_config:get_xconf(Config, vsn_cache),
     case dict:find(Key, Cache) of
         error ->
-            VsnString = vcs_vsn_1(Vcs, Dir),
+            VsnString = vcs_vsn_1(Vsn, Dir),
             Cache1 = dict:store(Key, VsnString, Cache),
             Config1 = rebar_config:set_xconf(Config, vsn_cache, Cache1),
             {Config1, VsnString};
@@ -441,11 +441,12 @@ emulate_escript_foldl(Fun, Acc, File) ->
 
 vcs_vsn_1(Vcs, Dir) ->
     case vcs_vsn_cmd(Vcs) of
-        {unknown, VsnString} ->
-            ?DEBUG("vcs_vsn: Unknown VCS atom in vsn field: ~p\n", [Vcs]),
+        {plain, VsnString} ->
             VsnString;
         {cmd, CmdString} ->
             vcs_vsn_invoke(CmdString, Dir);
+        unknown ->
+            ?ABORT("vcs_vsn: Unknown vsn format: ~p\n", [Vcs]);
         Cmd ->
             %% If there is a valid VCS directory in the application directory,
             %% use that version info
@@ -478,7 +479,8 @@ vcs_vsn_cmd(bzr)    -> "bzr revno";
 vcs_vsn_cmd(svn)    -> "svnversion";
 vcs_vsn_cmd(fossil) -> "fossil info";
 vcs_vsn_cmd({cmd, _Cmd}=Custom) -> Custom;
-vcs_vsn_cmd(Version) -> {unknown, Version}.
+vcs_vsn_cmd(Version) when is_list(Version) -> {plain, Version};
+vcs_vsn_cmd(_) -> unknown.
 
 vcs_vsn_invoke(Cmd, Dir) ->
     {ok, VsnString} = rebar_utils:sh(Cmd, [{cd, Dir}, {use_stdout, false}]),


[30/50] git commit: Merge pull request #154 from Vagabond/adt-update-tags

Posted by da...@apache.org.
Merge pull request #154 from Vagabond/adt-update-tags

Fix update-deps with certain forms of the {tag, ...} type

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/05f81eca
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/05f81eca
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/05f81eca

Branch: refs/heads/import
Commit: 05f81eca8a297fe2cb67a4a2696c8f5c36187452
Parents: 8b7f544 01df43e
Author: Jared Morrow <ja...@basho.com>
Authored: Fri Nov 22 13:42:54 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Fri Nov 22 13:42:54 2013 -0800

----------------------------------------------------------------------
 src/rebar_deps.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[33/50] git commit: deps: remove undocumented fossil syntax

Posted by da...@apache.org.
deps: remove undocumented fossil syntax

As discussed with Martin Schut, remove support for
{app_name, "vsn", {fossil, "url", latest}.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/79903b9e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/79903b9e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/79903b9e

Branch: refs/heads/import
Commit: 79903b9eebe1c227a66d70329952e84a834467e9
Parents: d7cef6b
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Tue Nov 26 20:16:35 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Tue Nov 26 20:30:16 2013 +0100

----------------------------------------------------------------------
 src/rebar_deps.erl | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/79903b9e/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 82716c5..2e305d5 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -546,8 +546,6 @@ download_source(AppDir, {rsync, Url}) ->
     rebar_utils:sh(?FMT("rsync -az --delete ~s/ ~s", [Url, AppDir]), []);
 download_source(AppDir, {fossil, Url}) ->
     download_source(AppDir, {fossil, Url, ""});
-download_source(AppDir, {fossil, Url, latest}) ->
-    download_source(AppDir, {fossil, Url, ""});
 download_source(AppDir, {fossil, Url, Version}) ->
     Repository = filename:join(AppDir, filename:basename(AppDir) ++ ".fossil"),
     ok = filelib:ensure_dir(Repository),
@@ -603,8 +601,6 @@ update_source1(AppDir, {rsync, Url}) ->
     rebar_utils:sh(?FMT("rsync -az --delete ~s/ ~s",[Url,AppDir]),[]);
 update_source1(AppDir, {fossil, Url}) ->
     update_source1(AppDir, {fossil, Url, ""});
-update_source1(AppDir, {fossil, Url, latest}) ->
-    update_source1(AppDir, {fossil, Url, ""});
 update_source1(AppDir, {fossil, _Url, Version}) ->
     ok = file:set_cwd(AppDir),
     rebar_utils:sh("fossil pull", [{cd, AppDir}]),


[42/50] git commit: Merge pull request #172 from tuncer/dep-examples

Posted by da...@apache.org.
Merge pull request #172 from tuncer/dep-examples

Add missing dep examples and fix existing ones

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/cedb8891
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/cedb8891
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/cedb8891

Branch: refs/heads/import
Commit: cedb889137b37363bc2ae5a4fbc866b73ce473b2
Parents: 7e81b22 79903b9
Author: Jared Morrow <ja...@basho.com>
Authored: Tue Dec 3 13:04:16 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Tue Dec 3 13:04:16 2013 -0800

----------------------------------------------------------------------
 rebar.config.sample | 25 +++++++++++++++++++------
 src/rebar_deps.erl  | 32 +++++++++++++++++++++-----------
 2 files changed, 40 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[39/50] git commit: Delete unused inttest/retest binary

Posted by da...@apache.org.
Delete unused inttest/retest binary


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/08a87bb5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/08a87bb5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/08a87bb5

Branch: refs/heads/import
Commit: 08a87bb5bd3b7e3d1f4e79d1b3451e3cc0aa25ca
Parents: 988c9cd
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Nov 27 17:05:12 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Nov 27 17:05:12 2013 +0100

----------------------------------------------------------------------
 inttest/retest | Bin 16957 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/08a87bb5/inttest/retest
----------------------------------------------------------------------
diff --git a/inttest/retest b/inttest/retest
deleted file mode 100755
index 4e14bde..0000000
Binary files a/inttest/retest and /dev/null differ


[40/50] git commit: Merge pull request #177 from tuncer/unused-retest-binary

Posted by da...@apache.org.
Merge pull request #177 from tuncer/unused-retest-binary

Delete unused inttest/retest binary

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/30531b6d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/30531b6d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/30531b6d

Branch: refs/heads/import
Commit: 30531b6d1b960ad01fb3c857489ffa494112893b
Parents: 988c9cd 08a87bb
Author: Jared Morrow <ja...@basho.com>
Authored: Wed Nov 27 08:43:36 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Wed Nov 27 08:43:36 2013 -0800

----------------------------------------------------------------------
 inttest/retest | Bin 16957 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------



[41/50] git commit: Merge pull request #152 from tuncer/test-erl_opts

Posted by da...@apache.org.
Merge pull request #152 from tuncer/test-erl_opts

Fix erl_opts use

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/7e81b222
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/7e81b222
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/7e81b222

Branch: refs/heads/import
Commit: 7e81b222187d49866d8b3b3e0e1f4959dfa625d6
Parents: 30531b6 55d1539
Author: Jared Morrow <ja...@basho.com>
Authored: Tue Dec 3 13:02:58 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Tue Dec 3 13:02:58 2013 -0800

----------------------------------------------------------------------
 src/rebar_erlc_compiler.erl | 6 +++---
 src/rebar_lfe_compiler.erl  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[25/50] git commit: Don't over-aggressively clean the code path in the presence of lib_dir directives

Posted by da...@apache.org.
Don't over-aggressively clean the code path in the presence of lib_dir directives

Rebar, when it encounters a lib_dir directive, caches the current code
path, adds the libdir(s) and returns the cached copy of the path. When
rebar has finished processing that directory, it restores the cached
path. This is problematic in the below scenario:

        /(lib_dir)->G
  A -> B -> C -> D -> E
   \-> F -> D -> E

When rebar is finished processing B, it restores the code path to what
it was before it processed B, removing C, D, E and G from the code path.
This means when it comes to process F, neither D or E are in the code
path, so any header includes, rebar plugins or parse transforms will not
be in the code path. Without the lib_dir directive, rebar does no code
path cleanups, so everything works fine.

This change makes rebar only remove the explicit lib_dir code paths it
added and adds an inttest that replicates the above scenario.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/d983beaf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/d983beaf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/d983beaf

Branch: refs/heads/import
Commit: d983beafe93a0f58272d3351f12329984541878f
Parents: ed88055
Author: Andrew Thompson <an...@hijacked.us>
Authored: Wed Oct 16 19:48:00 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Wed Oct 16 19:58:02 2013 -0400

----------------------------------------------------------------------
 inttest/tdeps3/a.erl             |  3 ++
 inttest/tdeps3/a.rebar.config    |  4 ++
 inttest/tdeps3/b.hrl             |  1 +
 inttest/tdeps3/b.rebar.config    |  5 ++
 inttest/tdeps3/c.hrl             |  1 +
 inttest/tdeps3/c.rebar.config    |  1 +
 inttest/tdeps3/d.hrl             |  1 +
 inttest/tdeps3/d.rebar.config    |  1 +
 inttest/tdeps3/e.hrl             |  1 +
 inttest/tdeps3/f.hrl             |  1 +
 inttest/tdeps3/root.rebar.config |  1 +
 inttest/tdeps3/tdeps3_rt.erl     | 89 +++++++++++++++++++++++++++++++++++
 src/rebar_core.erl               |  9 ++--
 13 files changed, 114 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/a.erl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/a.erl b/inttest/tdeps3/a.erl
new file mode 100644
index 0000000..5a387eb
--- /dev/null
+++ b/inttest/tdeps3/a.erl
@@ -0,0 +1,3 @@
+-module({{module}}).
+
+-include_lib("{{dep}}/include/{{dep}}.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/a.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/a.rebar.config b/inttest/tdeps3/a.rebar.config
new file mode 100644
index 0000000..19b8ef8
--- /dev/null
+++ b/inttest/tdeps3/a.rebar.config
@@ -0,0 +1,4 @@
+{deps, [
+	{b, "1", {git, "../repo/b"}},
+	{f, "1", {git, "../repo/f"}}
+]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/b.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/b.hrl b/inttest/tdeps3/b.hrl
new file mode 100644
index 0000000..efbeab1
--- /dev/null
+++ b/inttest/tdeps3/b.hrl
@@ -0,0 +1 @@
+-include_lib("c/include/c.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/b.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/b.rebar.config b/inttest/tdeps3/b.rebar.config
new file mode 100644
index 0000000..d1ccae2
--- /dev/null
+++ b/inttest/tdeps3/b.rebar.config
@@ -0,0 +1,5 @@
+{deps, [
+	{c, "1", {git, "../repo/c"}}
+]}.
+
+{lib_dirs, [apps]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/c.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/c.hrl b/inttest/tdeps3/c.hrl
new file mode 100644
index 0000000..cc87fff
--- /dev/null
+++ b/inttest/tdeps3/c.hrl
@@ -0,0 +1 @@
+-include_lib("d/include/d.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/c.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/c.rebar.config b/inttest/tdeps3/c.rebar.config
new file mode 100644
index 0000000..b590771
--- /dev/null
+++ b/inttest/tdeps3/c.rebar.config
@@ -0,0 +1 @@
+{deps, [{d, "1", {git, "../repo/d"}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/d.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/d.hrl b/inttest/tdeps3/d.hrl
new file mode 100644
index 0000000..02f8088
--- /dev/null
+++ b/inttest/tdeps3/d.hrl
@@ -0,0 +1 @@
+-include_lib("e/include/e.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/d.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/d.rebar.config b/inttest/tdeps3/d.rebar.config
new file mode 100644
index 0000000..4c7cd54
--- /dev/null
+++ b/inttest/tdeps3/d.rebar.config
@@ -0,0 +1 @@
+{deps, [{e, "1", {git, "../repo/e"}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/e.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/e.hrl b/inttest/tdeps3/e.hrl
new file mode 100644
index 0000000..9f02fab
--- /dev/null
+++ b/inttest/tdeps3/e.hrl
@@ -0,0 +1 @@
+-define(HELLO, hello).

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/f.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/f.hrl b/inttest/tdeps3/f.hrl
new file mode 100644
index 0000000..02f8088
--- /dev/null
+++ b/inttest/tdeps3/f.hrl
@@ -0,0 +1 @@
+-include_lib("e/include/e.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/root.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/root.rebar.config b/inttest/tdeps3/root.rebar.config
new file mode 100644
index 0000000..d1c3793
--- /dev/null
+++ b/inttest/tdeps3/root.rebar.config
@@ -0,0 +1 @@
+{sub_dirs, ["apps/a"]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/inttest/tdeps3/tdeps3_rt.erl
----------------------------------------------------------------------
diff --git a/inttest/tdeps3/tdeps3_rt.erl b/inttest/tdeps3/tdeps3_rt.erl
new file mode 100644
index 0000000..da87d43
--- /dev/null
+++ b/inttest/tdeps3/tdeps3_rt.erl
@@ -0,0 +1,89 @@
+-module(tdeps3_rt).
+
+-compile(export_all).
+
+%% Exercise transitive dependencies where there are multiple files
+%% depending on the same set of deps as well as lib_dir directives
+%% A -> B -> C -> D -> E
+%%      |--> G(via lib_dir)
+%% |--> F -> D -> E
+
+files() ->
+    [
+     %% A1 application
+     {create, "ebin/a.app", app(a, [a])},
+     {template, "a.erl", "src/a.erl", dict:from_list([{module, a}, {dep, b}])},
+
+     {copy, "a.rebar.config", "rebar.config"},
+     {copy, "../../rebar", "rebar"},
+
+     %% B application
+     {create, "repo/b/ebin/b.app", app(b, [b])},
+     {template, "a.erl", "repo/b/src/b.erl", dict:from_list([{module, b}, {dep, b}])},
+     {copy, "b.rebar.config", "repo/b/rebar.config"},
+     {copy, "b.hrl", "repo/b/include/b.hrl"},
+
+     %% C application
+     {create, "repo/c/ebin/c.app", app(c, [c])},
+     {template, "a.erl", "repo/c/src/c.erl", dict:from_list([{module, c}, {dep, d}])},
+     {copy, "c.rebar.config", "repo/c/rebar.config"},
+     {copy, "c.hrl", "repo/c/include/c.hrl"},
+
+     %% D application
+     {create, "repo/d/ebin/d.app", app(d, [d])},
+     {template, "a.erl", "repo/d/src/d.erl", dict:from_list([{module, d}, {dep, e}])},
+     {copy, "d.rebar.config", "repo/d/rebar.config"},
+     {copy, "d.hrl", "repo/d/include/d.hrl"},
+
+     %% E application
+     {create, "repo/e/ebin/e.app", app(e, [])},
+     {copy, "e.hrl", "repo/e/include/e.hrl"},
+
+
+     %% F application
+     {create, "repo/f/ebin/f.app", app(f, [f])},
+     {template, "a.erl", "repo/f/src/f.erl", dict:from_list([{module, f}, {dep, d}])},
+     {copy, "c.rebar.config", "repo/f/rebar.config"},
+     {copy, "f.hrl", "repo/f/include/f.hrl"},
+
+     %% G application, which is part of the B repo, in a lib_dir
+     {create, "repo/b/apps/g/ebin/g.app", app(g, [])},
+     {copy, "e.hrl", "repo/b/apps/g/include/g.hrl"}
+
+    ].
+
+apply_cmds([], _Params) ->
+    ok;
+apply_cmds([Cmd | Rest], Params) ->
+    io:format("Running: ~s (~p)\n", [Cmd, Params]),
+    {ok, _} = retest_sh:run(Cmd, Params),
+    apply_cmds(Rest, Params).
+
+run(_Dir) ->
+    %% Initialize the b/c apps as git repos so that dependencies pull
+    %% properly
+    GitCmds = ["git init",
+               "git add -A",
+               "git config user.email 'tdeps@example.com'",
+               "git config user.name 'tdeps'",
+               "git commit -a -m 'Initial Commit'"],
+    ok = apply_cmds(GitCmds, [{dir, "repo/b"}]),
+    ok = apply_cmds(GitCmds, [{dir, "repo/c"}]),
+    ok = apply_cmds(GitCmds, [{dir, "repo/d"}]),
+    ok = apply_cmds(GitCmds, [{dir, "repo/e"}]),
+    ok = apply_cmds(GitCmds, [{dir, "repo/f"}]),
+
+    {ok, _} = retest_sh:run("./rebar -v get-deps compile", []),
+    ok.
+
+%%
+%% Generate the contents of a simple .app file
+%%
+app(Name, Modules) ->
+    App = {application, Name,
+           [{description, atom_to_list(Name)},
+            {vsn, "1"},
+            {modules, Modules},
+            {registered, []},
+            {applications, [kernel, stdlib]}]},
+    io_lib:format("~p.\n", [App]).

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d983beaf/src/rebar_core.erl
----------------------------------------------------------------------
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 4d50f4f..2e0768e 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -399,18 +399,19 @@ update_code_path(Config) ->
         [] ->
             no_change;
         Paths ->
-            OldPath = code:get_path(),
             LibPaths = expand_lib_dirs(Paths, rebar_utils:get_cwd(), []),
             ok = code:add_pathsa(LibPaths),
-            {old, OldPath}
+            %% track just the paths we added, so we can remove them without
+            %% removing other paths added by this dep
+            {added, LibPaths}
     end.
 
 restore_code_path(no_change) ->
     ok;
-restore_code_path({old, Path}) ->
+restore_code_path({added, Paths}) ->
     %% Verify that all of the paths still exist -- some dynamically
     %% added paths can get blown away during clean.
-    true = code:set_path([F || F <- Path, erl_prim_loader_is_file(F)]),
+    [true = code:del_path(F) || F <- Paths, erl_prim_loader_is_file(F)],
     ok.
 
 erl_prim_loader_is_file(File) ->


[44/50] git commit: Merge pull request #174 from tuncer/dialyzer-fixes

Posted by da...@apache.org.
Merge pull request #174 from tuncer/dialyzer-fixes

rebar_core: fix Dialyzer warning introduced in aa46d85 (#157)

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/c02fcec9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/c02fcec9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/c02fcec9

Branch: refs/heads/import
Commit: c02fcec92c19b8c184a09a9f367fe919222e96fb
Parents: dac4f92 3731082
Author: Jared Morrow <ja...@basho.com>
Authored: Tue Dec 3 13:10:05 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Tue Dec 3 13:10:05 2013 -0800

----------------------------------------------------------------------
 src/rebar_core.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[22/50] git commit: rebar_deps: fix overly long lines

Posted by da...@apache.org.
rebar_deps: fix overly long lines


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/d49ac036
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/d49ac036
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/d49ac036

Branch: refs/heads/import
Commit: d49ac036278883f16c170042b80a745e0119bf39
Parents: 95910c7
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Oct 16 12:54:06 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Oct 16 13:21:51 2013 +0200

----------------------------------------------------------------------
 src/rebar_deps.erl | 89 +++++++++++++++++++++++++++----------------------
 1 file changed, 50 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/d49ac036/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 442a782..39510da 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -78,37 +78,43 @@ preprocess(Config, _) ->
             %% any other calls to preprocess() for update-deps beyond the
             %% toplevel directory. They aren't actually harmful, but they slow
             %% things down unnecessarily.
-            NewConfig = lists:foldl(fun(D, Acc) ->
-                                             rebar_config:set_skip_dir(Acc, D#dep.dir)
-                                     end, Config3, collect_deps(rebar_utils:get_cwd(), Config3)),
+            NewConfig = lists:foldl(
+                          fun(D, Acc) ->
+                                  rebar_config:set_skip_dir(Acc, D#dep.dir)
+                          end,
+                          Config3,
+                          collect_deps(rebar_utils:get_cwd(), Config3)),
             %% Return the empty list, as we don't want anything processed before
             %% us.
             {ok, NewConfig, []};
         _ ->
-            %% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
-            %% the current command doesn't run on the dep dir. However, pre/postprocess
-            %% WILL run (and we want it to) for transitivity purposes.
+            %% If skip_deps=true, mark each dep dir as a skip_dir w/ the core
+            %% so that the current command doesn't run on the dep dir.
+            %% However, pre/postprocess WILL run (and we want it to) for
+            %% transitivity purposes.
             %%
             %% Also, if skip_deps=comma,separated,app,list, then only the given
             %% dependencies are skipped.
-            NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
-                "true" ->
-                    lists:foldl(
-                        fun(#dep{dir = Dir}, C) ->
-                                rebar_config:set_skip_dir(C, Dir)
-                        end, Config3, AvailableDeps);
-                Apps when is_list(Apps) ->
-                    SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")],
-                    lists:foldl(
-                        fun(#dep{dir = Dir, app = App}, C) ->
-                                case lists:member(App, SkipApps) of
-                                    true -> rebar_config:set_skip_dir(C, Dir);
-                                    false -> C
-                                end
-                        end, Config3, AvailableDeps);
-                _ ->
-                    Config3
-            end,
+            NewConfig =
+                case rebar_config:get_global(Config3, skip_deps, false) of
+                    "true" ->
+                        lists:foldl(
+                          fun(#dep{dir = Dir}, C) ->
+                                  rebar_config:set_skip_dir(C, Dir)
+                          end, Config3, AvailableDeps);
+                    Apps when is_list(Apps) ->
+                        SkipApps = [list_to_atom(App) ||
+                                       App <- string:tokens(Apps, ",")],
+                        lists:foldl(
+                          fun(#dep{dir = Dir, app = App}, C) ->
+                                  case lists:member(App, SkipApps) of
+                                      true -> rebar_config:set_skip_dir(C, Dir);
+                                      false -> C
+                                  end
+                          end, Config3, AvailableDeps);
+                    _ ->
+                        Config3
+                end,
 
             %% Return all the available dep directories for process
             {ok, NewConfig, dep_dirs(NonRawAvailableDeps)}
@@ -440,7 +446,8 @@ is_app_available(Config, App, VsnRegex, Path, _IsRaw = false) ->
             {Config, {false, {missing_app_file, Path}}}
     end;
 is_app_available(Config, App, _VsnRegex, Path, _IsRaw = true) ->
-    ?DEBUG("is_app_available, looking for Raw Depencency ~p with Path ~p~n", [App, Path]),
+    ?DEBUG("is_app_available, looking for Raw Depencency ~p with Path ~p~n",
+           [App, Path]),
     case filelib:is_dir(Path) of
         true ->
             %% TODO: look for version string in <Path>/VERSION file? Not clear
@@ -463,8 +470,8 @@ use_source(Config, Dep, Count) ->
     case filelib:is_dir(Dep#dep.dir) of
         true ->
             %% Already downloaded -- verify the versioning matches the regex
-            case is_app_available(Config, Dep#dep.app,
-                                  Dep#dep.vsn_regex, Dep#dep.dir, Dep#dep.is_raw) of
+            case is_app_available(Config, Dep#dep.app, Dep#dep.vsn_regex,
+                                  Dep#dep.dir, Dep#dep.is_raw) of
                 {Config1, {true, _}} ->
                     Dir = filename:join(Dep#dep.dir, "ebin"),
                     ok = filelib:ensure_dir(filename:join(Dir, "dummy")),
@@ -562,7 +569,8 @@ update_source1(AppDir, {git, _Url, {branch, Branch}}) ->
     ShOpts = [{cd, AppDir}],
     rebar_utils:sh("git fetch origin", ShOpts),
     rebar_utils:sh(?FMT("git checkout -q ~s", [Branch]), ShOpts),
-    rebar_utils:sh(?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]), ShOpts);
+    rebar_utils:sh(
+      ?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]),ShOpts);
 update_source1(AppDir, {git, _Url, {tag, Tag}}) ->
     ShOpts = [{cd, AppDir}],
     rebar_utils:sh("git fetch --tags origin", ShOpts),
@@ -608,16 +616,18 @@ update_deps_int(Config0, UDD) ->
 
     lists:foldl(fun(Dep, {Config, Updated}) ->
                         {true, AppDir} = get_deps_dir(Config, Dep#dep.app),
-                        Config2 = case has_vcs_dir(element(1, Dep#dep.source), AppDir) of
-                            false ->
-                                %% If the dep did not exist (maybe it was added)
-                                %% clone it. We'll traverse ITS deps below. and
-                                %% clone them if needed.
-                                {C1, _D1} = use_source(Config, Dep),
-                                C1;
-                            true ->
-                                Config
-                        end,
+                        Config2 = case has_vcs_dir(element(1, Dep#dep.source),
+                                                   AppDir) of
+                                      false ->
+                                          %% If the dep did not exist (maybe it
+                                          %% was added), clone it.
+                                          %% We'll traverse ITS deps below and
+                                          %% clone them if needed.
+                                          {C1, _D1} = use_source(Config, Dep),
+                                          C1;
+                                      true ->
+                                          Config
+                                  end,
                         ok = file:set_cwd(AppDir),
                         Config3 = rebar_config:new(Config2),
                         %% track where a dep comes from...
@@ -657,7 +667,8 @@ collect_deps(Dir, C) ->
             {Config1, Deps} = find_deps(Config, read, RawDeps),
 
             lists:flatten(Deps ++ [begin
-                                       {true, AppDir} = get_deps_dir(Config1, Dep#dep.app),
+                                       {true, AppDir} = get_deps_dir(
+                                                          Config1, Dep#dep.app),
                                        collect_deps(AppDir, C)
                                    end || Dep <- Deps]);
         _ ->


[32/50] git commit: Merge pull request #155 from tuncer/fixes

Posted by da...@apache.org.
Merge pull request #155 from tuncer/fixes

Fixes for #137 and #142

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/988c9cd5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/988c9cd5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/988c9cd5

Branch: refs/heads/import
Commit: 988c9cd574538d279193f548297d80ad3b0a45d0
Parents: 9a158d3 dfba6dd
Author: Jared Morrow <ja...@basho.com>
Authored: Tue Nov 26 06:18:30 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Tue Nov 26 06:18:30 2013 -0800

----------------------------------------------------------------------
 src/rebar_core.erl    |   2 +-
 src/rebar_deps.erl    | 125 +++++++++++++++++++++++++--------------------
 src/rebar_upgrade.erl |  27 +++++-----
 3 files changed, 84 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/988c9cd5/src/rebar_core.erl
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/988c9cd5/src/rebar_deps.erl
----------------------------------------------------------------------
diff --cc src/rebar_deps.erl
index 5e69709,39510da..9911841
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@@ -561,10 -569,11 +569,11 @@@ update_source1(AppDir, {git, _Url, {bra
      ShOpts = [{cd, AppDir}],
      rebar_utils:sh("git fetch origin", ShOpts),
      rebar_utils:sh(?FMT("git checkout -q ~s", [Branch]), ShOpts),
-     rebar_utils:sh(?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]), ShOpts);
+     rebar_utils:sh(
+       ?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]),ShOpts);
  update_source1(AppDir, {git, _Url, {tag, Tag}}) ->
      ShOpts = [{cd, AppDir}],
 -    rebar_utils:sh("git fetch --tags origin", ShOpts),
 +    rebar_utils:sh("git fetch origin", ShOpts),
      rebar_utils:sh(?FMT("git checkout -q ~s", [Tag]), ShOpts);
  update_source1(AppDir, {git, _Url, Refspec}) ->
      ShOpts = [{cd, AppDir}],


[11/50] git commit: Merge pull request #145 from tuncer/contributing-minor-fix

Posted by da...@apache.org.
Merge pull request #145 from tuncer/contributing-minor-fix

CONTRIBUTING: apply stylistic change suggested by dizzyd

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/179ed48f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/179ed48f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/179ed48f

Branch: refs/heads/import
Commit: 179ed48f5b5262005dd4c8f0cf5730fc0e01afcd
Parents: 7224728 6fa5199
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 13:55:11 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 13:55:11 2013 -0700

----------------------------------------------------------------------
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[48/50] git commit: Merge pull request #179 from tuncer/commands-list

Posted by da...@apache.org.
Merge pull request #179 from tuncer/commands-list

Make list of commands (for unabbreviation) easier to maintain

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/74e69fae
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/74e69fae
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/74e69fae

Branch: refs/heads/import
Commit: 74e69faebeb76d0796c3ce7d543beb73db145f5f
Parents: 745b14d 6fe3b82
Author: Jared Morrow <ja...@basho.com>
Authored: Wed Dec 4 12:12:27 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Wed Dec 4 12:12:27 2013 -0800

----------------------------------------------------------------------
 src/rebar.erl | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------



[19/50] git commit: 'current_command' has to be stored in xconf

Posted by da...@apache.org.
'current_command' has to be stored in xconf


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/348d13b0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/348d13b0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/348d13b0

Branch: refs/heads/import
Commit: 348d13b064723f790aa0d96f99eb87c58776619a
Parents: ed88055
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Oct 16 12:29:54 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Oct 16 12:29:54 2013 +0200

----------------------------------------------------------------------
 src/rebar_core.erl | 2 +-
 src/rebar_deps.erl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/348d13b0/src/rebar_core.erl
----------------------------------------------------------------------
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 4d50f4f..43f7c5c 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -181,7 +181,7 @@ skip_or_process_dir1(AppFile, ModuleSet, Config, CurrentCodePath,
 
 process_dir1(Dir, Command, DirSet, Config, CurrentCodePath,
              {DirModules, ModuleSetFile}) ->
-    Config0 = rebar_config:set(Config, current_command, Command),
+    Config0 = rebar_config:set_xconf(Config, current_command, Command),
     %% Get the list of modules for "any dir". This is a catch-all list
     %% of modules that are processed in addition to modules associated
     %% with this directory type. These any_dir modules are processed

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/348d13b0/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 5e4f482..b57ce5d 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -72,7 +72,7 @@ preprocess(Config, _) ->
     %% deps-related can be executed on their directories.
     NonRawAvailableDeps = [D || D <- AvailableDeps, not D#dep.is_raw],
 
-    case rebar_config:get(Config, current_command, undefined) of
+    case rebar_config:get_xconf(Config, current_command, undefined) of
         'update-deps' ->
             %% Skip ALL of the dep folders, we do this because we don't want
             %% any other calls to preprocess() for update-deps beyond the


[12/50] git commit: Ignore skip_deps during update-deps as it has no meaning

Posted by da...@apache.org.
Ignore skip_deps during update-deps as it has no meaning


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/0977d583
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/0977d583
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/0977d583

Branch: refs/heads/import
Commit: 0977d58361d54c170cf45254d7b53e1cd03024e7
Parents: cb4599f
Author: Andrew Thompson <an...@hijacked.us>
Authored: Mon Sep 23 15:11:11 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Mon Sep 23 15:11:11 2013 -0400

----------------------------------------------------------------------
 src/rebar_deps.erl | 56 ++++++++++++++++++++++++-------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/0977d583/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 82c5061..15e7594 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -68,31 +68,6 @@ preprocess(Config, _) ->
     %% Add available deps to code path
     Config3 = update_deps_code_path(Config2, AvailableDeps),
 
-    %% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
-    %% the current command doesn't run on the dep dir. However, pre/postprocess
-    %% WILL run (and we want it to) for transitivity purposes.
-    %%
-    %% Also, if skip_deps=comma,separated,app,list, then only the given
-    %% dependencies are skipped.
-    NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
-        "true" ->
-            lists:foldl(
-                fun(#dep{dir = Dir}, C) ->
-                        rebar_config:set_skip_dir(C, Dir)
-                end, Config3, AvailableDeps);
-        Apps when is_list(Apps) ->
-            SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")],
-            lists:foldl(
-                fun(#dep{dir = Dir, app = App}, C) ->
-                        case lists:member(App, SkipApps) of
-                            true -> rebar_config:set_skip_dir(C, Dir);
-                            false -> C
-                        end
-                end, Config3, AvailableDeps);
-        _ ->
-            Config3
-    end,
-
     %% Filtering out 'raw' dependencies so that no commands other than
     %% deps-related can be executed on their directories.
     NonRawAvailableDeps = [D || D <- AvailableDeps, not D#dep.is_raw],
@@ -103,13 +78,38 @@ preprocess(Config, _) ->
             %% any other calls to preprocess() for update-deps beyond the
             %% toplevel directory. They aren't actually harmful, but they slow
             %% things down unnecessarily.
-            NewConfig2 = lists:foldl(fun(D, Acc) ->
+            NewConfig = lists:foldl(fun(D, Acc) ->
                                              rebar_config:set_skip_dir(Acc, D#dep.dir)
-                                     end, NewConfig, collect_deps(rebar_utils:get_cwd(),NewConfig)),
+                                     end, Config3, collect_deps(rebar_utils:get_cwd(), Config3)),
             %% Return the empty list, as we don't want anything processed before
             %% us.
-            {ok, NewConfig2, []};
+            {ok, NewConfig, []};
         _ ->
+            %% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
+            %% the current command doesn't run on the dep dir. However, pre/postprocess
+            %% WILL run (and we want it to) for transitivity purposes.
+            %%
+            %% Also, if skip_deps=comma,separated,app,list, then only the given
+            %% dependencies are skipped.
+            NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
+                "true" ->
+                    lists:foldl(
+                        fun(#dep{dir = Dir}, C) ->
+                                rebar_config:set_skip_dir(C, Dir)
+                        end, Config3, AvailableDeps);
+                Apps when is_list(Apps) ->
+                    SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")],
+                    lists:foldl(
+                        fun(#dep{dir = Dir, app = App}, C) ->
+                                case lists:member(App, SkipApps) of
+                                    true -> rebar_config:set_skip_dir(C, Dir);
+                                    false -> C
+                                end
+                        end, Config3, AvailableDeps);
+                _ ->
+                    Config3
+            end,
+
             %% Return all the available dep directories for process
             {ok, NewConfig, dep_dirs(NonRawAvailableDeps)}
     end.


[16/50] git commit: Address review comments and add inttest for update-deps

Posted by da...@apache.org.
Address review comments and add inttest for update-deps


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/e74de95e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/e74de95e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/e74de95e

Branch: refs/heads/import
Commit: e74de95eebecae56b9278e9fda3941410678fedd
Parents: eae26a5
Author: Andrew Thompson <an...@hijacked.us>
Authored: Mon Sep 30 16:57:50 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Mon Sep 30 16:57:50 2013 -0400

----------------------------------------------------------------------
 inttest/tdeps_update/a.erl               |   3 +
 inttest/tdeps_update/a.rebar.config      |   1 +
 inttest/tdeps_update/a2.rebar.config     |   1 +
 inttest/tdeps_update/a3.rebar.config     |   1 +
 inttest/tdeps_update/a4.rebar.config     |   4 +
 inttest/tdeps_update/b.hrl               |   1 +
 inttest/tdeps_update/b.rebar.config      |   1 +
 inttest/tdeps_update/b2.rebar.config     |   1 +
 inttest/tdeps_update/b3.rebar.config     |   1 +
 inttest/tdeps_update/b4.rebar.config     |   1 +
 inttest/tdeps_update/c.hrl               |   1 +
 inttest/tdeps_update/c.rebar.config      |   1 +
 inttest/tdeps_update/c2.hrl              |   1 +
 inttest/tdeps_update/c2.rebar.config     |   4 +
 inttest/tdeps_update/c3.rebar.config     |   4 +
 inttest/tdeps_update/d.hrl               |   1 +
 inttest/tdeps_update/root.rebar.config   |   1 +
 inttest/tdeps_update/tdeps_update_rt.erl | 147 ++++++++++++++++++++++++++
 src/rebar_core.erl                       |   4 +-
 src/rebar_deps.erl                       |   2 +-
 20 files changed, 178 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/a.erl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/a.erl b/inttest/tdeps_update/a.erl
new file mode 100644
index 0000000..294ae21
--- /dev/null
+++ b/inttest/tdeps_update/a.erl
@@ -0,0 +1,3 @@
+-module({{module}}).
+
+-include_lib("b/include/b.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/a.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/a.rebar.config b/inttest/tdeps_update/a.rebar.config
new file mode 100644
index 0000000..3b721dc
--- /dev/null
+++ b/inttest/tdeps_update/a.rebar.config
@@ -0,0 +1 @@
+{deps, [{b, "0.2.3", {git, "../repo/b", {tag, "0.2.3"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/a2.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/a2.rebar.config b/inttest/tdeps_update/a2.rebar.config
new file mode 100644
index 0000000..5687349
--- /dev/null
+++ b/inttest/tdeps_update/a2.rebar.config
@@ -0,0 +1 @@
+{deps, [{b, "0.2.4", {git, "../repo/b", {tag, "0.2.4"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/a3.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/a3.rebar.config b/inttest/tdeps_update/a3.rebar.config
new file mode 100644
index 0000000..86bf462
--- /dev/null
+++ b/inttest/tdeps_update/a3.rebar.config
@@ -0,0 +1 @@
+{deps, [{b, "0.2.5", {git, "../repo/b", {tag, "0.2.5"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/a4.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/a4.rebar.config b/inttest/tdeps_update/a4.rebar.config
new file mode 100644
index 0000000..bfba813
--- /dev/null
+++ b/inttest/tdeps_update/a4.rebar.config
@@ -0,0 +1,4 @@
+{deps, [
+        {b, "0.2.6", {git, "../repo/b", {tag, "0.2.6"}}},
+        {f, "0.1", {git, "../repo/f", {tag, "0.1"}}}
+       ]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/b.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/b.hrl b/inttest/tdeps_update/b.hrl
new file mode 100644
index 0000000..efbeab1
--- /dev/null
+++ b/inttest/tdeps_update/b.hrl
@@ -0,0 +1 @@
+-include_lib("c/include/c.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/b.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/b.rebar.config b/inttest/tdeps_update/b.rebar.config
new file mode 100644
index 0000000..536aaa9
--- /dev/null
+++ b/inttest/tdeps_update/b.rebar.config
@@ -0,0 +1 @@
+{deps, [{c, "1.0", {git, "../repo/c", {tag, "1.0"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/b2.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/b2.rebar.config b/inttest/tdeps_update/b2.rebar.config
new file mode 100644
index 0000000..b603277
--- /dev/null
+++ b/inttest/tdeps_update/b2.rebar.config
@@ -0,0 +1 @@
+{deps, [{c, "1.1", {git, "../repo/c", {tag, "1.1"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/b3.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/b3.rebar.config b/inttest/tdeps_update/b3.rebar.config
new file mode 100644
index 0000000..5f4e20a
--- /dev/null
+++ b/inttest/tdeps_update/b3.rebar.config
@@ -0,0 +1 @@
+{deps, [{c, "1.2", {git, "../repo/c", {tag, "1.2"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/b4.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/b4.rebar.config b/inttest/tdeps_update/b4.rebar.config
new file mode 100644
index 0000000..5fd1dca
--- /dev/null
+++ b/inttest/tdeps_update/b4.rebar.config
@@ -0,0 +1 @@
+{deps, [{c, "1.3", {git, "../repo/c", {tag, "1.3"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/c.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/c.hrl b/inttest/tdeps_update/c.hrl
new file mode 100644
index 0000000..9f02fab
--- /dev/null
+++ b/inttest/tdeps_update/c.hrl
@@ -0,0 +1 @@
+-define(HELLO, hello).

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/c.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/c.rebar.config b/inttest/tdeps_update/c.rebar.config
new file mode 100644
index 0000000..d99b963
--- /dev/null
+++ b/inttest/tdeps_update/c.rebar.config
@@ -0,0 +1 @@
+{deps, [{d, "0.7", {git, "../repo/d", {tag, "0.7"}}}]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/c2.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/c2.hrl b/inttest/tdeps_update/c2.hrl
new file mode 100644
index 0000000..cc87fff
--- /dev/null
+++ b/inttest/tdeps_update/c2.hrl
@@ -0,0 +1 @@
+-include_lib("d/include/d.hrl").

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/c2.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/c2.rebar.config b/inttest/tdeps_update/c2.rebar.config
new file mode 100644
index 0000000..1297e07
--- /dev/null
+++ b/inttest/tdeps_update/c2.rebar.config
@@ -0,0 +1,4 @@
+{deps, [
+    {d, "0.7", {git, "../repo/d", {tag, "0.7"}}},
+    {e, "2.0", {git, "../repo/e", {tag, "2.0"}}}
+    ]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/c3.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/c3.rebar.config b/inttest/tdeps_update/c3.rebar.config
new file mode 100644
index 0000000..40c93c5
--- /dev/null
+++ b/inttest/tdeps_update/c3.rebar.config
@@ -0,0 +1,4 @@
+{deps, [
+    {d, "0.7", {git, "../repo/d", {tag, "0.7"}}},
+    {e, "2.1", {git, "../repo/e", {tag, "2.1"}}}
+    ]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/d.hrl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/d.hrl b/inttest/tdeps_update/d.hrl
new file mode 100644
index 0000000..9f02fab
--- /dev/null
+++ b/inttest/tdeps_update/d.hrl
@@ -0,0 +1 @@
+-define(HELLO, hello).

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/root.rebar.config
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/root.rebar.config b/inttest/tdeps_update/root.rebar.config
new file mode 100644
index 0000000..ea03437
--- /dev/null
+++ b/inttest/tdeps_update/root.rebar.config
@@ -0,0 +1 @@
+{sub_dirs, ["apps/a1"]}.

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/inttest/tdeps_update/tdeps_update_rt.erl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/tdeps_update_rt.erl b/inttest/tdeps_update/tdeps_update_rt.erl
new file mode 100644
index 0000000..1c03928
--- /dev/null
+++ b/inttest/tdeps_update/tdeps_update_rt.erl
@@ -0,0 +1,147 @@
+-module(tdeps_update_rt).
+
+-compile(export_all).
+
+%% Exercises update deps, with recuseive dependency updates.
+%% Initially:
+%%     A(v0.5) -> B(v0.2.3) -> C(v1.0)
+%% But after updating A to 0.6:
+%%     A(v0.6) -> B(v0.2.4) -> C(v1.1)
+%%                          -> D(v0.7)
+%% And after updating A to 0.7:
+%%     A(v0.7) -> B(v0.2.5) -> C(v1.2) -> E(v2.0)
+%%                          -> D(v0.7)
+%% And after updating A to 0.8:
+%%     A(v0.8) -> B(v0.2.6) -> C(v1.3) -> E(v2.1)
+%%                          -> D(v0.7)
+%%             -> F(v0.1)   -> E(v2.1)
+files() ->
+    [
+     %% A1 application
+     {create, "apps/a1/ebin/a1.app", app(a1, [a1], "0.5")},
+     {copy, "a.rebar.config", "apps/a1/rebar.config"},
+     {template, "a.erl", "apps/a1/src/a1.erl", dict:from_list([{module, a1}])},
+
+     {copy, "root.rebar.config", "rebar.config"},
+     {copy, "../../rebar", "rebar"},
+
+     %% B application
+     {create, "repo/b/ebin/b.app", app(b, [], "0.2.3")},
+     {create, "b2.app", app(b, [], "0.2.4")},
+     {create, "b3.app", app(b, [], "0.2.5")},
+     {create, "b4.app", app(b, [], "0.2.6")},
+     {copy, "b.rebar.config", "repo/b/rebar.config"},
+     {copy, "b.hrl", "repo/b/include/b.hrl"},
+
+     %% C application
+     {create, "repo/c/ebin/c.app", app(c, [], "1.0")},
+     {create, "c2.app", app(c, [], "1.1")},
+     {create, "c3.app", app(c, [], "1.2")},
+     {create, "c4.app", app(c, [], "1.3")},
+     {copy, "c.hrl", "repo/c/include/c.hrl"},
+
+     %% D application
+     {create, "repo/d/ebin/d.app", app(d, [], "0.7")},
+     {copy, "d.hrl", "repo/d/include/d.hrl"},
+
+     %% E application
+     {create, "repo/e/ebin/e.app", app(e, [], "2.0")},
+     {create, "e2.app", app(e, [], "2.1")},
+
+     %% F application
+     {create, "repo/f/ebin/f.app", app(f, [], "0.1")},
+
+     %% update files
+     {copy, "a2.rebar.config", "a2.rebar.config"},
+     {copy, "a3.rebar.config", "a3.rebar.config"},
+     {copy, "a4.rebar.config", "a4.rebar.config"},
+     {copy, "b2.rebar.config", "b2.rebar.config"},
+     {copy, "b3.rebar.config", "b3.rebar.config"},
+     {copy, "b4.rebar.config", "b4.rebar.config"},
+     {copy, "c2.hrl", "c2.hrl"},
+     {copy, "c.rebar.config", "c.rebar.config"},
+     {copy, "c2.rebar.config", "c2.rebar.config"},
+     {copy, "c3.rebar.config", "c3.rebar.config"}
+    ].
+
+apply_cmds([], _Params) ->
+    ok;
+apply_cmds([Cmd | Rest], Params) ->
+    io:format("Running: ~s (~p)\n", [Cmd, Params]),
+    {ok, _} = retest_sh:run(Cmd, Params),
+    apply_cmds(Rest, Params).
+
+run(_Dir) ->
+    %% Initialize the b/c/d apps as git repos so that dependencies pull
+    %% properly
+    GitCmds = ["git init",
+               "git add -A",
+               "git config user.email 'tdeps@example.com'",
+               "git config user.name 'tdeps'",
+               "git commit -a -m 'Initial Commit'"],
+    BCmds = ["git tag 0.2.3",
+             "cp ../../b2.rebar.config rebar.config",
+             "cp ../../b2.app ebin/b.app",
+             "git commit -a -m 'update to 0.2.4'",
+             "git tag 0.2.4",
+             "cp ../../b3.rebar.config rebar.config",
+             "cp ../../b3.app ebin/b.app",
+             "git commit -a -m 'update to 0.2.5'",
+             "git tag 0.2.5",
+             "cp ../../b4.rebar.config rebar.config",
+             "cp ../../b4.app ebin/b.app",
+             "git commit -a -m 'update to 0.2.6'",
+             "git tag 0.2.6"],
+             %"git checkout 0.2.3"],
+    CCmds = ["git tag 1.0",
+             "cp ../../c2.hrl include/c.hrl",
+             "cp ../../c2.app ebin/c.app",
+             "cp ../../c.rebar.config rebar.config",
+             "git add rebar.config",
+             "git commit -a -m 'update to 1.1'",
+             "git tag 1.1",
+             "cp ../../c3.app ebin/c.app",
+             "cp ../../c2.rebar.config rebar.config",
+             "git commit -a -m 'update to 1.2'",
+             "git tag 1.2",
+             "cp ../../c4.app ebin/c.app",
+             "cp ../../c3.rebar.config rebar.config",
+             "git commit -a -m 'update to 1.3'",
+             "git tag 1.3"],
+             %"git checkout 1.0"],
+    DCmds = ["git tag 0.7"],
+    ECmds = ["git tag 2.0",
+             "cp ../../e2.app ebin/e.app",
+             "git commit -a -m 'update to 2.1'",
+             "git tag 2.1"],
+    FCmds = ["git tag 0.1"],
+
+    ok = apply_cmds(GitCmds++BCmds, [{dir, "repo/b"}]),
+    ok = apply_cmds(GitCmds++CCmds, [{dir, "repo/c"}]),
+    ok = apply_cmds(GitCmds++DCmds, [{dir, "repo/d"}]),
+    ok = apply_cmds(GitCmds++ECmds, [{dir, "repo/e"}]),
+    ok = apply_cmds(GitCmds++FCmds, [{dir, "repo/f"}]),
+
+    {ok, _} = retest_sh:run("./rebar -v get-deps compile", []),
+    os:cmd("cp a2.rebar.config apps/a1/rebar.config"),
+    {ok, _} = retest_sh:run("./rebar -v update-deps", []),
+    {ok, _} = retest_sh:run("./rebar -v compile", []),
+    os:cmd("cp a3.rebar.config apps/a1/rebar.config"),
+    {ok, _} = retest_sh:run("./rebar -v update-deps", []),
+    {ok, _} = retest_sh:run("./rebar -v compile", []),
+    os:cmd("cp a4.rebar.config apps/a1/rebar.config"),
+    {ok, _} = retest_sh:run("./rebar -v update-deps", []),
+    {ok, _} = retest_sh:run("./rebar -v compile", []),
+    ok.
+
+%%
+%% Generate the contents of a simple .app file
+%%
+app(Name, Modules, Version) ->
+    App = {application, Name,
+           [{description, atom_to_list(Name)},
+            {vsn, Version},
+            {modules, Modules},
+            {registered, []},
+            {applications, [kernel, stdlib]}]},
+    io_lib:format("~p.\n", [App]).

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/src/rebar_core.erl
----------------------------------------------------------------------
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 42e106e..4d50f4f 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -168,7 +168,7 @@ skip_or_process_dir1(AppFile, ModuleSet, Config, CurrentCodePath,
             %% way to signal this to rebar_core, so we have to explicitly do it
             %% here... Otherwise if you use app=, it'll skip the toplevel
             %% directory and nothing will be updated.
-             process_dir1(Dir, Command, DirSet, Config1,
+            process_dir1(Dir, Command, DirSet, Config1,
                          CurrentCodePath, ModuleSet);
         {Config1, {true, SkippedApp}} ->
             ?DEBUG("Skipping app: ~p~n", [SkippedApp]),
@@ -181,7 +181,7 @@ skip_or_process_dir1(AppFile, ModuleSet, Config, CurrentCodePath,
 
 process_dir1(Dir, Command, DirSet, Config, CurrentCodePath,
              {DirModules, ModuleSetFile}) ->
-    Config0 = rebar_config:set(Config, command, Command),
+    Config0 = rebar_config:set(Config, current_command, Command),
     %% Get the list of modules for "any dir". This is a catch-all list
     %% of modules that are processed in addition to modules associated
     %% with this directory type. These any_dir modules are processed

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e74de95e/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 6450715..5e4f482 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -72,7 +72,7 @@ preprocess(Config, _) ->
     %% deps-related can be executed on their directories.
     NonRawAvailableDeps = [D || D <- AvailableDeps, not D#dep.is_raw],
 
-    case rebar_config:get(Config, command, undefined) of
+    case rebar_config:get(Config, current_command, undefined) of
         'update-deps' ->
             %% Skip ALL of the dep folders, we do this because we don't want
             %% any other calls to preprocess() for update-deps beyond the


[47/50] git commit: Make list of commands (for unabbreviation) easier to maintain

Posted by da...@apache.org.
Make list of commands (for unabbreviation) easier to maintain

It's easier to modify the list with each command on a separate line.
The shell completion scripts have already been modified that way.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/6fe3b82b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/6fe3b82b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/6fe3b82b

Branch: refs/heads/import
Commit: 6fe3b82b5b095740da31274cc37c82628542f5b6
Parents: 745b14d
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Thu Nov 28 22:10:03 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Dec 4 20:11:49 2013 +0100

----------------------------------------------------------------------
 src/rebar.erl | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/6fe3b82b/src/rebar.erl
----------------------------------------------------------------------
diff --git a/src/rebar.erl b/src/rebar.erl
index 1902f14..2d9fe04 100644
--- a/src/rebar.erl
+++ b/src/rebar.erl
@@ -417,11 +417,32 @@ filter_flags(Config, [Item | Rest], Commands) ->
     end.
 
 command_names() ->
-    ["check-deps", "clean", "compile", "create", "create-app", "create-node",
-     "ct", "delete-deps", "doc", "eunit", "escriptize", "generate",
-     "generate-appups", "generate-upgrade", "get-deps", "help", "list-deps",
-     "list-templates", "qc", "update-deps", "overlay", "shell", "version",
-     "xref"].
+    [
+     "check-deps",
+     "clean",
+     "compile",
+     "create",
+     "create-app",
+     "create-node",
+     "ct",
+     "delete-deps",
+     "doc",
+     "eunit",
+     "escriptize",
+     "generate",
+     "generate-appups",
+     "generate-upgrade",
+     "get-deps",
+     "help",
+     "list-deps",
+     "list-templates",
+     "qc",
+     "update-deps",
+     "overlay",
+     "shell",
+     "version",
+     "xref"
+    ].
 
 unabbreviate_command_names([]) ->
     [];


[09/50] git commit: Merge pull request #111 from tuncer/nox-erlydtl-compile

Posted by da...@apache.org.
Merge pull request #111 from tuncer/nox-erlydtl-compile

Always return the errors and warnings from erlydtl

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/72247281
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/72247281
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/72247281

Branch: refs/heads/import
Commit: 72247281a29f1e681ad09fc46a41158e131e837c
Parents: adad711 daed79f
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 13:06:02 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 13:06:02 2013 -0700

----------------------------------------------------------------------
 src/rebar_erlydtl_compiler.erl | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[17/50] git commit: Typo

Posted by da...@apache.org.
Typo


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/2b3edc27
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/2b3edc27
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/2b3edc27

Branch: refs/heads/import
Commit: 2b3edc27010b5e5d4313a51789f6488280d76699
Parents: e74de95
Author: Andrew Thompson <an...@hijacked.us>
Authored: Mon Oct 14 13:44:05 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Mon Oct 14 13:44:05 2013 -0400

----------------------------------------------------------------------
 inttest/tdeps_update/tdeps_update_rt.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/2b3edc27/inttest/tdeps_update/tdeps_update_rt.erl
----------------------------------------------------------------------
diff --git a/inttest/tdeps_update/tdeps_update_rt.erl b/inttest/tdeps_update/tdeps_update_rt.erl
index 1c03928..81bb7ef 100644
--- a/inttest/tdeps_update/tdeps_update_rt.erl
+++ b/inttest/tdeps_update/tdeps_update_rt.erl
@@ -2,7 +2,7 @@
 
 -compile(export_all).
 
-%% Exercises update deps, with recuseive dependency updates.
+%% Exercises update deps, with recursive dependency updates.
 %% Initially:
 %%     A(v0.5) -> B(v0.2.3) -> C(v1.0)
 %% But after updating A to 0.6:


[31/50] git commit: Merge pull request #157 from Vagabond/adt-lib-dir

Posted by da...@apache.org.
Merge pull request #157 from Vagabond/adt-lib-dir

Don't over-aggressively clean the code path in the presence of lib_dir directives

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/9a158d37
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/9a158d37
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/9a158d37

Branch: refs/heads/import
Commit: 9a158d37fca07006c20222e5651a64fb7ddd6d01
Parents: 05f81ec aa46d85
Author: Jared Morrow <ja...@basho.com>
Authored: Fri Nov 22 14:17:21 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Fri Nov 22 14:17:21 2013 -0800

----------------------------------------------------------------------
 inttest/tdeps3/a.erl             |  3 ++
 inttest/tdeps3/a.rebar.config    |  4 ++
 inttest/tdeps3/b.hrl             |  1 +
 inttest/tdeps3/b.rebar.config    |  5 ++
 inttest/tdeps3/c.hrl             |  1 +
 inttest/tdeps3/c.rebar.config    |  1 +
 inttest/tdeps3/d.hrl             |  1 +
 inttest/tdeps3/d.rebar.config    |  1 +
 inttest/tdeps3/e.hrl             |  1 +
 inttest/tdeps3/f.hrl             |  1 +
 inttest/tdeps3/root.rebar.config |  1 +
 inttest/tdeps3/tdeps3_rt.erl     | 89 +++++++++++++++++++++++++++++++++++
 src/rebar_core.erl               |  9 ++--
 13 files changed, 114 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[50/50] git commit: Merge pull request #189 from tuncer/rgen1_timeout

Posted by da...@apache.org.
Merge pull request #189 from tuncer/rgen1_timeout

inttest/rgen1: increase retest timeout (30s -> 60s)

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/ad1da88a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/ad1da88a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/ad1da88a

Branch: refs/heads/import
Commit: ad1da88a07a207bf6974d0fca7db4c5ac3bb51d0
Parents: 74e69fa a3430a8
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Dec 6 10:03:12 2013 -0800
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Dec 6 10:03:12 2013 -0800

----------------------------------------------------------------------
 inttest/rgen1/retest.config | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------



[06/50] git commit: Always return the errors and warnings from erlydtl

Posted by da...@apache.org.
Always return the errors and warnings from erlydtl

This allows us to use `rebar_base_compiler:ok_tuple/3` and
`rebar_base_compiler:error_tuple/5` when returning from
`rebar_erlydtl_compiler`.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/daed79f6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/daed79f6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/daed79f6

Branch: refs/heads/import
Commit: daed79f62925c0e4dd71f812f2283873a2720b91
Parents: e840ac2
Author: Anthony Ramine <n....@gmail.com>
Authored: Sat Dec 8 11:25:29 2012 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Fri Sep 20 20:54:54 2013 +0200

----------------------------------------------------------------------
 src/rebar_erlydtl_compiler.erl | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/daed79f6/src/rebar_erlydtl_compiler.erl
----------------------------------------------------------------------
diff --git a/src/rebar_erlydtl_compiler.erl b/src/rebar_erlydtl_compiler.erl
index 4449be6..6172879 100644
--- a/src/rebar_erlydtl_compiler.erl
+++ b/src/rebar_erlydtl_compiler.erl
@@ -116,8 +116,8 @@ compile(Config, _AppFile) ->
                                      option(source_ext, DtlOpts),
                                      option(out_dir, DtlOpts),
                                      option(module_ext, DtlOpts) ++ ".beam",
-                                     fun(S, T, _C) ->
-                                        compile_dtl(S, T, DtlOpts)
+                                     fun(S, T, C) ->
+                                        compile_dtl(C, S, T, DtlOpts)
                                      end,
                                      [{check_last_mod, false},
                                       {recursive, option(recursive, DtlOpts)}])
@@ -169,10 +169,10 @@ default(out_dir)  -> "ebin";
 default(source_ext) -> ".dtl";
 default(module_ext) -> "_dtl";
 default(custom_tags_dir) -> "";
-default(compiler_options) -> [report, return];
+default(compiler_options) -> [return];
 default(recursive) -> true.
 
-compile_dtl(Source, Target, DtlOpts) ->
+compile_dtl(Config, Source, Target, DtlOpts) ->
     case code:which(erlydtl) of
         non_existing ->
             ?ERROR("~n===============================================~n"
@@ -185,13 +185,13 @@ compile_dtl(Source, Target, DtlOpts) ->
         _ ->
             case needs_compile(Source, Target, DtlOpts) of
                 true ->
-                    do_compile(Source, Target, DtlOpts);
+                    do_compile(Config, Source, Target, DtlOpts);
                 false ->
                     skipped
             end
     end.
 
-do_compile(Source, Target, DtlOpts) ->
+do_compile(Config, Source, Target, DtlOpts) ->
     %% TODO: Check last mod on target and referenced DTLs here..
 
     %% ensure that doc_root and out_dir are defined,
@@ -208,19 +208,17 @@ do_compile(Source, Target, DtlOpts) ->
     case erlydtl:compile(Source,
                          module_name(Target),
                          Opts) of
-        ok -> ok;
-        {error, {File, [{Pos, _Mod, Err}]}} ->
-            ?ERROR("Compiling template ~p failed:~n    (~s): ~p~n",
-                [File, err_location(Pos), Err]);
-        Reason ->
-            ?ERROR("Compiling template ~s failed:~n  ~p~n",
-                   [Source, Reason]),
-            ?FAIL
+        ok ->
+            ok;
+        error ->
+            rebar_base_compiler:error_tuple(Config, Source, [], [], Opts);
+        {error, {_File, _Msgs} = Error} ->
+            rebar_base_compiler:error_tuple(Config, Source, [Error], [], Opts);
+        {error, Msg} ->
+            Es = [{Source, [{erlydtl_parser, Msg}]}],
+            rebar_base_compiler:error_tuple(Config, Source, Es, [], Opts)
     end.
 
-err_location({L,C}) -> io_lib:format("line:~w, col:~w", [L, C]);
-err_location(L)     -> io_lib:format("line:~w", [L]).
-
 module_name(Target) ->
     F = filename:basename(Target),
     string:substr(F, 1, length(F)-length(".beam")).


[03/50] git commit: Merge pull request #125 from lucafavatella/neotoma-doc-typo

Posted by da...@apache.org.
Merge pull request #125 from lucafavatella/neotoma-doc-typo

Fix typo in neotoma help message

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/e840ac21
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/e840ac21
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/e840ac21

Branch: refs/heads/import
Commit: e840ac211280b26ec0795960c15744fe8b17affb
Parents: d19a466 7bee2c0
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 07:26:11 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 07:26:11 2013 -0700

----------------------------------------------------------------------
 src/rebar_neotoma_compiler.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[20/50] git commit: rebar_deps: fix Dialyzer warning

Posted by da...@apache.org.
rebar_deps: fix Dialyzer warning


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/6518b5f5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/6518b5f5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/6518b5f5

Branch: refs/heads/import
Commit: 6518b5f541905f566ae37a00318a2cad4b75aa2c
Parents: 348d13b
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Oct 16 12:36:32 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Oct 16 12:36:32 2013 +0200

----------------------------------------------------------------------
 src/rebar_deps.erl | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/6518b5f5/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index b57ce5d..22ffa4f 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -187,15 +187,15 @@ do_check_deps(Config) ->
     DepOwners = rebar_config:get(Config2, depowner, dict:new()),
 
     %% check for conflicting deps
-    [?ERROR("Conflicting dependencies for ~p: ~p~n", [K,
-                                                      [{"From: " ++ string:join(dict:fetch(D,
-                                                                               DepOwners),
-                                                                               ", "),
-                                                        {D#dep.vsn_regex,
-                                                         D#dep.source}} || D <- V]]) ||
-           {K, V} <- dict:to_list(lists:foldl(fun(Dep, Acc) ->
-                                                      dict:append(Dep#dep.app, Dep, Acc)
-                                              end, dict:new(), UpdatedDeps)), length(V) > 1],
+    _ = [?ERROR("Conflicting dependencies for ~p: ~p~n",
+                [K, [{"From: " ++ string:join(dict:fetch(D, DepOwners), ", "),
+                      {D#dep.vsn_regex, D#dep.source}} || D <- V]])
+         || {K, V} <- dict:to_list(
+                        lists:foldl(
+                          fun(Dep, Acc) ->
+                                  dict:append(Dep#dep.app, Dep, Acc)
+                          end, dict:new(), UpdatedDeps)),
+            length(V) > 1],
 
     %% Add each updated dep to our list of dirs for post-processing. This yields
     %% the necessary transitivity of the deps


[18/50] git commit: Merge pull request #142 from Vagabond/adt-update-deps

Posted by da...@apache.org.
Merge pull request #142 from Vagabond/adt-update-deps

Make update-deps traverse deps breadth-first, top-down

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/ed88055a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/ed88055a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/ed88055a

Branch: refs/heads/import
Commit: ed88055a750736c5c9807ca4da4803ff8a6aef16
Parents: 179ed48 2b3edc2
Author: Dave Smith <di...@dizzyd.com>
Authored: Mon Oct 14 15:09:03 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Mon Oct 14 15:09:03 2013 -0700

----------------------------------------------------------------------
 inttest/tdeps_update/a.erl               |   3 +
 inttest/tdeps_update/a.rebar.config      |   1 +
 inttest/tdeps_update/a2.rebar.config     |   1 +
 inttest/tdeps_update/a3.rebar.config     |   1 +
 inttest/tdeps_update/a4.rebar.config     |   4 +
 inttest/tdeps_update/b.hrl               |   1 +
 inttest/tdeps_update/b.rebar.config      |   1 +
 inttest/tdeps_update/b2.rebar.config     |   1 +
 inttest/tdeps_update/b3.rebar.config     |   1 +
 inttest/tdeps_update/b4.rebar.config     |   1 +
 inttest/tdeps_update/c.hrl               |   1 +
 inttest/tdeps_update/c.rebar.config      |   1 +
 inttest/tdeps_update/c2.hrl              |   1 +
 inttest/tdeps_update/c2.rebar.config     |   4 +
 inttest/tdeps_update/c3.rebar.config     |   4 +
 inttest/tdeps_update/d.hrl               |   1 +
 inttest/tdeps_update/root.rebar.config   |   1 +
 inttest/tdeps_update/tdeps_update_rt.erl | 147 ++++++++++++++++++++++
 src/rebar_core.erl                       |  10 +-
 src/rebar_deps.erl                       | 168 ++++++++++++++++++++------
 20 files changed, 316 insertions(+), 37 deletions(-)
----------------------------------------------------------------------



[13/50] git commit: Change how update-deps updates a git branch

Posted by da...@apache.org.
Change how update-deps updates a git branch

Previously, update-deps on a dep tagged as {branch, ...} would do the
following:

  git fetch
  git checkout -q origin/<branch>

If you were already on that branch, the repo would end up in detached
head state. This is kind of annoying if you're doing local development.

This patch changes the behaviour to be

  git fetch
  git checkout -q <branch>
  git pull --ff-only --no-rebase -q <branch>

The intent of this is to move the branch's HEAD forward to match
upstream without destroying any local commits or changes, and without
accidentally causing merges or rebases. It will fail if the operation
can not be performed without losing history, merging or rebasing.

The previous behaviour has been around a very long time:

https://github.com/rebar/rebar/commit/064195dc5a90f5b0cc3ae92e8373671b0043033f#L0R308

It also exactly mirrors the download_source case, which is not really
true. With git tags and SHAs, one can assume that they don't change, but
branches move all the time.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/f46e7b2e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/f46e7b2e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/f46e7b2e

Branch: refs/heads/import
Commit: f46e7b2e5c389ab8489121a3ab23159750dd1661
Parents: 0977d58
Author: Andrew Thompson <an...@hijacked.us>
Authored: Mon Sep 23 15:13:26 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Mon Sep 23 15:13:26 2013 -0400

----------------------------------------------------------------------
 src/rebar_deps.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/f46e7b2e/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 15e7594..4a98ddf 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -560,7 +560,8 @@ update_source1(AppDir, {git, Url, ""}) ->
 update_source1(AppDir, {git, _Url, {branch, Branch}}) ->
     ShOpts = [{cd, AppDir}],
     rebar_utils:sh("git fetch origin", ShOpts),
-    rebar_utils:sh(?FMT("git checkout -q origin/~s", [Branch]), ShOpts);
+    rebar_utils:sh(?FMT("git checkout -q ~s", [Branch]), ShOpts),
+    rebar_utils:sh(?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]), ShOpts);
 update_source1(AppDir, {git, _Url, {tag, Tag}}) ->
     ShOpts = [{cd, AppDir}],
     rebar_utils:sh("git fetch --tags origin", ShOpts),


[49/50] git commit: inttest/rgen1: increase retest timeout (30s -> 60s)

Posted by da...@apache.org.
inttest/rgen1: increase retest timeout (30s -> 60s)

The current default (30s) causes inttest/rgen1 to timeout too often. Add
retest.config to double the timeout.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/a3430a80
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/a3430a80
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/a3430a80

Branch: refs/heads/import
Commit: a3430a8053020555ae7e80cb37732f44d59085d9
Parents: 74e69fa
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Dec 4 20:08:22 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Fri Dec 6 18:15:14 2013 +0100

----------------------------------------------------------------------
 inttest/rgen1/retest.config | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/a3430a80/inttest/rgen1/retest.config
----------------------------------------------------------------------
diff --git a/inttest/rgen1/retest.config b/inttest/rgen1/retest.config
new file mode 100644
index 0000000..a04233c
--- /dev/null
+++ b/inttest/rgen1/retest.config
@@ -0,0 +1 @@
+{timeout, 60000}.


[36/50] git commit: erlc: properly reuse the right erl_opts in test_compile

Posted by da...@apache.org.
erlc: properly reuse the right erl_opts in test_compile

Avoid getting erl_opts twice in test_compile/3, and make sure the
correctly filtered (platform_define, etc.) version is used.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/8f05368b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/8f05368b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/8f05368b

Branch: refs/heads/import
Commit: 8f05368ba4749cf21c7393c04856b7f059ab5676
Parents: 988c9cd
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Mon Sep 30 18:57:07 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Tue Nov 26 20:33:56 2013 +0100

----------------------------------------------------------------------
 src/rebar_erlc_compiler.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/8f05368b/src/rebar_erlc_compiler.erl
----------------------------------------------------------------------
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index 4157ba4..dbefa4a 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -157,7 +157,8 @@ test_compile(Config, Cmd, OutDir) ->
     %% Compile erlang code to OutDir, using a tweaked config
     %% with appropriate defines for eunit, and include all the test modules
     %% as well.
-    ok = doterl_compile(test_compile_config(Config, Cmd), OutDir, TestErls),
+    ok = doterl_compile(test_compile_config(Config, ErlOpts, Cmd),
+                        OutDir, TestErls),
 
     {ok, SrcErls}.
 
@@ -201,12 +202,11 @@ info_help(Description) ->
         {yrl_first_files, []}
        ]).
 
-test_compile_config(Config, Cmd) ->
+test_compile_config(Config, ErlOpts, Cmd) ->
     {Config1, TriqOpts} = triq_opts(Config),
     {Config2, PropErOpts} = proper_opts(Config1),
     {Config3, EqcOpts} = eqc_opts(Config2),
 
-    ErlOpts = rebar_config:get_list(Config3, erl_opts, []),
     OptsAtom = list_to_atom(Cmd ++ "_compile_opts"),
     EunitOpts = rebar_config:get_list(Config3, OptsAtom, []),
     Opts0 = [{d, 'TEST'}] ++


[08/50] git commit: Merge pull request #122 from tuncer/net_kernel

Posted by da...@apache.org.
Merge pull request #122 from tuncer/net_kernel

Fix eunit regression introduced in 2716d83a18

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/adad711d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/adad711d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/adad711d

Branch: refs/heads/import
Commit: adad711d51552c6ca56c4114b70f7273f10ac09a
Parents: 047f1b7 0550560
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 13:05:11 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 13:05:11 2013 -0700

----------------------------------------------------------------------
 src/rebar_eunit.erl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[29/50] git commit: Roll rebar version 2.1.0

Posted by da...@apache.org.
Roll rebar version 2.1.0


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/8b7f5442
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/8b7f5442
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/8b7f5442

Branch: refs/heads/import
Commit: 8b7f5442a905f47169efa3790e08d9ac5070d825
Parents: bef8286
Author: Jared Morrow <ja...@basho.com>
Authored: Fri Nov 22 07:54:28 2013 -0700
Committer: Jared Morrow <ja...@basho.com>
Committed: Fri Nov 22 07:54:28 2013 -0700

----------------------------------------------------------------------
 ebin/rebar.app | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/8b7f5442/ebin/rebar.app
----------------------------------------------------------------------
diff --git a/ebin/rebar.app b/ebin/rebar.app
index d3a50df..e64a51f 100644
--- a/ebin/rebar.app
+++ b/ebin/rebar.app
@@ -3,7 +3,7 @@
 
 {application, rebar,
  [{description, "Rebar: Erlang Build Tool"},
-  {vsn, "2.1.0-pre"},
+  {vsn, "2.1.0"},
   {modules, [ rebar,
               rebar_abnfc_compiler,
               rebar_app_utils,


[23/50] git commit: Fix issues introduced in #137 (4dfdd72)

Posted by da...@apache.org.
Fix issues introduced in #137 (4dfdd72)

* fix Dialyzer warning
* fix formatting


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/dfba6dd6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/dfba6dd6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/dfba6dd6

Branch: refs/heads/import
Commit: dfba6dd6f9ac1d0360dcfdf8194bb1c8ff25c7a8
Parents: d49ac03
Author: Manuel Rubio <ma...@bosqueviejo.net>
Authored: Sat Sep 21 22:28:49 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Oct 16 13:21:56 2013 +0200

----------------------------------------------------------------------
 src/rebar_upgrade.erl | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/dfba6dd6/src/rebar_upgrade.erl
----------------------------------------------------------------------
diff --git a/src/rebar_upgrade.erl b/src/rebar_upgrade.erl
index 1441c5a..5814e51 100644
--- a/src/rebar_upgrade.erl
+++ b/src/rebar_upgrade.erl
@@ -185,21 +185,22 @@ boot_files(TargetDir, Ver, Name) ->
           filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])),
 
     SysConfig = filename:join([TargetDir, "releases", Ver, "sys.config"]),
-    case filelib:is_regular(SysConfig) of 
-      true -> 
-        {ok, _} = file:copy(
-                SysConfig,
-                filename:join([".", ?TMP, "releases", Ver, "sys.config"]));
-      false -> ok
-    end,
+    _ = case filelib:is_regular(SysConfig) of
+            true ->
+                {ok, _} = file:copy(
+                            SysConfig,
+                            filename:join([".", ?TMP, "releases", Ver,
+                                           "sys.config"]));
+            false -> ok
+        end,
 
     VmArgs = filename:join([TargetDir, "releases", Ver, "vm.args"]),
-    case filelib:is_regular(VmArgs) of 
-      true -> 
-        {ok, _} = file:copy(
-                VmArgs,
-                filename:join([".", ?TMP, "releases", Ver, "vm.args"]));
-      false -> {ok, 0}
+    case filelib:is_regular(VmArgs) of
+        true ->
+            {ok, _} = file:copy(
+                        VmArgs,
+                        filename:join([".", ?TMP, "releases", Ver, "vm.args"]));
+        false -> {ok, 0}
     end.
 
 make_tar(NameVer, NewVer, NewName) ->


[04/50] git commit: Fix eunit regression introduced in 2716d83a18

Posted by da...@apache.org.
Fix eunit regression introduced in 2716d83a18

Use alternative way to detect net_kernel:stop/0 has succeeded as
suggested by Ulf Wiger.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/05505602
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/05505602
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/05505602

Branch: refs/heads/import
Commit: 0550560221fde6d5c19bec472e395fb20d720252
Parents: e840ac2
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Aug 14 09:24:39 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Fri Sep 20 20:53:16 2013 +0200

----------------------------------------------------------------------
 src/rebar_eunit.erl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/05505602/src/rebar_eunit.erl
----------------------------------------------------------------------
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index 95ba3e8..d39b1a2 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -802,11 +802,11 @@ pause_until_net_kernel_stopped() ->
 pause_until_net_kernel_stopped(0) ->
     exit(net_kernel_stop_failed);
 pause_until_net_kernel_stopped(N) ->
-    try
-        timer:sleep(100),
-        pause_until_net_kernel_stopped(N - 1)
-    catch
-        error:badarg ->
+    case node() of
+        'nonode@nohost' ->
             ?DEBUG("Stopped net kernel.\n", []),
-            ok
+            ok;
+        _ ->
+            timer:sleep(100),
+            pause_until_net_kernel_stopped(N - 1)
     end.


[45/50] git commit: Switch retest dep to upstream (dizzyd/retest.git)

Posted by da...@apache.org.
Switch retest dep to upstream (dizzyd/retest.git)

Now that Dave has merged all patches, it's safe to switch back to
upstream retest.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/8557f6c5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/8557f6c5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/8557f6c5

Branch: refs/heads/import
Commit: 8557f6c5bc5b8abcfc97b93dfc7ed57cc7e9ef3b
Parents: c02fcec
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Wed Dec 4 19:57:31 2013 +0100
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Wed Dec 4 19:57:31 2013 +0100

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/8557f6c5/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index 07feb95..be61b5e 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -4,7 +4,7 @@
 %% TODO: Change temporary retest fork back to dizzyd/retest after merge
 %% ExtraDeps = [{retest, ".*", {git, "git://github.com/dizzyd/retest.git"}}],
 ExtraDeps = [{retest, ".*",
-              {git, "git://github.com/tuncer/retest.git", "next"}}],
+              {git, "git://github.com/dizzyd/retest.git"}}],
 
 case os:getenv("REBAR_EXTRA_DEPS") of
     false ->


[15/50] git commit: Fix skip check for deps not present

Posted by da...@apache.org.
Fix skip check for deps not present


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/eae26a5c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/eae26a5c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/eae26a5c

Branch: refs/heads/import
Commit: eae26a5c4303f913b7d8d7177683cb4ae008d47c
Parents: d9aa65f
Author: Andrew Thompson <an...@hijacked.us>
Authored: Tue Sep 24 12:07:41 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Tue Sep 24 12:07:41 2013 -0400

----------------------------------------------------------------------
 src/rebar_deps.erl | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/eae26a5c/src/rebar_deps.erl
----------------------------------------------------------------------
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 40000ad..6450715 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -634,12 +634,16 @@ update_deps_int(Config0, UDD) ->
 
 should_skip_update_dep(Config, Dep) ->
     {true, AppDir} = get_deps_dir(Config, Dep#dep.app),
-    {true, AppFile} = rebar_app_utils:is_app_dir(AppDir),
-    case rebar_app_utils:is_skipped_app(Config, AppFile) of
-        {_Config, {true, _SkippedApp}} ->
-            true;
-        _ ->
-            false
+    case rebar_app_utils:is_app_dir(AppDir) of
+        false ->
+            false;
+        {true, AppFile} ->
+            case rebar_app_utils:is_skipped_app(Config, AppFile) of
+                {_Config, {true, _SkippedApp}} ->
+                    true;
+                _ ->
+                    false
+            end
     end.
 
 %% Recursively walk the deps and build a list of them.


[05/50] git commit: Extract contributing guide into CONTRIBUTING.md

Posted by da...@apache.org.
Extract contributing guide into CONTRIBUTING.md

While at it, refactor the guide for clarity. Some of the new text was
taken from erlware/relx/CONTRIBUTING.md and modified as needed.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/71f6e917
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/71f6e917
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/71f6e917

Branch: refs/heads/import
Commit: 71f6e917f4963d23ed63cdd5e860b2be55842105
Parents: e840ac2
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Thu Jun 27 21:12:27 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Fri Sep 20 20:54:23 2013 +0200

----------------------------------------------------------------------
 CONTRIBUTING.md | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md       | 72 +---------------------------------------
 2 files changed, 95 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/71f6e917/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..9aeccb5
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,94 @@
+Contributing to rebar
+---------------------
+
+Before implementing a new feature, you should submit a ticket for discussion on your plans.  
+The feature might have been rejected already, or the implementation might already be decided.
+
+See [Community and Resources](README.md#community-and-resources).
+
+Code style
+----------
+
+The following rules must be followed:
+ * Do not introduce trailing whitespace
+ * Do not mix spaces and tabs
+ * Do not introduce lines longer than 80 characters
+
+The following rules should be followed:
+ * Write small functions whenever possible
+ * Avoid having too many clauses containing clauses containing clauses.  
+   Basically, avoid deeply nested functions.
+
+[erlang-mode (emacs)](http://www.erlang.org/doc/man/erlang.el.html)
+indentation is preferred. This will keep the code base consistent.  
+vi users are encouraged to give [Vim emulation](http://emacswiki.org/emacs/Evil) ([more
+info](https://gitorious.org/evil/pages/Home)) a try.
+
+Pull requests and branching
+---------------------------
+
+Use one topic branch per pull request. If you do that, you can add extra commits or fix up  
+buggy commits via `git rebase -i`, and update the branch. The updated branch will be  
+visible in the same pull request. Therefore, you should not open a new pull request when  
+you have to fix your changes.
+
+Do not commit to master in your fork.
+
+Provide a clean branch without merge commits.
+
+Committing your changes
+-----------------------
+
+Please ensure that all commits pass all tests, and do not have extra Dialyzer warnings.  
+To do that run `make check`. If you didn't build via `make debug` at first, the beam files in  
+`ebin/` might be missing debug_info required for [xref](http://www.erlang.org/doc/man/xref.html) 
+and [Dialyzer](http://www.erlang.org/doc/man/dialyzer.html), causing a test 
+failure.  
+If that happens, running `make clean` before running `make check` could solve the problem.  
+If you change any of the files with known but safe to ignore Dialyzer warnings, you may  
+have to adapt the line number(s) in [dialyzer_reference](dialyzer_reference). If you do that, 
+do not remove the  
+leading blank line.
+
+#### Structuring your commits
+
+Fixing a bug is one commit.  
+Adding a feature is one commit.  
+Adding two features is two commits.  
+Two unrelated changes is two commits.
+
+If you fix a (buggy) commit, squash (`git rebase -i`) the changes as a fixup commit into  
+the original commit.
+
+#### Writing Commit Messages
+
+It's important to write a proper commit title and description. The commit title must be  
+at most 50 characters; it is the first line of the commit text. The second line of the  
+commit text must be left blank. The third line and beyond is the commit message. You  
+should write a commit message. If you do, wrap all lines at 72 characters. You should  
+explain what the commit does, what references you used, and any other information  
+that helps understanding your changes.
+
+Basically, structure your commit message like this:
+
+<pre>
+One line summary (at most 50 characters)
+
+Longer description (wrap at 72 characters)
+</pre>
+
+##### Commit title/summary
+
+* At most 50 characters
+* What was changed
+* Imperative present tense (Fix, Add, Change)
+ * `Fix bug 123`
+ * `Add 'foobar' command`
+ * `Change default timeout to 123`
+* No period
+
+##### Commit description
+
+* Wrap at 72 characters
+* Why, explain intention and implementation approach
+* Present tense

http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/71f6e917/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3be5091..3ec4a3a 100644
--- a/README.md
+++ b/README.md
@@ -51,77 +51,7 @@ and you can use rebar to build OTP-compliant apps.
 Contributing to rebar
 =====================
 
-Pull requests and branching
----------------------------
-
-Use one topic branch per pull request.
-
-Do not commit to master in your fork.
-
-Provide a clean branch without any merge commits from upstream.
-
-Usually you should squash any intermediate commits into the original single commit.
-
-Code style
-----------
-
-Do not introduce trailing whitespace.
-
-Do not mix spaces and tabs.
-
-Do not introduce lines longer than 80 characters.
-
-[erlang-mode (emacs)](http://www.erlang.org/doc/man/erlang.el.html) indentation
-is preferred.  vi-only users are encouraged to give [Vim
-emulation](http://emacswiki.org/emacs/Evil) ([more
-info](https://gitorious.org/evil/pages/Home)) a try.
-
-Writing Commit Messages
------------------------
-
-Structure your commit message like this:
-
-<pre>
-One line summary (less than 50 characters)
-
-Longer description (wrap at 72 characters)
-</pre>
-
-### Summary
-
-* Less than 50 characters
-* What was changed
-* Imperative present tense (fix, add, change)
-  * `Fix bug 123`
-  * `Add 'foobar' command`
-  * `Change default timeout to 123`
-* No period
-
-### Description
-
-* Wrap at 72 characters
-* Why, explain intention and implementation approach
-* Present tense
-
-### Atomicity
-
-* Break up logical changes
-* Make whitespace changes separately
-
-Run checks
-----------
-
-Before you submit a patch, run ``make check`` to execute the test suite and
-check for [xref](http://www.erlang.org/doc/man/xref.html) and
-[Dialyzer](http://www.erlang.org/doc/man/dialyzer.html) warnings. You may have
-to run ``make clean`` first.
-
-[Dialyzer](http://www.erlang.org/doc/man/dialyzer.html) warnings are compared
-against a set of safe-to-ignore warnings found in
-[dialyzer_reference](https://raw.github.com/rebar/rebar/master/dialyzer_reference).
-[xref](http://www.erlang.org/doc/man/xref.html) is run with [custom
-queries](https://raw.github.com/rebar/rebar/master/rebar.config) to suppress
-safe-to-ignore warnings.
+Please refer to [CONTRIBUTING](CONTRIBUTING.md).
 
 Community and Resources
 -----------------------


[26/50] git commit: Don't badmatch if a path we think we added isn't in the code path

Posted by da...@apache.org.
Don't badmatch if a path we think we added isn't in the code path


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/aa46d858
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/aa46d858
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/aa46d858

Branch: refs/heads/import
Commit: aa46d858493356b5247481532145ddc99f12040d
Parents: d983bea
Author: Andrew Thompson <an...@hijacked.us>
Authored: Thu Oct 17 12:36:36 2013 -0400
Committer: Andrew Thompson <an...@hijacked.us>
Committed: Thu Oct 17 12:36:36 2013 -0400

----------------------------------------------------------------------
 src/rebar_core.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/aa46d858/src/rebar_core.erl
----------------------------------------------------------------------
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 2e0768e..6c4f5c5 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -411,7 +411,7 @@ restore_code_path(no_change) ->
 restore_code_path({added, Paths}) ->
     %% Verify that all of the paths still exist -- some dynamically
     %% added paths can get blown away during clean.
-    [true = code:del_path(F) || F <- Paths, erl_prim_loader_is_file(F)],
+    [code:del_path(F) || F <- Paths, erl_prim_loader_is_file(F)],
     ok.
 
 erl_prim_loader_is_file(File) ->


[07/50] git commit: Merge pull request #109 from tuncer/contributing

Posted by da...@apache.org.
Merge pull request #109 from tuncer/contributing

Extract contributing guide into CONTRIBUTING.md

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/047f1b7e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/047f1b7e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/047f1b7e

Branch: refs/heads/import
Commit: 047f1b7e96b5e57890e6e3f7d0b04c92f3a3541e
Parents: e840ac2 71f6e91
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 13:04:44 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 13:04:44 2013 -0700

----------------------------------------------------------------------
 CONTRIBUTING.md | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md       | 72 +---------------------------------------
 2 files changed, 95 insertions(+), 71 deletions(-)
----------------------------------------------------------------------



[27/50] git commit: Init RUNNER_SCRIPT var in simplenode.runner

Posted by da...@apache.org.
Init RUNNER_SCRIPT var in simplenode.runner

RUNNER_SCRIPT variable is not initialized in simplenode.runner and it's
referenced when calling sudo.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/e1d218f9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/e1d218f9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/e1d218f9

Branch: refs/heads/import
Commit: e1d218f99a4461964a36fc33b3c2d4b35740dc47
Parents: ed88055
Author: Manuel Durán Aguete <ma...@aguete.org>
Authored: Mon Nov 18 13:17:35 2013 +0100
Committer: Manuel Durán Aguete <ma...@aguete.org>
Committed: Mon Nov 18 13:17:35 2013 +0100

----------------------------------------------------------------------
 priv/templates/simplenode.runner | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/e1d218f9/priv/templates/simplenode.runner
----------------------------------------------------------------------
diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner
index c2ef258..2786e72 100755
--- a/priv/templates/simplenode.runner
+++ b/priv/templates/simplenode.runner
@@ -16,6 +16,7 @@ fi
 unset POSIX_SHELL
 
 RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd -P)
+RUNNER_SCRIPT=${0##*/}
 
 CALLER_DIR=$PWD
 


[37/50] git commit: lfe: use correctly filtered erl_opts

Posted by da...@apache.org.
lfe: use correctly filtered erl_opts


Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/55d15394
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/55d15394
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/55d15394

Branch: refs/heads/import
Commit: 55d15394048148f9d9f26b0c509590e7fe0f4cfb
Parents: 8f05368
Author: Tuncer Ayaz <tu...@gmail.com>
Authored: Mon Sep 30 19:05:23 2013 +0200
Committer: Tuncer Ayaz <tu...@gmail.com>
Committed: Tue Nov 26 20:33:56 2013 +0100

----------------------------------------------------------------------
 src/rebar_lfe_compiler.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-rebar/blob/55d15394/src/rebar_lfe_compiler.erl
----------------------------------------------------------------------
diff --git a/src/rebar_lfe_compiler.erl b/src/rebar_lfe_compiler.erl
index 2a047d8..8488b0f 100644
--- a/src/rebar_lfe_compiler.erl
+++ b/src/rebar_lfe_compiler.erl
@@ -70,8 +70,8 @@ compile_lfe(Source, _Target, Config) ->
                    "~n", []),
             ?FAIL;
         _ ->
-            Opts = [{i, "include"}, {outdir, "ebin"}, return]
-                ++ rebar_config:get_list(Config, erl_opts, []),
+            ErlOpts = rebar_utils:erl_opts(Config),
+            Opts = [{i, "include"}, {outdir, "ebin"}, return] ++ ErlOpts,
             case lfe_comp:file(Source, Opts) of
                 {ok, _Mod, Ws} ->
                     rebar_base_compiler:ok_tuple(Config, Source, Ws);


[46/50] git commit: Merge pull request #185 from tuncer/retest-upstream

Posted by da...@apache.org.
Merge pull request #185 from tuncer/retest-upstream

Switch retest dep to upstream (dizzyd/retest.git)

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/745b14dd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/745b14dd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/745b14dd

Branch: refs/heads/import
Commit: 745b14ddf1f82f74dc1e9ccbb38c6b4bb599b527
Parents: c02fcec 8557f6c
Author: Dave Smith <di...@dizzyd.com>
Authored: Wed Dec 4 11:01:39 2013 -0800
Committer: Dave Smith <di...@dizzyd.com>
Committed: Wed Dec 4 11:01:39 2013 -0800

----------------------------------------------------------------------
 rebar.config.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[43/50] git commit: Merge pull request #173 from tuncer/unknown-vsn

Posted by da...@apache.org.
Merge pull request #173 from tuncer/unknown-vsn

Fix false reporting of (plain) vsn strings

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/dac4f924
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/dac4f924
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/dac4f924

Branch: refs/heads/import
Commit: dac4f9245d7e82263763c9d8a1112cb2dbe6d8f1
Parents: cedb889 edef096
Author: Jared Morrow <ja...@basho.com>
Authored: Tue Dec 3 13:07:01 2013 -0800
Committer: Jared Morrow <ja...@basho.com>
Committed: Tue Dec 3 13:07:01 2013 -0800

----------------------------------------------------------------------
 src/rebar_utils.erl | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[02/50] git commit: Merge pull request #132 from alexthornton1/mib_to_hrl_verbosity

Posted by da...@apache.org.
Merge pull request #132 from alexthornton1/mib_to_hrl_verbosity

mib_to_hrl compilation verbosity via 'mib_opts'

Project: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/commit/d19a4667
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/tree/d19a4667
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-rebar/diff/d19a4667

Branch: refs/heads/import
Commit: d19a46676c4e5fe51f84b3a8758673212efa0811
Parents: 4dfdd72 01fd873
Author: Dave Smith <di...@dizzyd.com>
Authored: Fri Sep 20 07:10:26 2013 -0700
Committer: Dave Smith <di...@dizzyd.com>
Committed: Fri Sep 20 07:10:26 2013 -0700

----------------------------------------------------------------------
 src/rebar_erlc_compiler.erl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------