On Tue 21-Jul-2015 at 11:13 -0700, Thomas Modes wrote:

I did a first test. A git repository of Hugin can found now at launchpad.
For details see https://code.launchpad.net/hugin
Maybe it needs some more polishing (volunteer welcome), but for now it's a
working start point, I hope.

Ok, will need some advice here from git experts, I can clone this repository like so:

 git clone https://git.launchpad.net/~hugin-devs/hugin

..but get this error when trying to do anything:

 fatal: bad default revision 'HEAD'

Then this seems to give me the current 2015 branch:

 git checkout branch_2015.0

Separately, cmake fails due to a missing rev.txt file. I'll attach a patch that fixes CMakeLists.txt to create the rev.txt file from git instead of hg (for some reason I can't push to the new git repository).

--
Bruno

--
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/20150721203041.GA14739%40postle.net.
For more options, visit https://groups.google.com/d/optout.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13f31d8..e696552 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,36 +44,26 @@ set(V_MINOR 0)
 set(V_PATCH 0)
 
 #
-# Check for mercurial and get current revision
+# Check for git and get current revision
 #
 
-IF(EXISTS ${PROJECT_SOURCE_DIR}/.hg)
-  FIND_PROGRAM(_hg hg)
-  IF(NOT ${_hg} MATCHES "-NOTFOUND")
-    EXECUTE_PROCESS(COMMAND ${_hg} summary WORKING_DIRECTORY 
"${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE _release 
OUTPUT_STRIP_TRAILING_WHITESPACE)
-    foreach(_v_l ${_release})
-      if(_v_l MATCHES "^.*: *[^0-9]*\([0-9]+\):\([a-z0-9]+\)")
-        set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_1})
-        set(HUGIN_WC_REVISION ${CMAKE_MATCH_2})
-      endif()
-    endforeach()
+IF(EXISTS ${PROJECT_SOURCE_DIR}/.git)
+  FIND_PROGRAM(_git git)
+  IF(NOT ${_git} MATCHES "-NOTFOUND")
+    EXECUTE_PROCESS(COMMAND ${_git} rev-parse --verify --short=12 HEAD 
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE _release 
OUTPUT_STRIP_TRAILING_WHITESPACE)
+    SET(HUGIN_WC_REVISION ${_release})
   ELSE()
     SET(HUGIN_WC_REVISION 0)
   ENDIF()
   SET(HUGIN_PACKAGE_VERSION ${V_MAJOR}.${V_MINOR}.${V_PATCH})
   SET(HUGIN_DEVELOPMENT_VERSION 1)
   FILE(WRITE ${PROJECT_SOURCE_DIR}/rev.txt "${HUGIN_WC_REVISION}")
-  MESSAGE("-- Current HG revision is ${HUGIN_WC_REVISION}")
+  MESSAGE("-- Current GIT revision is ${HUGIN_WC_REVISION}")
 ELSE()
-  IF (EXISTS ${PROJECT_SOURCE_DIR}/.svn)
-    # comment out the following line to compile an old version from the 
subversion repository
-    MESSAGE(FATAL_ERROR "Hugin subversion repository is not up to date. The 
development happens now in mercurial repository. Please switch to mercurial. 
Sorry for the inconsistency")
-  ENDIF()
-
   SET(HUGIN_PACKAGE_VERSION ${V_MAJOR}.${V_MINOR}.${V_PATCH})
   SET(HUGIN_WC_REVISION 0)
   FILE(READ "${PROJECT_SOURCE_DIR}/rev.txt" HUGIN_WC_REVISION)
-  MESSAGE("-- Current HG revision is ${HUGIN_WC_REVISION}")
+  MESSAGE("-- Current GIT revision is ${HUGIN_WC_REVISION}")
   MESSAGE("-- Assuming this is a tarball (release) build for 
${HUGIN_PACKAGE_VERSION}")
   SET(HUGIN_DEVELOPMENT_VERSION 0)
 ENDIF()

Reply via email to