Browse code

Enable -es option for embedded clones symlinking. It seems to make things easier but its not well tested.

Nat! authored on 09/11/2016 16:48:45
Showing 4 changed files
... ...
@@ -1,8 +1,12 @@
1
-2.3.1
1
+2.4.0
2 2
 ===
3 3
 
4 4
 Fix failing update for projects with only embedded repositories.
5 5
 
6
+* experimental fetch flag -es added. This allows fetch to symlink embedded
7
+repositories.
8
+
9
+
6 10
 2.3
7 11
 ===
8 12
 The main new feature of 2.3 is support for working with different repositories.
... ...
@@ -29,8 +29,8 @@
29 29
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 MULLE_BOOTSTRAP_VERSION_MAJOR=2
32
-MULLE_BOOTSTRAP_VERSION_MINOR=3
33
-MULLE_BOOTSTRAP_VERSION_PATCH=1
32
+MULLE_BOOTSTRAP_VERSION_MINOR=4
33
+MULLE_BOOTSTRAP_VERSION_PATCH=0
34 34
 
35 35
 MULLE_BOOTSTRAP_VERSION="${MULLE_BOOTSTRAP_VERSION_MAJOR}.${MULLE_BOOTSTRAP_VERSION_MINOR}.${MULLE_BOOTSTRAP_VERSION_PATCH}"
36 36
 MULLE_BOOTSTRAP_FAIL_PREFIX="mulle-bootstrap"
... ...
@@ -2281,7 +2281,7 @@ build_main()
2281 2281
             ;;
2282 2282
 
2283 2283
          # fetch options, are just ignored
2284
-         -i|--ignore-branch|-fc|--force-checkout|-cs|--check-usr-local-include|-nr|--no-recursion|-e|--embedded-only|-u|--update-symlinks)
2284
+         -i|--ignore-branch|-fc|--force-checkout|-cs|--check-usr-local-include|-nr|--no-recursion|-e|--embedded-only|-es|--embedded-symlink|-u|--update-symlinks)
2285 2285
             :
2286 2286
          ;;
2287 2287
 
... ...
@@ -50,6 +50,7 @@ usage:
50 50
       -i    :  ignore wrongly checked out branches
51 51
       -nr   :  ignore .bootstrap folders of fetched repositories
52 52
       -u    :  try to update symlinked folders as well (not recommended)
53
+      -es   :  allow embedded symlinks (very experimental)
53 54
 
54 55
    install  :  clone or symlink non-exisiting repositories and other resources
55 56
    update   :  execute a "pull" in fetched repositories
... ...
@@ -1262,16 +1263,20 @@ clone_embedded_repository()
1262 1262
          ensure_clone_url_is_correct "${dstdir}" "${url}"
1263 1263
          ensure_clone_branch_is_correct "${dstdir}" "${branch}"
1264 1264
       else
1265
-         #
1266
-         # embedded_repositories are just cloned, no symlinks,
1267
-         #
1268
-         local old_forbidden
1269
-
1270
-         old_forbidden="${SYMLINK_FORBIDDEN}"
1265
+         if [ -z "${EMBEDDED_SYMLINKS}" ]
1266
+         then
1267
+            #
1268
+            # embedded_repositories should be cloned, no symlinks,
1269
+            #
1270
+            local old_forbidden
1271 1271
 
1272
-         SYMLINK_FORBIDDEN="YES"
1273
-         checkout "${name}" "${url}" "${dstdir}" "${branch}" "${tag}" "${scm}"
1274
-         SYMLINK_FORBIDDEN="${old_forbidden}"
1272
+            old_forbidden="${SYMLINK_FORBIDDEN}"
1273
+            SYMLINK_FORBIDDEN="YES"
1274
+            checkout "${name}" "${url}" "${dstdir}" "${branch}" "${tag}" "${scm}"
1275
+            SYMLINK_FORBIDDEN="${old_forbidden}"
1276
+         else
1277
+            checkout "${name}" "${url}" "${dstdir}" "${branch}" "${tag}" "${scm}"
1278
+         fi
1275 1279
 
1276 1280
          if read_yes_no_config_setting "update_gitignore" "YES"
1277 1281
          then
... ...
@@ -1415,6 +1420,10 @@ _common_main()
1415 1415
             EMBEDDED_ONLY="YES"
1416 1416
          ;;
1417 1417
 
1418
+         -es|--embedded-symlinks)
1419
+            EMBEDDED_SYMLINKS="YES"
1420
+         ;;
1421
+
1418 1422
          -i|--ignore-branch)
1419 1423
             MULLE_BOOTSTRAP_IGNORE_BRANCH="YES"
1420 1424
          ;;