[Bf-blender-cvs] [c2da706] master: Code cleanup: remove references to svn and code style

Campbell Barton noreply at git.blender.org
Tue Jan 28 13:01:34 CET 2014


Commit: c2da706a36ca355509d9dc2abcffc1edc6c49fff
Author: Campbell Barton
Date:   Tue Jan 28 23:00:28 2014 +1100
https://developer.blender.org/rBc2da706a36ca355509d9dc2abcffc1edc6c49fff

Code cleanup: remove references to svn and code style

===================================================================

M	CMakeLists.txt
M	build_files/cmake/cmake_consistency_check.py
M	build_files/cmake/example_scripts/cmake_linux_install.sh
M	source/blender/blenkernel/intern/tracking_detect.c
M	source/blender/blenkernel/intern/writeffmpeg.c
M	source/blender/blenlib/intern/smallhash.c
M	source/blender/editors/gpencil/gpencil_edit.c

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce4a11c..7ebc20f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -511,12 +511,12 @@ endif()
 
 #-----------------------------------------------------------------------------
 # Check for valid directories
-# ... svn extern paths can be missing because of svn-git.
+# ... a partial checkout may cause this.
 
 if(WITH_INTERNATIONAL)
 	if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale")
 		message(WARNING "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
-						"This is an 'svn external', which are known not to work with bridges to other version "
+						"This is a 'git submodule', which are known not to work with bridges to other version "
 						"control systems, disabling 'WITH_INTERNATIONAL'.")
 		set(WITH_INTERNATIONAL OFF)
 	endif()
@@ -525,7 +525,7 @@ endif()
 if(WITH_PYTHON)
 	if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons")
 		message(WARNING "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
-						"This is an 'svn external', which are known not to work with bridges to other version "
+						"This is a 'git submodule', which are known not to work with bridges to other version "
 						"control systems: * CONTINUING WITHOUT ADDONS *")
 	endif()
 endif()
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 665bc60..c2044fc 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -58,7 +58,7 @@ def replace_line(f, i, text, keep_indent=True):
 def source_list(path, filename_check=None):
     for dirpath, dirnames, filenames in os.walk(path):
 
-        # skip '.svn'
+        # skip '.git'
         if dirpath.startswith("."):
             continue
 
diff --git a/build_files/cmake/example_scripts/cmake_linux_install.sh b/build_files/cmake/example_scripts/cmake_linux_install.sh
index 504218f..6ef5074 100755
--- a/build_files/cmake/example_scripts/cmake_linux_install.sh
+++ b/build_files/cmake/example_scripts/cmake_linux_install.sh
@@ -1,37 +1,41 @@
 #!/bin/sh
 
 # This shell script checks out and compiles blender, tested on ubuntu 10.04
-# assumes you have dependancies installed alredy
+# assumes you have dependencies installed already
 
 # See this page for more info:
-#  http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Generic_Distro/CMake
+#   http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Generic_Distro/CMake
 
 # grab blender
-mkdir ~/blender-svn 
-cd ~/blender-svn
-svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender
+mkdir ~/blender-git 
+cd ~/blender-git
+
+git clone http://git.blender.org/blender.git
+cd blender
+git submodule update --init --recursive
+git submodule foreach git checkout master
+git submodule foreach git pull --rebase origin master
 
 # create cmake dir
-mkdir ~/blender-svn/build-cmake
-cd ~/blender-svn/build-cmake
+mkdir ~/blender-git/build-cmake
+cd ~/blender-git/build-cmake
 
 # cmake without copying files for fast rebuilds
-# the files from svn will be used in place
+# the files from git will be used in place
 cmake ../blender
 
 # make blender, will take some time
 make
 
 # link the binary to blenders source directory to run quickly
-ln -s ~/blender-svn/build-cmake/bin/blender ~/blender-svn/blender/blender.bin
+ln -s ~/blender-git/build-cmake/bin/blender ~/blender-git/blender/blender.bin
 
 # useful info
 echo ""
 echo "* Useful Commands *"
-echo "   Run Blender: ~/blender-svn/blender/blender.bin"
-echo "   Update Blender: svn up ~/blender-svn/blender"
-echo "   Reconfigure Blender: cd ~/blender-svn/build-cmake ; cmake ."
-echo "   Build Blender: cd ~/blender-svn/build-cmake ; make"
+echo "   Run Blender: ~/blender-git/blender/blender.bin"
+echo "   Update Blender: git pull --rebase; git submodule foreach git pull --rebase origin master"
+echo "   Reconfigure Blender: cd ~/blender-git/build-cmake ; cmake ."
+echo "   Build Blender: cd ~/blender-git/build-cmake ; make"
 echo ""
 
-
diff --git a/source/blender/blenkernel/intern/tracking_detect.c b/source/blender/blenkernel/intern/tracking_detect.c
index 65fd997..a5a8ec8 100644
--- a/source/blender/blenkernel/intern/tracking_detect.c
+++ b/source/blender/blenkernel/intern/tracking_detect.c
@@ -116,8 +116,8 @@ static void detect_retrieve_libmv_features(MovieTracking *tracking, ListBase *tr
 		/* In Libmv integer coordinate points to pixel center, in blender
 		 * it's not. Need to add 0.5px offset to center.
 		 */
-		xu = (x + 0.5f) / width;
-		yu = (y + 0.5f) / height;
+		xu = (x + 0.5) / width;
+		yu = (y + 0.5) / height;
 
 		if (layer)
 			ok = check_point_in_layer(layer, xu, yu) != place_outside_layer;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 38a8d2e..541d106 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -332,7 +332,8 @@ static int write_video_frame(RenderData *rd, int cfra, AVFrame *frame, ReportLis
 		if (packet.dts != AV_NOPTS_VALUE) {
 			packet.dts = av_rescale_q(packet.dts, c->time_base, video_stream->time_base);
 			PRINT("Video Frame DTS: %d\n", (int)packet.dts);
-		} else {
+		}
+		else {
 			PRINT("Video Frame DTS: not set\n");
 		}
 
@@ -976,7 +977,8 @@ static void flush_ffmpeg(void)
 		if (packet.dts != AV_NOPTS_VALUE) {
 			packet.dts = av_rescale_q(packet.dts, c->time_base, video_stream->time_base);
 			PRINT("Video Frame DTS: %d\n", (int) packet.dts);
-		} else {
+		}
+		else {
 			PRINT("Video Frame DTS: not set\n");
 		}
 
diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c
index 45a9c58..3812d29 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -96,8 +96,8 @@ BLI_INLINE SmallHashEntry *smallhash_lookup_first_free(SmallHash *hash, uintptr_
 	unsigned int hoff = 1;
 
 	for (entry = &hash->table[h % hash->size];
-		 !ELEM(entry->val, SMHASH_CELL_UNUSED, SMHASH_CELL_FREE);
-		 h = SMHASH_NEXT(h, hoff), entry = &hash->table[h % hash->size])
+	     !ELEM(entry->val, SMHASH_CELL_UNUSED, SMHASH_CELL_FREE);
+	     h = SMHASH_NEXT(h, hoff), entry = &hash->table[h % hash->size])
 	{
 		/* Nothing else to do! */
 	}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 5d99282..8d66a94 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1031,7 +1031,7 @@ static void gp_stroke_to_path(bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curv
 			p[0] += GAP_DFAC;  /* Rather arbitrary... */
 			dt = GAP_DFAC;  /* Rather arbitrary too! */
 		}
-		/* Note bp has alredy been incremented in main loop above, so it points to the right place. */
+		/* Note bp has already been incremented in main loop above, so it points to the right place. */
 		gp_stroke_to_path_add_point(gtd, bp, p, prev_bp->vec, do_gtd, gps->inittime, dt, 0.0f, rad_fac, minmax_weights);
 	}
 
@@ -1297,7 +1297,7 @@ static void gp_stroke_to_bezier(bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cu
 		/* The end point */
 		interp_v3_v3v3(h1, p, prev_bezt->vec[1], BEZT_HANDLE_FAC);
 		interp_v3_v3v3(h2, p, prev_bezt->vec[1], -BEZT_HANDLE_FAC);
-		/* Note bezt has alredy been incremented in main loop above, so it points to the right place. */
+		/* Note bezt has already been incremented in main loop above, so it points to the right place. */
 		gp_stroke_to_bezier_add_point(gtd, bezt, p, h1, h2, prev_bezt->vec[1], do_gtd, gps->inittime, dt,
 		                              0.0f, rad_fac, minmax_weights);
 	}




More information about the Bf-blender-cvs mailing list