diff --git a/rtdata/dcpprofiles/Canon EOS 6D.dcp b/rtdata/dcpprofiles/Canon EOS 6D.dcp
new file mode 100644
index 000000000..65919144c
Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 6D.dcp differ
diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt
index 597265bfe..1f4f3375f 100644
--- a/rtengine/CMakeLists.txt
+++ b/rtengine/CMakeLists.txt
@@ -11,7 +11,7 @@ set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc
dfmanager.cc ffmanager.cc gauss.cc rawimage.cc image8.cc image16.cc imagefloat.cc imagedata.cc imageio.cc improcfun.cc init.cc dcrop.cc
loadinitial.cc procparams.cc rawimagesource.cc demosaic_algos.cc shmap.cc simpleprocess.cc refreshmap.cc
fast_demo.cc amaze_demosaic_RT.cc CA_correct_RT.cc cfa_linedn_RT.cc green_equil_RT.cc hilite_recon.cc expo_before_b.cc
- stdimagesource.cc myfile.cc iccjpeg.cc hlmultipliers.cc improccoordinator.cc pipettebuffer.cc coord.cc
+ stdimagesource.cc myfile.cc iccjpeg.cc improccoordinator.cc pipettebuffer.cc coord.cc
processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc cieimage.cc
iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc ipvibrance.cc
imagedimensions.cc jpeg_memsrc.cc jdatasrc.cc iimage.cc
diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc
index 339f5e07a..989d9c6a7 100644
--- a/rtengine/improcfun.cc
+++ b/rtengine/improcfun.cc
@@ -23,9 +23,6 @@
#include "rtengine.h"
#include "improcfun.h"
#include "curves.h"
-#include "colorclip.h"
-#include "gauss.h"
-#include "bilateral2.h"
#include "mytime.h"
#include "iccstore.h"
#include "impulse_denoise.h"
diff --git a/rtengine/impulse_denoise.h b/rtengine/impulse_denoise.h
index ba596559c..9d3b73b79 100644
--- a/rtengine/impulse_denoise.h
+++ b/rtengine/impulse_denoise.h
@@ -24,6 +24,7 @@
#include "cieimage.h"
#include "sleef.c"
#include "opthelper.h"
+#include "gauss.h"
using namespace std;
diff --git a/rtengine/median.h b/rtengine/median.h
index 61da0d5a0..c2c969492 100644
--- a/rtengine/median.h
+++ b/rtengine/median.h
@@ -16,207 +16,74 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see .
*/
+#include "rt_math.h"
+
#define SORT3(a1,a2,a3,b1,b2,b3) \
{ \
- if ((a1)<(a2)) { \
- if ((a2)<(a3)) { \
- (b1) = (a1); (b2) = (a2); (b3) = (a3); \
- } \
- else if ((a1)<(a3)) { \
- (b1) = (a1); (b2) = (a3); (b3) = (a2); \
- } \
- else { \
- (b1) = (a3); (b2) = (a1); (b3) = (a2); \
- } \
- } \
- else { \
- if ((a3)<(a2)) { \
- (b1) = (a3); (b2) = (a2); (b3) = (a1); \
- } \
- else if ((a3)<(a1)) { \
- (b1) = (a2); (b2) = (a3); (b3) = (a1); \
- } \
- else { \
- (b1) = (a2); (b2) = (a1); (b3) = (a3); \
- } \
- } \
+ b2 = min(a1,a2);\
+ b1 = min(b2,a3);\
+ b3 = max(a1,a2);\
+ b2 = max(b2, min(b3,a3));\
+ b3 = max(b3,a3);\
}
-#define MERGESORT(a1,a2,a3,b1,b2,b3,c1,c2,c3,c4,c5,c6) \
- {\
- if (a1width;
@@ -3398,18 +3398,20 @@ void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, int row
array2D rbout_I (W, 3);
array2D rbout_Q (W, 3);
- float* row_I = new float[W];
- float* row_Q = new float[W];
+ float row_I[W];
+ float row_Q[W];
+
+ float buffer[3 * 8];
+ float* pre1_I = &buffer[0];
+ float* pre2_I = &buffer[3];
+ float* post1_I = &buffer[6];
+ float* post2_I = &buffer[9];
+ float* pre1_Q = &buffer[12];
+ float* pre2_Q = &buffer[15];
+ float* post1_Q = &buffer[18];
+ float* post2_Q = &buffer[21];
- float* pre1_I = new float[3];
- float* pre2_I = new float[3];
- float* post1_I = new float[3];
- float* post2_I = new float[3];
float middle_I[6];
- float* pre1_Q = new float[3];
- float* pre2_Q = new float[3];
- float* post1_Q = new float[3];
- float* post2_Q = new float[3];
float middle_Q[6];
float* tmp;
@@ -3437,12 +3439,14 @@ void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, int row
SORT3(rbconv_Q[px][1], rbconv_Q[cx][1], rbconv_Q[nx][1], pre2_Q[0], pre2_Q[1], pre2_Q[2]);
// median I channel
+ float temp[7];
+
for (int j = 1; j < W - 2; j += 2) {
SORT3(rbconv_I[px][j + 1], rbconv_I[cx][j + 1], rbconv_I[nx][j + 1], post1_I[0], post1_I[1], post1_I[2]);
+ NETWORKSORT4OF6(pre2_I[0], pre2_I[1], pre2_I[2], post1_I[0], post1_I[1], post1_I[2], middle_I[0], middle_I[1], middle_I[2], middle_I[3], middle_I[4], middle_I[5], temp[0]);
SORT3(rbconv_I[px][j + 2], rbconv_I[cx][j + 2], rbconv_I[nx][j + 2], post2_I[0], post2_I[1], post2_I[2]);
- MERGESORT(pre2_I[0], pre2_I[1], pre2_I[2], post1_I[0], post1_I[1], post1_I[2], middle_I[0], middle_I[1], middle_I[2], middle_I[3], middle_I[4], middle_I[5]);
- MEDIAN7(pre1_I[0], pre1_I[1], pre1_I[2], middle_I[1], middle_I[2], middle_I[3], middle_I[4], rbout_I[cx][j]);
- MEDIAN7(post2_I[0], post2_I[1], post2_I[2], middle_I[1], middle_I[2], middle_I[3], middle_I[4], rbout_I[cx][j + 1]);
+ MEDIAN7(pre1_I[0], pre1_I[1], pre1_I[2], middle_I[1], middle_I[2], middle_I[3], middle_I[4], temp[0], temp[1], temp[2], temp[3], temp[4], temp[5], temp[6], rbout_I[cx][j]);
+ MEDIAN7(post2_I[0], post2_I[1], post2_I[2], middle_I[1], middle_I[2], middle_I[3], middle_I[4], temp[0], temp[1], temp[2], temp[3], temp[4], temp[5], temp[6], rbout_I[cx][j + 1]);
tmp = pre1_I;
pre1_I = post1_I;
post1_I = tmp;
@@ -3455,10 +3459,10 @@ void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, int row
// median Q channel
for (int j = 1; j < W - 2; j += 2) {
SORT3(rbconv_Q[px][j + 1], rbconv_Q[cx][j + 1], rbconv_Q[nx][j + 1], post1_Q[0], post1_Q[1], post1_Q[2]);
+ NETWORKSORT4OF6(pre2_Q[0], pre2_Q[1], pre2_Q[2], post1_Q[0], post1_Q[1], post1_Q[2], middle_Q[0], middle_Q[1], middle_Q[2], middle_Q[3], middle_Q[4], middle_Q[5], temp[0]);
SORT3(rbconv_Q[px][j + 2], rbconv_Q[cx][j + 2], rbconv_Q[nx][j + 2], post2_Q[0], post2_Q[1], post2_Q[2]);
- MERGESORT(pre2_Q[0], pre2_Q[1], pre2_Q[2], post1_Q[0], post1_Q[1], post1_Q[2], middle_Q[0], middle_Q[1], middle_Q[2], middle_Q[3], middle_Q[4], middle_Q[5]);
- MEDIAN7(pre1_Q[0], pre1_Q[1], pre1_Q[2], middle_Q[1], middle_Q[2], middle_Q[3], middle_Q[4], rbout_Q[cx][j]);
- MEDIAN7(post2_Q[0], post2_Q[1], post2_Q[2], middle_Q[1], middle_Q[2], middle_Q[3], middle_Q[4], rbout_Q[cx][j + 1]);
+ MEDIAN7(pre1_Q[0], pre1_Q[1], pre1_Q[2], middle_Q[1], middle_Q[2], middle_Q[3], middle_Q[4], temp[0], temp[1], temp[2], temp[3], temp[4], temp[5], temp[6], rbout_Q[cx][j]);
+ MEDIAN7(post2_Q[0], post2_Q[1], post2_Q[2], middle_Q[1], middle_Q[2], middle_Q[3], middle_Q[4], temp[0], temp[1], temp[2], temp[3], temp[4], temp[5], temp[6], rbout_Q[cx][j + 1]);
tmp = pre1_Q;
pre1_Q = post1_Q;
post1_Q = tmp;
@@ -3477,6 +3481,10 @@ void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, int row
// blur i-1th row
if (i > row_from) {
+#ifdef _OPENMP
+ #pragma omp simd
+#endif
+
for (int j = 1; j < W - 1; j++) {
row_I[j] = (rbout_I[px][j - 1] + rbout_I[px][j] + rbout_I[px][j + 1] + rbout_I[cx][j - 1] + rbout_I[cx][j] + rbout_I[cx][j + 1] + rbout_I[nx][j - 1] + rbout_I[nx][j] + rbout_I[nx][j + 1]) / 9;
row_Q[j] = (rbout_Q[px][j - 1] + rbout_Q[px][j] + rbout_Q[px][j + 1] + rbout_Q[cx][j - 1] + rbout_Q[cx][j] + rbout_Q[cx][j + 1] + rbout_Q[nx][j - 1] + rbout_Q[nx][j] + rbout_Q[nx][j + 1]) / 9;
@@ -3501,26 +3509,15 @@ void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, int row
row_I[W - 1] = rbout_I[cx][W - 1];
row_Q[W - 1] = rbout_Q[cx][W - 1];
convert_row_to_RGB (im->r(row_to - 1), im->g(row_to - 1), im->b(row_to - 1), rbconv_Y[cx], row_I, row_Q, W);
-
- delete [] row_I;
- delete [] row_Q;
- delete [] pre1_I;
- delete [] pre2_I;
- delete [] post1_I;
- delete [] post2_I;
- delete [] pre1_Q;
- delete [] pre2_Q;
- delete [] post1_Q;
- delete [] post2_Q;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// correction_YIQ_LQ
-void RawImageSource::processFalseColorCorrection (Imagefloat* im, int steps)
+void RawImageSource::processFalseColorCorrection (Imagefloat* im, const int steps)
{
- if (im->height < 4) {
+ if (im->height < 4 || steps < 1) {
return;
}
diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h
index 3cb345536..35da831a0 100644
--- a/rtengine/rawimagesource.h
+++ b/rtengine/rawimagesource.h
@@ -95,7 +95,7 @@ protected:
void hphd_vertical (float** hpmap, int col_from, int col_to);
void hphd_horizontal (float** hpmap, int row_from, int row_to);
void hphd_green (float** hpmap);
- void processFalseColorCorrectionThread (Imagefloat* im, int row_from, int row_to);
+ void processFalseColorCorrectionThread (Imagefloat* im, const int row_from, const int row_to);
void hlRecovery (std::string method, float* red, float* green, float* blue, int i, int sx1, int width, int skip, const RAWParams &raw, float* hlmax);
int defTransform (int tran);
void transformRect (PreviewProps pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw);
@@ -206,9 +206,9 @@ public:
protected:
typedef unsigned short ushort;
- void processFalseColorCorrection (Imagefloat* i, int steps);
- inline void convert_row_to_YIQ (float* r, float* g, float* b, float* Y, float* I, float* Q, int W);
- inline void convert_row_to_RGB (float* r, float* g, float* b, float* Y, float* I, float* Q, int W);
+ void processFalseColorCorrection (Imagefloat* i, const int steps);
+ inline void convert_row_to_YIQ (const float* const r, const float* const g, const float* const b, float* Y, float* I, float* Q, const int W);
+ inline void convert_row_to_RGB (float* r, float* g, float* b, const float* const Y, const float* const I, const float* const Q, const int W);
inline void convert_to_cielab_row (float* ar, float* ag, float* ab, float* oL, float* oa, float* ob);
inline void interpolate_row_g (float* agh, float* agv, int i);
diff --git a/rtengine/rawimagesource_i.h b/rtengine/rawimagesource_i.h
index a3cd28253..83e834924 100644
--- a/rtengine/rawimagesource_i.h
+++ b/rtengine/rawimagesource_i.h
@@ -22,26 +22,32 @@
#include "rawimagesource.h"
-#include "curves.h"
-
namespace rtengine
{
-inline void RawImageSource::convert_row_to_YIQ (float* r, float* g, float* b, float* Y, float* I, float* Q, int W)
+inline void RawImageSource::convert_row_to_YIQ (const float* const r, const float* const g, const float* const b, float* Y, float* I, float* Q, const int W)
{
+#ifdef _OPENMP
+ #pragma omp simd
+#endif
+
for (int j = 0; j < W; j++) {
- Y[j] = .299 * r[j] + .587 * g[j] + .114 * b[j];
- I[j] = .596 * r[j] - .275 * g[j] - .321 * b[j];
- Q[j] = .212 * r[j] - .523 * g[j] + .311 * b[j];
+ Y[j] = .299f * r[j] + .587f * g[j] + .114f * b[j];
+ I[j] = .596f * r[j] - .275f * g[j] - .321f * b[j];
+ Q[j] = .212f * r[j] - .523f * g[j] + .311f * b[j];
}
}
-inline void RawImageSource::convert_row_to_RGB (float* r, float* g, float* b, float* Y, float* I, float* Q, int W)
+inline void RawImageSource::convert_row_to_RGB (float* r, float* g, float* b, const float* const Y, const float* const I, const float* const Q, const int W)
{
+#ifdef _OPENMP
+ #pragma omp simd
+#endif
+
for (int j = 1; j < W - 1; j++) {
- r[j] = Y[j] + 0.956 * I[j] + 0.621 * Q[j];
- g[j] = Y[j] - 0.272 * I[j] - 0.647 * Q[j];
- b[j] = Y[j] - 1.105 * I[j] + 1.702 * Q[j];
+ r[j] = Y[j] + 0.956f * I[j] + 0.621f * Q[j];
+ g[j] = Y[j] - 0.272f * I[j] - 0.647f * Q[j];
+ b[j] = Y[j] - 1.105f * I[j] + 1.702f * Q[j];
}
}
diff --git a/tools/buildRT b/tools/buildRT
index ca7756358..66ed43894 100755
--- a/tools/buildRT
+++ b/tools/buildRT
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Written by DrSlony
-# buildRT version 4.3, 2015-03-11
-# Please report bugs or enhancements to http://code.google.com/p/rawtherapee/issues/list
+# buildRT version 4.4, 2016-03-03
+# Please report bugs or enhancements to https://github.com/Beep6581/RawTherapee/issues
# www.rawtherapee.com
# www.londonlight.org
@@ -34,7 +34,7 @@ while getopts "bc:fnp:s:t:uvh?-" opt; do
case "${opt}" in
b) patched="yes"
movetoPatched="_patched"
- printf "%s\n" "Buildonly flag detected, will not hg pull or update" ;;
+ printf "%s\n" "Buildonly flag detected, will not git pull or checkout" ;;
c) dCacheNameSuffix="$OPTARG"
dCacheNameSuffix=${dCacheNameSuffix//[^\.\-_a-zA-Z0-9]/};
forceCmake="yes"
@@ -55,7 +55,7 @@ while getopts "bc:fnp:s:t:uvh?-" opt; do
t) titleSuffix="${OPTARG//[^\.\-\:\ \+_a-zA-Z0-9]/}"
forceCmake="yes"
printf "%s\n" "Titlebar version suffix: ${titleSuffix}" ;;
- u) gcVer="$(curl "http://rawtherapee.googlecode.com/hg/tools/buildRT" 2>/dev/null | grep "^#.*[vV]ersion.*")" || { echo "\"curl\" program not found, please install it first."; exit 1; }
+ u) gcVer="$(curl "https://raw.githubusercontent.com/Beep6581/RawTherapee/master/tools/buildRT" 2>/dev/null | grep "^#.*[vV]ersion.*")" || { echo "\"curl\" program not found, please install it first."; exit 1; }
gcVer="${gcVer##*[[:alpha:]] }"
gcVer="${gcVer%%,*}"
latestVer="$(printf "%s\n" "$version" "$gcVer" | sort -rV | head -n 1)"
@@ -63,7 +63,7 @@ while getopts "bc:fnp:s:t:uvh?-" opt; do
printf "%s\n" "You are using the latest version of buildRT, $version"
exit 0
else
- printf "%s\n" "You are using version $version but version $gcVer is available on Google Code." "You can download the Google Code version from this URL:" " https://rawtherapee.googlecode.com/hg/tools/buildRT" "Replace it with this script, and remember to run \"chmod +x buildRT\""
+ printf "%s\n" "You are using version $version but version $gcVer is available on GitHub." "You can download the GitHub version from this URL:" " https://raw.githubusercontent.com/Beep6581/RawTherapee/master/tools/buildRT" "Replace it with this script, and remember to run \"chmod +x buildRT\""
exit 0
fi ;;
v) verbose=yes
@@ -71,7 +71,7 @@ while getopts "bc:fnp:s:t:uvh?-" opt; do
h|\?|-) printf "%s\n" "Usage:" "" " $0 [-b] [-c ] [-f] [-n] [-p <1-9>] [-s ] [-t \"\"] [-v]" ""
printf "%s\n" \
" -b" \
- "Build-only mode. buildRT uses \"hg update -C default\" to update your source code repository to the newest revision, however doing so might destroy any uncommitted or unpushed changes you made or any patches you applied. With the -b flag the script will not update the source code, so that you can easily compile RawTherapee with whatever patches you manually applied. buildRT should automatically detect if you modified the source code, but you can use this flag to force build-only mode." "Generally when compiling patched RT versions you want to keep the cache and config folders separate, so consider using \"-b -c _testing\"" "" \
+ "Build-only mode. buildRT uses \"git checkout master\" to update your source code repository to the newest revision, however doing so might destroy any uncommitted or unpushed changes you made or any patches you applied. With the -b flag the script will not update the source code, so that you can easily compile RawTherapee with whatever patches you manually applied. buildRT should automatically detect if you modified the source code, but you can use this flag to force build-only mode." "Generally when compiling patched RT versions you want to keep the cache and config folders separate, so consider using \"-b -c _testing\"" "" \
" -c " \
"Specify a suffix to the cache and config directory names. Only alphanumerics, periods, dashes and underscores are valid. The default value is \"4\", which will result in your build of RawTherapee storing the cache in \"${HOME}/.cache/RawTherapee4\" and config in \"${HOME}/.config/RawTherapee4\". For example, use \"-c _testing\" if you want to test older or patched versions of RawTherapee without potentially damaging your \"real\" cache and config files." "" \
" -f" \
@@ -85,7 +85,7 @@ while getopts "bc:fnp:s:t:uvh?-" opt; do
" -t \"\"" \
"Suffix displayed next to the RawTherapee version in the window titlebar. It is recommended that you include the changeset of the newest public commit (the one you would see if you cloned the repository anew) so it is clear which commit you applied the patches to. E.g.:" "-t \": ee72ddbcfd4e + dustremoval-1.patch + mustafa ibrahim\"" "" \
" -u" \
- "Check for an update of buildRT on Google Code." "" \
+ "Check for an update of buildRT on GitHub." "" \
" -v" \
"Make compilation verbose, so you see all compiler warnings." | fold -s
exit 0 ;;
@@ -181,14 +181,19 @@ fi
printf "%s\n" "System: ${bits}-bit" ""
#--- Check script dependencies
-hash hg 2>/dev/null || { echo >&2 "Mercurial not found, install Mercurial first and then re-run this script."; exit 1; }
+hash git 2>/dev/null || { echo >&2 "Git not found, install Git first and then re-run this script."; exit 1; }
#--- Clone and/or pull
if [[ ! -d "${repo}" ]]; then
- printf "%s\n" "${repo} not found, cloning from GoogleCode..."
- hg clone https://rawtherapee.googlecode.com/hg/ "${repo}"
+ printf "%s\n" "${repo} not found, cloning from GitHub..."
+ git clone https://github.com/Beep6581/RawTherapee.git "${repo}"
cd "${repo}" || exit 1
- hg parents --template '\nRepository state:\n Branch: {branch}\n RawTherapee-{latesttag}.{latesttagdistance}\n Changeset: {rev}:{node|short}\n Latest tag: {latesttag}\n\n'
+ verLatesttag="$(git describe --tags --abbrev=0)"
+ verLatesttagdistance="$(git describe --tags | sed -e 's/.*-\([0-9]\+\)-.*/\1/')"
+ currentBranch="$(git branch | grep "*" | sed -e 's/.* \+//')"
+ rev="$(git rev-list --all --count)"
+ node="$(git rev-parse --short HEAD)"
+ printf "\nRepository state:\n Branch: ${currentBranch}\n RawTherapee-${verLatesttag}.${verLatesttagdistance}\n Changeset: ${rev}:${node}\n Latest tag: ${verLatesttag}\n\n"
alert "Repository cloned succesfully. What would you like to do next?"
printf "%b" "Repository cloned succesfully.\n" "Press 'q' to quit or any other key to continue... "
read -r -n 1
@@ -198,21 +203,20 @@ fi
cd "${repo}" || exit 1
#--- Update or decide what to do if user edited the source code (e.g. by applying a patch)
-# "hg outgoing" takes time, so skip if buildonly
if [[ -z $patched ]]; then
- uncommitted="$(hg status | sed "s/^/\t/")"
- unpushed="$(hg outgoing -q | sed "s/^/\t/" || echo "Could not check for unpushed changes (check your internet connection), but continuing anyway.")"
+ uncommitted="$(git status -s | sed "s/^/\t/")"
+ unpushed="$(git log origin..HEAD | sed "s/^/\t/" || echo "Could not check for unpushed changes (check your internet connection), but continuing anyway.")"
fi
if [[ -z $uncommitted && -z $unpushed && -z $patched ]]; then
- hg pull || echo "Could not \"hg pull\" (check your internet connection), but continuing anyway."
- hg update -C default
+ git pull || echo "Could not \"git pull\" (check your internet connection), but continuing anyway."
+ git checkout master
echo
elif [[ -z $patched ]]; then
printf "%s\n" "" "Warning! There are uncommitted or unpushed changes in the repository!" "Uncommitted:" "$uncommitted" "Unpushed:" "$unpushed" "" "This means that you edited the source code (e.g. applied a patch). If the script proceeds to update the repository, those changes you made to the source code might be lost. Your choices are to force the update and possibly lose the changes, not to update and to compile RT as-is, or to abort the script." | fold -s
read -r -p "[f]orce update, [c]ompile as-is, or [a]bort? " fca
case $fca in
- f|F) hg pull || echo "Could not \"hg pull\" (check your internet connection), but continuing anyway."
- hg update -C default
+ f|F) git pull || echo "Could not \"git pull\" (check your internet connection), but continuing anyway."
+ git checkout master
echo ;;
c|C) printf "%s\n" "Retaining edited source code and compiling RT as-is." ""
patched="yes"
@@ -228,16 +232,23 @@ else
movetoPatched="_patched"
fi
fi
-hg parents --template 'Repository state:\n Branch: {branch}\n RawTherapee-{latesttag}.{latesttagdistance}\n Changeset: {rev}:{node|short}\n Latest tag: {latesttag}\n\n'
+
+cd "${repo}" || exit 1
+verLatesttag="$(git describe --tags --abbrev=0)"
+verLatesttagdistance="$(git describe --tags | sed -e 's/.*-\([0-9]\+\)-.*/\1/')"
+currentBranch="$(git branch | grep "*" | sed -e 's/.* \+//')"
+rev="$(git rev-list --all --count)"
+node="$(git rev-parse --short HEAD)"
+printf "\nRepository state:\n Branch: ${currentBranch}\n RawTherapee-${verLatesttag}.${verLatesttagdistance}\n Changeset: ${rev}:${node}\n Latest tag: ${verLatesttag}\n\n"
#--- Print the menu
branches=()
if [[ -z $patched ]]; then
while read -r branch; do
branches+=("$branch")
- done < <(hg branches -aq | sort -f)
+ done < <(git branch -a | grep origin | sed -e 's/.*\///'| sort -uf)
else
- branches="$(hg branch)"
+ branches="$(git branch | grep "*" | sed -e 's/.* \+//')"
fi
# Make the menu list
@@ -302,11 +313,10 @@ for choiceNumber in "${choiceNumbers[@]}"; do
# if [[ -z $patched && $branch != default ]]; then
if [[ -z $patched ]]; then
printf "%s\n" "Updating to branch $branch"
- hg update -C "$branch" || exit 1
+ git checkout "$branch" || exit 1
fi
echo
printf "%-15b %b\n" "\E[1mWill compile\E[0m:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget" ""
- rev="$(hg parents --template {rev})"
[[ -d "${HOME}/rt_${branch}_${buildType}${movetoPatched}" ]] && {
printf "%s\n" "Found old build directory ${HOME}/rt_${branch}_${buildType}${movetoPatched}" "To proceed you must either delete it, or choose a suffix for the destination folder for this build."
@@ -327,8 +337,6 @@ for choiceNumber in "${choiceNumbers[@]}"; do
cd "${repo}" || exit 1
- verLatesttag="$(hg parents --template '{latesttag}')"
- verLatesttagdistance="$(hg parents --template '{latesttagdistance}')"
[[ -z $dCacheNameSuffix ]] && dCacheNameSuffix="${verLatesttag%%.*}"
# need to rerun cmake if buildtype changed