Replace "svn" with "git" all over the place.
authorGerald Combs <gerald@wireshark.org>
Fri, 7 Feb 2014 19:14:52 +0000 (11:14 -0800)
committerGerald Combs <gerald@wireshark.org>
Fri, 7 Feb 2014 23:03:03 +0000 (23:03 +0000)
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.

Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
36 files changed:
.gitignore
CMakeLists.txt
Makefile.am
Makefile.common
Makefile.nmake
capinfos.c
captype.c
config.nmake
doc/README.packaging
docbook/check_git_version.sh
dumpcap.c
echld/dispatcher.c
editcap.c
epan/CMakeLists.txt
file.c
make-version.pl
mergecap.c
rawshark.c
reordercap.c
text2pcap.c
tfshark.c
tools/checklicenses.py
tshark.c
ui/gtk/about_dlg.c
ui/gtk/file_import_dlg.c
ui/gtk/follow_stream.c
ui/gtk/main.c
ui/gtk/main_titlebar.c
ui/gtk/main_welcome.c
ui/gtk/summary_dlg.c
ui/qt/about_dialog.cpp
ui/qt/main.cpp
ui/qt/summary_dialog.cpp
ui/tap_export_pdu.c
version_info.c
version_info.h

index 81e8f0152dd56da3562643bca5123f368d1a1e04..1942e065d832514f892d2101627de9a88e06e19b 100644 (file)
@@ -40,7 +40,7 @@ epan/ps.c
 ui/cli/tshark-tap-register-cache.pkl
 plugin.c
 plugins/mate/mate_parser.c
-svnversion.h
+version.h
 tools/lemon/lemon
 tools/lemon/lemon
 tools/setuid-root.pl
index f6dc55cb89586fbbbd621c5731a7c1d53713d189..a7aeeaa20137bea7309d7e4c9c3f7235d85944b1 100644 (file)
@@ -781,17 +781,17 @@ link_directories(
 )
 
 ADD_CUSTOM_TARGET(
-       svnversion ALL
+       gitversion ALL
        COMMAND ${PERL_EXECUTABLE}
                ${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
                ${CMAKE_CURRENT_SOURCE_DIR}
        DEPENDS
                ${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
 )
-set_target_properties(svnversion PROPERTIES FOLDER "Auxiliary")
+set_target_properties(gitversion PROPERTIES FOLDER "Auxiliary")
 
 ADD_CUSTOM_COMMAND(
-       OUTPUT  svnversion.h
+       OUTPUT  version.h
        COMMAND ${PERL_EXECUTABLE}
                ${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
                ${CMAKE_CURRENT_SOURCE_DIR}
@@ -826,7 +826,7 @@ set(SHARK_COMMON_SRC
        cfutils.c
        clopts_common.c
        frame_tvbuff.c
-       svnversion.h
+       version.h
        sync_pipe_write.c
        version_info.c
 )
@@ -980,7 +980,7 @@ if(BUILD_wireshark AND GTK_FOUND)
        # qtshark and wireshark share wireshark_FILES
 
        add_executable(wireshark ${wireshark_FILES})
-       add_dependencies(wireshark svnversion)
+       add_dependencies(wireshark gitversion)
        set_target_properties(wireshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(wireshark PROPERTIES FOLDER "Executables")
        target_link_libraries(wireshark ${wireshark_LIBS})
@@ -1003,7 +1003,7 @@ if(BUILD_qtshark AND QT_FOUND)
        # qtshark and wireshark share wireshark_FILES
 
        add_executable(qtshark ${wireshark_FILES})
-       add_dependencies(qtshark svnversion)
+       add_dependencies(qtshark gitversion)
        set_target_properties(qtshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(qtshark PROPERTIES FOLDER "Executables")
        target_link_libraries(qtshark ${qtshark_LIBS})
@@ -1031,7 +1031,7 @@ if(BUILD_tshark)
                ${SHARK_COMMON_SRC}
        )
        add_executable(tshark ${tshark_FILES})
-       add_dependencies(tshark svnversion)
+       add_dependencies(tshark gitversion)
        set_target_properties(tshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(tshark PROPERTIES FOLDER "Executables")
        target_link_libraries(tshark ${tshark_LIBS})
@@ -1053,7 +1053,7 @@ if(BUILD_tfshark)
                ${SHARK_COMMON_SRC}
        )
        add_executable(tfshark ${tfshark_FILES})
-       add_dependencies(tfshark svnversion)
+       add_dependencies(tfshark gitversion)
        set_target_properties(tfshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(tfshark PROPERTIES FOLDER "Executables")
        target_link_libraries(tfshark ${tfshark_LIBS})
@@ -1072,7 +1072,7 @@ if(BUILD_rawshark AND PCAP_FOUND)
                ui/util.c
        )
        add_executable(rawshark ${rawshark_FILES})
-       add_dependencies(rawshark svnversion)
+       add_dependencies(rawshark gitversion)
        set_target_properties(rawshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(rawshark PROPERTIES FOLDER "Executables")
        target_link_libraries(rawshark ${rawshark_LIBS})
@@ -1133,7 +1133,7 @@ if(BUILD_text2pcap)
                text2pcap-scanner.l
        )
        add_executable(text2pcap ${text2pcap_FILES})
-       add_dependencies(text2pcap svnversion)
+       add_dependencies(text2pcap gitversion)
        set_target_properties(text2pcap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(text2pcap PROPERTIES FOLDER "Executables")
        target_link_libraries(text2pcap ${text2pcap_LIBS})
@@ -1148,10 +1148,10 @@ if(BUILD_mergecap)
        )
        set(mergecap_FILES
                mergecap.c
-               svnversion.h
+               version.h
        )
        add_executable(mergecap ${mergecap_FILES})
-       add_dependencies(mergecap svnversion)
+       add_dependencies(mergecap gitversion)
        set_target_properties(mergecap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(mergecap PROPERTIES FOLDER "Executables")
        target_link_libraries(mergecap ${mergecap_LIBS})
@@ -1166,10 +1166,10 @@ if(BUILD_reordercap)
        )
        set(reordercap_FILES
                reordercap.c
-               svnversion.h
+               version.h
        )
        add_executable(reordercap ${reordercap_FILES})
-       add_dependencies(reordercap svnversion)
+       add_dependencies(reordercap gitversion)
        set_target_properties(reordercap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(reordercap PROPERTIES FOLDER "Executables")
        target_link_libraries(reordercap ${reordercap_LIBS})
@@ -1188,7 +1188,7 @@ if(BUILD_capinfos)
                capinfos.c
        )
        add_executable(capinfos ${capinfos_FILES})
-       add_dependencies(capinfos svnversion)
+       add_dependencies(capinfos gitversion)
        set_target_properties(capinfos PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(capinfos PROPERTIES FOLDER "Executables")
        target_link_libraries(capinfos ${capinfos_LIBS})
@@ -1206,7 +1206,7 @@ if(BUILD_captype)
                captype.c
        )
        add_executable(captype ${captype_FILES})
-       add_dependencies(captype svnversion)
+       add_dependencies(captype gitversion)
        set_target_properties(captype PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(captype PROPERTIES FOLDER "Executables")
        target_link_libraries(captype ${captype_LIBS})
@@ -1223,7 +1223,7 @@ if(BUILD_editcap)
                editcap.c
        )
        add_executable(editcap ${editcap_FILES})
-       add_dependencies(editcap svnversion)
+       add_dependencies(editcap gitversion)
        set_target_properties(editcap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(editcap PROPERTIES FOLDER "Executables")
        target_link_libraries(editcap ${editcap_LIBS})
@@ -1245,7 +1245,7 @@ if(BUILD_dumpcap AND PCAP_FOUND)
                ${NL_LIBRARIES}
        )
        set(dumpcap_FILES
-               svnversion.h
+               version.h
                capture_opts.c
                capture-pcap-util.c
                capture_stop_conditions.c
@@ -1261,7 +1261,7 @@ if(BUILD_dumpcap AND PCAP_FOUND)
                ${PLATFORM_PCAP_SRC}
        )
        add_executable(dumpcap ${dumpcap_FILES})
-       add_dependencies(dumpcap svnversion)
+       add_dependencies(dumpcap gitversion)
        set_target_properties(dumpcap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
        set_target_properties(dumpcap PROPERTIES FOLDER "Executables")
        target_link_libraries(dumpcap ${dumpcap_LIBS})
@@ -1432,6 +1432,7 @@ install(
                WORLD_EXECUTE WORLD_READ
        DESTINATION
                ${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}
+       PATTERN ".git" EXCLUDE
        PATTERN ".svn" EXCLUDE
        PATTERN "Makefile.*" EXCLUDE
        PATTERN "faq.py" EXCLUDE
index 7b2277716aced91bad2ecefdb245999ff67c9fea..5df045c0927e6a4f91af61a97b8d806daa09fd82 100644 (file)
@@ -632,7 +632,7 @@ am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
 am__v_PERL_0 = @echo "  PERL    " $@;
 am__v_PERL_1 =
 
-svnversion.h: FORCE
+version.h: FORCE
        $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
 
 #
@@ -655,7 +655,7 @@ CLEANFILES =                \
        vgcore.*
 
 #
-# We have to remove svnversion.h with "make distclean", as, otherwise,
+# We have to remove version.h with "make distclean", as, otherwise,
 # "make distcheck" fails.  We still need to make the tarballs work
 # even if you do "make distclean" and try to rebuild; that's a work in
 # progress.
@@ -666,7 +666,7 @@ CLEANFILES =                \
 #
 DISTCLEANFILES = \
        ps.c                    \
-       svnversion.h
+       version.h
 
 MAINTAINERCLEANFILES =         \
        $(GENERATED_FILES)      \
index f47aa9389e034bf3ea1ba47418f45aa25e6a919f..e585a06601e9639c6bb4be7b018128665f572ab7 100644 (file)
@@ -25,7 +25,7 @@
 
 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
 BUILT_HEADER_FILES =   \
-       svnversion.h
+       version.h
 
 BUILT_C_FILES =
 
@@ -54,7 +54,7 @@ SHARK_COMMON_SRC =    \
 
 # corresponding headers
 SHARK_COMMON_INCLUDES =        \
-       svnversion.h            \
+       version.h               \
        capture-pcap-util.h     \
        capture-pcap-util-int.h \
        cfile.h                 \
@@ -156,7 +156,7 @@ editcap_SOURCES = \
 # reordercap specifics
 reordercap_SOURCES = \
        reordercap.c \
-       svnversion.h
+       version.h
 
 # capinfos specifics
 capinfos_SOURCES = \
index 99ce77398114377965f4e023cccaa4c616e6934a..09662e9cd881eefb3fc4bf0e9bcaf76e8ce4aa57 100644 (file)
@@ -537,15 +537,18 @@ QMAKE_LFLAGS         *= /LARGEADDRESSAWARE $(LDFLAGS)
 #
 # Build the version string
 #
-!IF EXIST(".svn/wc.db")
-SVNENTRIES = .svn/wc.db
+# XXX - Makefile.am uses FORCE for this.
+!IF EXIST(".git/index")
+GITINDEX = .git/index
+!ELSE IF EXIST(".svn/wc.db")
+GITINDEX = .svn/wc.db
 !ELSE IF EXIST(".svn/entries")
-SVNENTRIES = .svn/entries
+GITINDEX = .svn/entries
 !ELSE
-SVNENTRIES =
+GITINDEX =
 !ENDIF
-svnversion.h: $(SVNENTRIES)
-       rm -f svnversion.h
+version.h: $(GITINDEX)
+       rm -f version.h
        $(PERL) make-version.pl
 
 
@@ -557,9 +560,9 @@ text2pcap-scanner.obj : text2pcap-scanner.c
 
 #
 # The following targets will rebuild their respective objs
-# if and when svnversion.h should change.
+# if and when version.h should change.
 #
-text2pcap.obj mergecap.obj capinfos.obj captype.obj editcap.obj reordercap.obj version_info.obj: svnversion.h
+text2pcap.obj mergecap.obj capinfos.obj captype.obj editcap.obj reordercap.obj version_info.obj: version.h
 
 
 clean-local:
@@ -808,12 +811,12 @@ codecs::
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
 
-ui:: help config.h svnversion.h doxygen
+ui:: help config.h version.h doxygen
        cd ui
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
        cd ..
 
-gtk:: help config.h svnversion.h doxygen
+gtk:: help config.h version.h doxygen
        cd ui/gtk
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui.lib
        cd ../..
@@ -821,7 +824,7 @@ gtk:: help config.h svnversion.h doxygen
 # The Visual C++ static analyzer currently fails with error C2171
 # when compiling summary_dialog.cpp. If/when this ever gets fixed
 # we can remove the ENABLE_CODE_ANALYSIS check.
-qt:: help config.h svnversion.h doxygen
+qt:: help config.h version.h doxygen
 !IFDEF QT5_BASE_DIR
        cd ui/qt
        $(QT5_BASE_DIR)\bin\qmake CONFIG+=release QtShark.pro
@@ -838,7 +841,7 @@ win32::
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui_win32.lib
        cd ../..
 
-cli:: help config.h svnversion.h doxygen
+cli:: help config.h version.h doxygen
        cd ui/cli
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libcliui.lib
        cd ../..
@@ -935,7 +938,7 @@ check_libs:
 #  If $(CHECK_TAG) is non-null then checktag failed; Exit with an error message. (See beginning of this Makefile).
 #  Otherwise do detailed library package files verification only if Makefile.nmake or config.make have been updated
 #  (or dummy file doesn't exist because of 'make clean' or whatever).
-#  Note that the creation/modification time of a file after an svn update of that file
+#  Note that the creation/modification time of a file after a git pull of that file
 #   is the time of the update (not the time of the file in the repository).
 # touch is only called if libverify succeeds.
 $(LIBS_CHECK):  $(CHECK_TAG) config.nmake Makefile.nmake
index c3de1f74161660f675453b275b956c4f2159c92a..0a600a08b496d7081c52e04f21dee6a95f05be4d 100644 (file)
 #include <wsutil/unicode-utils.h>
 #endif /* _WIN32 */
 
-#include "svnversion.h"
+#include "version.h"
 
 /*
  * By default capinfos now continues processing
@@ -1005,8 +1005,8 @@ usage(gboolean is_error)
   }
 
   fprintf(output, "Capinfos %s"
-#ifdef SVNVERSION
-      " (" SVNVERSION " from " SVNPATH ")"
+#ifdef GITVERSION
+      " (" GITVERSION " from " GITBRANCH ")"
 #endif
       "\n", VERSION);
   fprintf(output, "Prints various information (infos) about capture files.\n");
index 1aed705f0201bbcd52d6bd772b2a8ba9ef6b8e2d..885cff4d18594f9e744eadc814a26ba33aadd4de 100644 (file)
--- a/captype.c
+++ b/captype.c
 #include <wsutil/unicode-utils.h>
 #endif /* _WIN32 */
 
-#include "svnversion.h"
+#include "version.h"
 
 static void
 usage(void)
 {
   fprintf(stderr, "Captype %s"
-#ifdef SVNVERSION
-      " (" SVNVERSION " from " SVNPATH ")"
+#ifdef GITVERSION
+      " (" GITVERSION " from " GITBRANCH ")"
 #endif
       "\n", VERSION);
   fprintf(stderr, "Prints the file types of capture files.\n");
index 52cec4fc264095115e8b1b7bc4807094baff958e..8a01829858c155aefa6a21ef9f514d01eb5a6b10 100644 (file)
@@ -29,15 +29,15 @@ WIRESHARK_TARGET_PLATFORM=win32
 
 ##### Versions #####
 
-# The SVN revision of our build. Updated by make-version.pl
-SVN_REVISION=0
+# The Git description of our build. Updated by make-version.pl
+GIT_REVISION=0
 
 # The current Wireshark version. Recommended: Leave unchanged.
 # Updated by make-version.pl
 VERSION_MAJOR=1
 VERSION_MINOR=11
 VERSION_MICRO=3
-VERSION_BUILD=$(SVN_REVISION)
+VERSION_BUILD=$(GIT_REVISION)
 
 # Local build information. Recommended: Unique string for your
 # environment, e.g. "-JackStackBarbecue". Updated by make-version.pl
@@ -1308,7 +1308,7 @@ LYNX=lynx
 # The RC_VERSION should be comma-separated, not dot-separated,
 # as per Graham Bloice's message in
 #
-#      http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html
+#      http://www.wireshark.org/lists/ethereal-dev/200303/msg00283.html
 #
 # "The RC_VERSION variable in config.nmake should be comma separated.
 # This allows the resources to be built correctly and the version
index a50bc8424031d6b7b289e93fe00d39a8989791b7..4f882b65db7486363bff644224c1c473a9fa2295 100644 (file)
@@ -93,7 +93,7 @@ you use this to differentiate it from official Wireshark releases.
 
 4.1. Source-level version detection.
 
-The SVN version corresponding to each release is in svnversion.h. It's
+The Git version corresponding to each release is in version.h. It's
 defined as a string. If you need a numeric definition, let us know.
 
 5. Trademarks.
index c26c1e7812500750a91251bac1083c21974dd47d..f7322559ca484a742ac233fb36fbddd942065156 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Check for SVN version
+# Check for Git version
 #
 # $Id$
 #
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
-#if [ -d ../.git ] ; then
-#    GIT_VERSION=`git describe --tags --dirty`
-#fi
-#echo '<!ENTITY GitVersion "'${GIT_VERSION}'">' > git_version_tmp.xml
+if [ -d ../.git ] ; then
+    GIT_VERSION=`git describe --tags --dirty`
+fi
+echo '<!ENTITY GitVersion "'${GIT_VERSION}'">' > git_version_tmp.xml
 
-echo -n '<!ENTITY GitVersion "' > git_version_tmp.xml
-[ -x svnversion ] && svnversion -n .                   >> git_version_tmp.xml
-echo '">'   >> git_version_tmp.xml
+#echo -n '<!ENTITY GitVersion "' > git_version_tmp.xml
+#[ -x svnversion ] && svnversion -n .                   >> git_version_tmp.xml
+#echo '">'   >> git_version_tmp.xml
 
 # /dev/null buries the output of the "cmp" command.
 diff git_version.xml git_version_tmp.xml &> /dev/null
index fed35de3a0073f4fd7988090a78e257c2a013cad..ca282986ea52aa1c826f60893c80a31ba71c25b3 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -480,7 +480,7 @@ print_usage(gboolean print_ver)
                 "Dumpcap " VERSION "%s\n"
                 "Capture network packets and dump them into a pcapng file.\n"
                 "See http://www.wireshark.org for more information.\n",
-                wireshark_svnversion);
+                wireshark_gitversion);
     } else {
         output = stderr;
     }
@@ -570,7 +570,7 @@ show_version(GString *comp_info_str, GString *runtime_info_str)
         "%s\n"
         "%s\n"
         "See http://www.wireshark.org for more information.\n",
-        wireshark_svnversion, get_copyright_info(), comp_info_str->str, runtime_info_str->str);
+        wireshark_gitversion, get_copyright_info(), comp_info_str->str, runtime_info_str->str);
 }
 
 /*
@@ -2872,7 +2872,7 @@ capture_loop_init_output(capture_options *capture_opts, loop_data *ld, char *err
             os_info_str = g_string_new("");
             get_os_version_info(os_info_str);
 
-            g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_svnversion);
+            g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_gitversion);
             successful = pcapng_write_session_header_block(ld->pdh,
                                 (const char *)capture_opts->capture_comment,   /* Comment*/
                                 NULL,                        /* HW*/
@@ -3365,7 +3365,7 @@ do_file_switch_or_stop(capture_options *capture_opts,
                 os_info_str = g_string_new("");
                 get_os_version_info(os_info_str);
 
-                g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_svnversion);
+                g_snprintf(appname, sizeof(appname), "Dumpcap " VERSION "%s", wireshark_gitversion);
                 successful = pcapng_write_session_header_block(global_ld.pdh,
                                 NULL,                        /* Comment */
                                 NULL,                        /* HW */
@@ -4219,7 +4219,7 @@ main(int argc, char *argv[])
            "%s"
            "\n"
            "%s",
-        wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+        wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
 #ifdef _WIN32
     arg_list_utf_16to8(argc, argv);
index 531abe46ba5822596b9891d4a349aef3816cef26..373bd88a5e275d5ae830d2e5ad84cef13391df1c 100644 (file)
@@ -489,7 +489,7 @@ static void preinit_epan(char* argv0, int (*main)(int, char **)) {
        get_runtime_version_info(runtime_info_str, NULL);
 
        version_long_str = g_strdup_printf("%s%s\n%s\n%s\n%s",
-               version_str, wireshark_svnversion, get_copyright_info(),
+               version_str, wireshark_gitversion, get_copyright_info(),
                comp_info_str->str, runtime_info_str->str);
 
        if (error) {
@@ -498,7 +498,7 @@ static void preinit_epan(char* argv0, int (*main)(int, char **)) {
 
         /* Add it to the information to be reported on a crash. */
        ws_add_crash_info("Echld " VERSION "%s\n%s\n%s",
-               wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+               wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
        init_stuff();
 
index 8c8cee9fb4e83f743f9f1973b9ef2104da341299..48a1ab40aa4076937ca1263c3ea2b7a985421422 100644 (file)
--- a/editcap.c
+++ b/editcap.c
@@ -82,7 +82,7 @@
 #include <wsutil/md5.h>
 #include <wsutil/plugins.h>
 
-#include "svnversion.h"
+#include "version.h"
 
 #include "ringbuffer.h" /* For RINGBUFFER_MAX_NUM_FILES */
 
@@ -676,8 +676,8 @@ usage(gboolean is_error)
         output = stderr;
 
     fprintf(output, "Editcap %s"
-#ifdef SVNVERSION
-        " (" SVNVERSION " from " SVNPATH ")"
+#ifdef GITVERSION
+        " (" GITVERSION " from " GITBRANCH ")"
 #endif
         "\n", VERSION);
     fprintf(output, "Edit and/or translate the format of capture files.\n");
index 37d1694c099ceb83b322d6f9d24ffca20f981ef3..06af1686d184b6d1b90360672ac814fe69a8b7b6 100644 (file)
@@ -1639,7 +1639,7 @@ add_library(epan ${LINK_MODE_LIB}
        ${LIBWIRESHARK_ASM_FILES}
 )
 
-add_dependencies(epan svnversion)
+add_dependencies(epan gitversion)
 
 set(FULL_SO_VERSION "0.0.0")
 
diff --git a/file.c b/file.c
index 1603d95784ad758ff685e448351cf3d5edc6b8c7..87ec088311194393666ba5c157347c8cac60c24a 100644 (file)
--- a/file.c
+++ b/file.c
@@ -2614,7 +2614,7 @@ cf_print_packets(capture_file *cf, print_args_t *print_args)
   callback_args.num_visible_cols = 0;
   callback_args.visible_cols = NULL;
 
-  if (!print_preamble(print_args->stream, cf->filename, wireshark_svnversion)) {
+  if (!print_preamble(print_args->stream, cf->filename, wireshark_gitversion)) {
     destroy_print_stream(print_args->stream);
     return CF_PRINT_WRITE_ERROR;
   }
index 73d038a612e9be6c1187cc3fabbfb844298436d1..5060cd6ebc5cdaceaafad9de92f80f49212ec996 100755 (executable)
@@ -38,7 +38,7 @@
 #
 # If run with the "-r" or "--set-release" argument the AC_INIT macro in
 # configure.ac and the VERSION macro in config.nmake will have the
-# pkg_format template appended to the version number. svnversion.h will
+# pkg_format template appended to the version number. version.h will
 # _not_ be generated if either argument is present.
 #
 # Default configuration:
@@ -47,7 +47,7 @@
 # svn_client: 1
 # format: SVN %Y%m%d%H%M%S
 # pkg_enable: 1
-# pkg_format: -SVN-%#
+# pkg_format: -%#
 
 # XXX - We're pretty dumb about the "%#" substitution, and about having
 # spaces in the package format.
@@ -62,13 +62,14 @@ use Pod::Usage;
 use IO::Handle;
 use English;
 
-my $version_file = 'svnversion.h';
+my $version_file = 'version.h';
 my $package_string = "";
 my $vconf_file = 'version.conf';
 my $tortoise_file = "tortoise_template";
 my $last_change = 0;
-my $revision = 0;
-my $repo_path = "unknown";
+my $num_commits = 0;
+my $commit_id = '';
+my $repo_branch = "unknown";
 my $git_description = undef;
 my $get_svn = 0;
 my $set_svn = 0;
@@ -84,12 +85,12 @@ my %version_pref = (
        "git_client"    => 0,
        "svn_client"    => 1,
        "tortoise_svn"  => 0,
-       "format"        => "SVN %Y%m%d%H%M%S",
+       "format"        => "git %Y%m%d%H%M%S",
        "is_release"    => 0,
 
        # Normal development builds
        "pkg_enable" => 1,
-       "pkg_format" => "-SVN-%#",
+       "pkg_format" => "-%#",
 
        # Development releases
        #"pkg_enable" => 0,
@@ -161,37 +162,43 @@ sub read_repo_info {
                        no warnings "all";
 
                        chomp($line = qx{git --git-dir=$srcdir/.git log -1 --pretty=format:%at});
-                       if (defined($line)) {
+                       if ($? == 0 && length($line) > 1) {
                                $last_change = $line;
                        }
 
-                       # Commits in current (master-1.8) branch. We may want to use
-                       # a different number.
-                       chomp($line = qx{git --git-dir=$srcdir/.git rev-list --count ea19c7f952ce9fc53fe4c223f1d9d6797346258b..HEAD});
-                       if (defined($line)) {
-                               $revision = $line;
+                       # Commits since last annotated tag.
+                       chomp($line = qx{git --git-dir=$srcdir/.git describe --long --always});
+                       if ($? == 0 && length($line) > 1) {
+                               my @parts = split(/-/, $line);
+                               $num_commits = $parts[-2];
+                               $commit_id = $parts[-1];
+                       }
+
+                       # Current short hash prefixed with "g"
+                       chomp($line = qx{git --git-dir=$srcdir/.git rev-parse --short HEAD});
+                       if ($? == 0 && length($line) > 1) {
                        }
 
                        chomp($line = qx{git --git-dir=$srcdir/.git ls-remote --get-url origin});
-                       if (defined($line)) {
+                       if ($? == 0 && length($line) > 1) {
                                $repo_url = $line;
                        }
 
                        # Probably not quite what we're looking for
                        chomp($line = qx{git --git-dir=$srcdir/.git rev-parse --abbrev-ref --symbolic-full-name \@\{upstream\}});
-                       if (defined($line)) {
-                               $repo_path = basename($line);
+                       if ($? == 0 && length($line) > 1) {
+                               $repo_branch = basename($line);
                        }
 
                        chomp($line = qx{git --git-dir=$srcdir/.git describe --dirty --match "v*"});
-                       if (defined($line)) {
+                       if ($? == 0 && length($line) > 1) {
                                $git_description = "wireshark-" . substr($line, 1);
                        }
 
                        1;
                };
 
-               if ($last_change && $revision && $repo_url && $repo_path) {
+               if ($last_change && $num_commits && $repo_url && $repo_branch) {
                        $do_hack = 0;
                }
        } elsif ($version_pref{"svn_client"}) {
@@ -204,7 +211,7 @@ sub read_repo_info {
                                        $last_change = timegm($6, $5, $4, $3, $2 - 1, $1);
                                }
                                if ($line =~ /Last Changed Rev: (\d+)/) {
-                                       $revision = $1;
+                                       $num_commits = $1;
                                }
                                if ($line =~ /URL: (\S+)/) {
                                        $repo_url = $1;
@@ -216,14 +223,14 @@ sub read_repo_info {
                        1;
                };
 
-               if ($last_change && $revision && $repo_url && $repo_root) {
+               if ($last_change && $num_commits && $repo_url && $repo_root) {
                        $do_hack = 0;
                }
        } elsif ($version_pref{"tortoise_svn"}) {
                # Dynamically generic template file needed by TortoiseSVN
                open(TORTOISE, ">$tortoise_file");
-               print TORTOISE "#define SVNVERSION \"\$WCREV\$\"\r\n";
-               print TORTOISE "#define SVNPATH \"\$WCURL\$\"\r\n";
+               print TORTOISE "#define GITVERSION \"\$WCREV\$\"\r\n";
+               print TORTOISE "#define GITBRANCH \"\$WCURL\$\"\r\n";
                close(TORTOISE);
 
                $info_source = "Command line (SubWCRev)";
@@ -237,21 +244,21 @@ sub read_repo_info {
                unlink($tortoise_file);
        }
 
-       if ($revision == 0) {
+       if ($num_commits == 0) {
                # Fall back to config.nmake
                $info_source = "Prodding config.nmake";
                my $filepath = "$srcdir/config.nmake";
                open(CFGNMAKE, "< $filepath") || die "Can't read $filepath!";
                while ($line = <CFGNMAKE>) {
-                       if ($line =~ /^SVN_REVISION=(\d+)/) {
-                               $revision = $1;
+                       if ($line =~ /^GIT_REVISION=(\d+)/) {
+                               $num_commits = $1;
                                $do_hack = 0;
                                last;
                        }
                }
                close (CFGNMAKE);
        }
-       if ($revision == 0 and -d "$srcdir/.git") {
+       if ($num_commits == 0 and -d "$srcdir/.git") {
 
                # Try git...
                eval {
@@ -264,7 +271,7 @@ sub read_repo_info {
                        $line = qx{$info_cmd};
                        if (defined($line)) {
                                if ($line =~ /svn path=.*; revision=(\d+)/) {
-                                       $revision = $1;
+                                       $num_commits = $1;
                                }
                        }
                        $info_cmd = "(cd $srcdir; git log --format='%ad' -n 1 --date=iso)";
@@ -278,13 +285,13 @@ sub read_repo_info {
                        $line = qx{$info_cmd};
                        if (defined($line)) {
                                if ($line =~ /\* (\S+)/) {
-                                       $repo_path = $1;
+                                       $repo_branch = $1;
                                }
                        }
                        1;
                        };
        }
-       if ($revision == 0 and -d "$srcdir/.bzr") {
+       if ($num_commits == 0 and -d "$srcdir/.bzr") {
 
                # Try bzr...
                eval {
@@ -297,8 +304,8 @@ sub read_repo_info {
                                        $last_change = timegm($6, $5, $4, $3, $2 - 1, $1);
                                }
                                if ($line =~ /svn revno: (\d+) \(on (\S+)\)/) {
-                                       $revision = $1;
-                                       $repo_path = $2;
+                                       $num_commits = $1;
+                                       $repo_branch = $2;
                                }
                        }
                        1;
@@ -336,11 +343,11 @@ sub read_repo_info {
                                                if ($line =~ /committed-date="(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)/) {
                                                        $last_change = timegm($6, $5, $4, $3, $2 - 1, $1);
                                                }
-                                               if ($line =~ /revision="(\d+)"/) { $revision = $1; }
+                                               if ($line =~ /revision="(\d+)"/) { $num_commits = $1; }
                                        }
                                        if ($line =~ /\/>/) {
                                                if (($svn_name eq "" || $svn_name eq "svn:this_dir") &&
-                                                               $last_change && $revision) {
+                                                               $last_change && $num_commits) {
                                                        $in_entries = 0;
                                                        last;
                                                }
@@ -354,19 +361,20 @@ sub read_repo_info {
 
        # If we picked up the revision and modification time,
        # generate our strings.
-       if ($revision && $last_change) {
-               $version_format =~ s/%#/$revision/;
-               $package_format =~ s/%#/$revision/;
+       if ($num_commits && $last_change) {
+               $version_format =~ s/%#/$num_commits/;
+               $package_format =~ s/%#/$num_commits-$commit_id/;
                $package_string = strftime($package_format, gmtime($last_change));
        }
 
        if ($repo_url && $repo_root && index($repo_url, $repo_root) == 0) {
-               $repo_path = substr($repo_url, length($repo_root));
+               $repo_branch = substr($repo_url, length($repo_root));
        }
 
        if ($get_svn) {
                print <<"Fin";
-SVN revision    : $revision
+Commit distance : $num_commits
+Commit ID       : $commit_id
 Revision source : $info_source
 Release stamp   : $package_string
 Fin
@@ -416,8 +424,8 @@ sub update_config_nmake
 
        open(CFGNMAKE, "< $filepath") || die "Can't read $filepath!";
        while ($line = <CFGNMAKE>) {
-               if ($line =~ /^SVN_REVISION=.*([\r\n]+)$/) {
-                       $line = sprintf("SVN_REVISION=%d$1", $revision);
+               if ($line =~ /^GIT_REVISION=.*([\r\n]+)$/) {
+                       $line = sprintf("GIT_REVISION=%d$1", $num_commits);
                } elsif ($set_version && $line =~ /^VERSION_MAJOR=.*([\r\n]+)$/) {
                        $line = sprintf("VERSION_MAJOR=%d$1", $version_pref{"version_major"});
                } elsif ($set_version && $line =~ /^VERSION_MINOR=.*([\r\n]+)$/) {
@@ -574,26 +582,26 @@ sub update_versioned_files
 
 # Print the SVN version to $version_file.
 # Don't change the file if it is not needed.
-sub print_svn_revision
+sub print_GIT_REVISION
 {
-       my $svn_revision;
+       my $GIT_REVISION;
        my $needs_update = 1;
 
        if ($git_description) {
-               $svn_revision = "#define SVNVERSION \"" .
+               $GIT_REVISION = "#define GITVERSION \"" .
                        $git_description . "\"\n" .
-                       "#define SVNPATH \"" . $repo_path . "\"\n";
-       } elsif ($last_change && $revision) {
-               $svn_revision = "#define SVNVERSION \"SVN Rev " .
-                       $revision . "\"\n" .
-                       "#define SVNPATH \"" . $repo_path . "\"\n";
+                       "#define GITBRANCH \"" . $repo_branch . "\"\n";
+       } elsif ($last_change && $num_commits) {
+               $GIT_REVISION = "#define GITVERSION \"Git Rev " .
+                       $num_commits . "\"\n" .
+                       "#define GITBRANCH \"" . $repo_branch . "\"\n";
        } else {
-               $svn_revision = "#define SVNVERSION \"SVN Rev Unknown\"\n" .
-                       "#define SVNPATH \"unknown\"\n";
+               $GIT_REVISION = "#define GITVERSION \"Git Rev Unknown\"\n" .
+                       "#define GITBRANCH \"unknown\"\n";
        }
        if (open(OLDREV, "<$version_file")) {
-               my $old_svn_revision = <OLDREV> . <OLDREV>;
-               if ($old_svn_revision eq $svn_revision) {
+               my $old_GIT_REVISION = <OLDREV> . <OLDREV>;
+               if ($old_GIT_REVISION eq $GIT_REVISION) {
                        $needs_update = 0;
                }
                close OLDREV;
@@ -602,9 +610,9 @@ sub print_svn_revision
        if (! $set_svn) { return; }
 
        if ($needs_update) {
-               # print "Updating $version_file so it contains:\n$svn_revision";
+               # print "Updating $version_file so it contains:\n$GIT_REVISION";
                open(VER, ">$version_file") || die ("Cannot write to $version_file ($!)\n");
-               print VER "$svn_revision";
+               print VER "$GIT_REVISION";
                close VER;
                print "$version_file has been updated.\n";
        } else {
@@ -661,7 +669,7 @@ sub get_config {
 
 &read_repo_info();
 
-&print_svn_revision;
+&print_GIT_REVISION;
 
 if ($set_version || $set_release) {
        if ($set_version) {
@@ -677,7 +685,7 @@ if ($set_version || $set_release) {
                print "Generating release information\n";
        } else {
                print "Resetting release information\n";
-               $revision = 0;
+               $num_commits = 0;
                $package_string = "";
        }
 
@@ -698,7 +706,7 @@ make-version.pl [options] [source directory]
 
     --help, -h                 This help message
     --get-svn, -g              Print the SVN revision and source.
-    --set-svn, -s              Set the information in svnversion.h
+    --set-svn, -s              Set the information in version.h
     --set-version, -v          Set the major, minor, and micro versions in
                                configure.ac, config.nmake, debian/changelog,
                               and docbook/asciidoc.conf.
index 578ab5e3d4ec3061e96f4478f9d2c922bb2f3289..afc3bad29a699c235c80479eae739876b1fd9bbb 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <wiretap/merge.h>
 
-#include "svnversion.h"
+#include "version.h"
 
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
@@ -117,8 +117,8 @@ usage(gboolean is_error)
   }
 
   fprintf(output, "Mergecap %s"
-#ifdef SVNVERSION
-          " (" SVNVERSION " from " SVNPATH ")"
+#ifdef GITVERSION
+          " (" GITVERSION " from " GITBRANCH ")"
 #endif
           "\n", VERSION);
   fprintf(output, "Merge two or more capture files into one.\n");
index 091319324ede19d0b11e2db5acb95dbface29a52..c7f049e07c1a8de3c04944acb4c358f409a912cd 100644 (file)
@@ -195,7 +195,7 @@ print_usage(gboolean print_ver)
                 "See http://www.wireshark.org for more information.\n"
                 "\n"
                 "%s",
-                wireshark_svnversion, get_copyright_info());
+                wireshark_gitversion, get_copyright_info());
     } else {
         output = stderr;
     }
@@ -435,7 +435,7 @@ show_version(GString *comp_info_str, GString *runtime_info_str)
            "%s"
            "\n"
            "%s",
-           wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+           wireshark_gitversion, get_copyright_info(), comp_info_str->str,
            runtime_info_str->str);
 }
 
@@ -486,7 +486,7 @@ main(int argc, char *argv[])
            "%s"
            "\n"
            "%s",
-        wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+        wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
 #ifdef _WIN32
     arg_list_utf_16to8(argc, argv);
index c7706aba03ccce7271ca836e97d9c92f017f4ff7..57741e9ceab44bc6634c5fee24ca7d5238684103 100644 (file)
@@ -53,8 +53,8 @@ static void usage(gboolean is_error)
     }
 
     fprintf(output, "Reordercap %s"
-#ifdef SVNVERSION
-                      " (" SVNVERSION " from " SVNPATH ")"
+#ifdef GITVERSION
+                      " (" GITVERSION " from " GITBRANCH ")"
 #endif
                       "\n", VERSION);
     fprintf(output, "Reorder timestamps of input file frames into output file.\n");
@@ -98,10 +98,10 @@ frame_write(FrameRecord_t *frame, wtap *wth, wtap_dumper *pdh, Buffer *buf,
     gchar  *err_info;
     struct wtap_pkthdr phdr;
 
-    DEBUG_PRINT("\nDumping frame (offset=%" G_GINT64_MODIFIER "u)\n", 
+    DEBUG_PRINT("\nDumping frame (offset=%" G_GINT64_MODIFIER "u)\n",
                 frame->offset);
 
-    
+
     /* Re-read the first frame from the stored location */
     if (!wtap_seek_read(wth, frame->offset, &phdr, buf, &err, &err_info)) {
         if (err != 0) {
index 8ea0223f84f1da2fceb01262dbc78a45316a95e4..95be74de8cce3fa353b50f14f7c75a6bdc409099 100644 (file)
 
 #include "pcapio.h"
 #include "text2pcap.h"
-#include "svnversion.h"
+#include "version.h"
 
 #ifdef _WIN32
 #include <wsutil/unicode-utils.h>
@@ -888,8 +888,8 @@ write_file_header (void)
     gboolean success;
 
     if (use_pcapng) {
-#ifdef SVNVERSION
-        const char *appname = "text2pcap (" SVNVERSION " from " SVNPATH ")";
+#ifdef GITVERSION
+        const char *appname = "text2pcap (" GITVERSION " from " GITBRANCH ")";
 #else
         const char *appname = "text2pcap";
 #endif
@@ -1387,8 +1387,8 @@ usage (gboolean is_error)
 
     fprintf(output,
             "Text2pcap %s"
-#ifdef SVNVERSION
-            " (" SVNVERSION " from " SVNPATH ")"
+#ifdef GITVERSION
+            " (" GITVERSION " from " GITBRANCH ")"
 #endif
             "\n"
             "Generate a capture file from an ASCII hexdump of packets.\n"
index 6e80fb34450b7f83d0bcdc93fb8d083daaea0367..5ed82a8d20eb96fac23949bc60c7193db6be42eb 100644 (file)
--- a/tfshark.c
+++ b/tfshark.c
@@ -203,7 +203,7 @@ print_usage(gboolean print_ver)
         "See http://www.wireshark.org for more information.\n"
         "\n"
         "%s",
-         wireshark_svnversion, get_copyright_info());
+         wireshark_gitversion, get_copyright_info());
   } else {
     output = stderr;
   }
@@ -271,7 +271,7 @@ glossary_option_help(void)
 
   output = stdout;
 
-  fprintf(output, "TFShark " VERSION "%s\n", wireshark_svnversion);
+  fprintf(output, "TFShark " VERSION "%s\n", wireshark_gitversion);
 
   fprintf(output, "\n");
   fprintf(output, "Usage: tfshark -G [report]\n");
@@ -749,7 +749,7 @@ show_version(GString *comp_info_str, GString *runtime_info_str)
          "%s"
          "\n"
          "%s",
-         wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+         wireshark_gitversion, get_copyright_info(), comp_info_str->str,
          runtime_info_str->str);
 }
 
@@ -802,7 +802,7 @@ main(int argc, char *argv[])
          "%s"
          "\n"
          "%s",
-      wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+      wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
 #ifdef _WIN32
   arg_list_utf_16to8(argc, argv);
@@ -2101,7 +2101,7 @@ write_preamble(capture_file *cf)
   switch (output_action) {
 
   case WRITE_TEXT:
-    return print_preamble(print_stream, cf ? cf->filename : NULL, wireshark_svnversion);
+    return print_preamble(print_stream, cf ? cf->filename : NULL, wireshark_gitversion);
 
   case WRITE_XML:
     if (print_details)
index dd4788b43abc00f9079764e48520fe1014d296e4..ba8af699b48ec2396938b6401148dd732106c494 100755 (executable)
@@ -142,7 +142,7 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
     'packaging/macosx': [
         'UNKNOWN',
     ],
-    'svnversion.h': [
+    'version.h': [
         'UNKNOWN',
     ],
     'tools/lemon': [
index 41d5087abcd5dbe6bc8bbe7ee9676d1d03d0f474..ca24911d5848f3fd601a8bdee6ad294237213de4 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -259,7 +259,7 @@ print_usage(gboolean print_ver)
         "See http://www.wireshark.org for more information.\n"
         "\n"
         "%s",
-         wireshark_svnversion, get_copyright_info());
+         wireshark_gitversion, get_copyright_info());
   } else {
     output = stderr;
   }
@@ -381,7 +381,7 @@ glossary_option_help(void)
 
   output = stdout;
 
-  fprintf(output, "TShark " VERSION "%s\n", wireshark_svnversion);
+  fprintf(output, "TShark " VERSION "%s\n", wireshark_gitversion);
 
   fprintf(output, "\n");
   fprintf(output, "Usage: tshark -G [report]\n");
@@ -887,7 +887,7 @@ show_version(GString *comp_info_str, GString *runtime_info_str)
          "%s"
          "\n"
          "%s",
-         wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+         wireshark_gitversion, get_copyright_info(), comp_info_str->str,
          runtime_info_str->str);
 }
 
@@ -988,7 +988,7 @@ main(int argc, char *argv[])
          "%s"
          "\n"
          "%s",
-      wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+      wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
 #ifdef _WIN32
   arg_list_utf_16to8(argc, argv);
@@ -3050,7 +3050,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
     }
     /* If we don't have an application name add Tshark */
     if (shb_hdr->shb_user_appl == NULL) {
-        g_snprintf(appname, sizeof(appname), "TShark " VERSION "%s", wireshark_svnversion);
+        g_snprintf(appname, sizeof(appname), "TShark " VERSION "%s", wireshark_gitversion);
         shb_hdr->shb_user_appl = appname;
     }
 
@@ -3550,7 +3550,7 @@ write_preamble(capture_file *cf)
   switch (output_action) {
 
   case WRITE_TEXT:
-    return print_preamble(print_stream, cf ? cf->filename : NULL, wireshark_svnversion);
+    return print_preamble(print_stream, cf ? cf->filename : NULL, wireshark_gitversion);
 
   case WRITE_XML:
     if (print_details)
index c4e38346f63402bf37f71b6f51de6b7becd426a7..4d43bd73479d72529bf19b540e896ac320e44804 100644 (file)
@@ -328,7 +328,7 @@ about_wireshark_page_new(void)
        "Wireshark is Open Source Software released under the GNU General Public License.\n"
        "\n"
        "Check the man page and http://www.wireshark.org for more information.",
-       wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+       wireshark_gitversion, get_copyright_info(), comp_info_str->str,
        runtime_info_str->str);
 
   msg_label = gtk_label_new(message);
index 7d992fc710dfdd206b8776ec7ba2a807f8d589e0..5ad8a80ce512854ce5970a2d25f68523dd68de46 100644 (file)
@@ -475,7 +475,7 @@ file_import_open(text_import_info_t *info)
     os_info_str = g_string_new("");
     get_os_version_info(os_info_str);
 
-    g_snprintf(appname, sizeof(appname), "Wireshark " VERSION "%s", wireshark_svnversion);
+    g_snprintf(appname, sizeof(appname), "Wireshark " VERSION "%s", wireshark_gitversion);
 
     shb_hdr = g_new(wtapng_section_t,1);
     shb_hdr->section_length = -1;
index 2955bf2ec3fd5f06dff00e92ad89cb89824c411e..79bf7547e10ad30e6ba9cf2f5544b822d88d28f0 100644 (file)
@@ -460,7 +460,7 @@ follow_print_stream(GtkWidget * w _U_, gpointer data)
         return;
     }
 
-    if (!print_preamble(stream, cfile.filename, wireshark_svnversion))
+    if (!print_preamble(stream, cfile.filename, wireshark_gitversion))
         goto print_error;
 
     switch (follow_read_stream(follow_info, follow_print_text, stream)) {
index c6bd7318b553204ffaaf4d234cdc089e3ea7e11d..a5e706dc9d843e324d8c114d39369f55a2e8ee10 100644 (file)
@@ -1163,7 +1163,7 @@ print_usage(gboolean print_ver) {
             "See http://www.wireshark.org for more information.\n"
             "\n"
             "%s",
-            wireshark_svnversion, get_copyright_info());
+            wireshark_gitversion, get_copyright_info());
     } else {
         output = stderr;
     }
@@ -1260,7 +1260,7 @@ show_version(void)
            "%s"
            "\n"
            "%s",
-        wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+        wireshark_gitversion, get_copyright_info(), comp_info_str->str,
         runtime_info_str->str);
 }
 
@@ -2270,7 +2270,7 @@ main(int argc, char *argv[])
         "%s"
         "\n"
         "%s",
-        wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+        wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
     /* Start windows sockets */
     WSAStartup( MAKEWORD( 1, 1 ), &wsaData );
@@ -2568,7 +2568,7 @@ main(int argc, char *argv[])
 
     prefs_p = read_configuration_files (&gdp_path, &dp_path);
     /* Removed thread code:
-     * http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=35027
+     * https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9e277ae6154fd04bf6a0a34ec5655a73e5a736a3
      */
 
     /* this is to keep tap extensions updating once every 3 seconds */
index 1ff0a97251eab92c4bc9685afcd54c2b6c176e9f..8dd114676fe2466d8a239dcea45c86f38fdd5697 100644 (file)
@@ -78,7 +78,7 @@ main_titlebar_update(void)
         if ((prefs.gui_version_placement == version_title_only) ||
             (prefs.gui_version_placement == version_both)) {
             gchar *old_title = title;
-            title = g_strdup_printf("%s   [Wireshark %s %s]", title, VERSION, wireshark_svnversion);
+            title = g_strdup_printf("%s   [Wireshark %s %s]", title, VERSION, wireshark_gitversion);
             g_free(old_title);
         }
         gtk_window_set_title(GTK_WINDOW(top_level), title);
index 857cdb6c1a88703cad9af3f846e3da881f4fc450..759ecd6f5ea90371b3d0ab5b61df554cba7c7050 100644 (file)
@@ -338,7 +338,7 @@ welcome_header_set_message(gchar *msg) {
         if ((prefs.gui_version_placement == version_welcome_only) ||
             (prefs.gui_version_placement == version_both)) {
             g_string_append_printf(message, "</span>\n<span size=\"large\" foreground=\"white\">Version " VERSION "%s",
-                                   wireshark_svnversion);
+                                   wireshark_gitversion);
         }
     }
 
index 67a0878b9eaa0b78789656edae41a5045eb43997..920ece04e843b81df5516384850b18cc9f3e923e 100644 (file)
@@ -671,7 +671,7 @@ summary_to_texbuff(GtkTextBuffer *buffer)
 #endif
 
   /* Add Wireshark version*/
-  g_snprintf(string_buff, SUM_STR_MAX, "Summary created by Wireshark %s\n\n", wireshark_svnversion);
+  g_snprintf(string_buff, SUM_STR_MAX, "Summary created by Wireshark %s\n\n", wireshark_gitversion);
   gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1);
 
   /* Info about file */
index 1e975d63a47294f2876d0d88b9efc3601a64511d..74386b641baedacedfb7d482b3e8061ecac50a6e 100644 (file)
@@ -126,7 +126,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
         "Wireshark is Open Source Software released under the GNU General Public License.\n"
         "\n"
         "Check the man page and http://www.wireshark.org for more information.",
-        wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+        wireshark_gitversion, get_copyright_info(), comp_info_str->str,
         runtime_info_str->str);
 
     ui->label_wireshark->setTextInteractionFlags(Qt::TextSelectableByMouse);
index e9dfc5974ba457bae95cef7d2388307503401945..33c3f660f970ca3c5e7cfd10bc8fcac116e64158 100644 (file)
@@ -210,7 +210,7 @@ print_usage(gboolean print_ver) {
                 "See http://www.wireshark.org for more information.\n"
                 "\n"
                 "%s",
-                wireshark_svnversion, get_copyright_info());
+                wireshark_gitversion, get_copyright_info());
     } else {
         output = stderr;
     }
@@ -302,7 +302,7 @@ show_version(void)
            "%s"
            "\n"
            "%s",
-           wireshark_svnversion, get_copyright_info(), comp_info_str->str,
+           wireshark_gitversion, get_copyright_info(), comp_info_str->str,
            runtime_info_str->str);
 }
 
@@ -544,7 +544,7 @@ int main(int argc, char *argv[])
            "%s"
            "\n"
            "%s",
-        wireshark_svnversion, comp_info_str->str, runtime_info_str->str);
+        wireshark_gitversion, comp_info_str->str, runtime_info_str->str);
 
     /*
      * Get credential information for later use, and drop privileges
@@ -905,7 +905,7 @@ int main(int argc, char *argv[])
     wsApp->installTranslator(&qtTranslator);
 
     /* Removed thread code:
-     * http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=35027
+     * https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9e277ae6154fd04bf6a0a34ec5655a73e5a736a3
      */
 
     g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: timestamp types should be set elsewhere");
index f0ccf60455904ac896fea59257d95f446c05bca1..02c1e4fe354a65170903ea4d5a0058b6a9cbd7a9 100644 (file)
@@ -127,7 +127,7 @@ QString SummaryDialog::SummaryToString()
     QString summaryStr;
     QTextStream out(&summaryStr);
 
-    out << tr("Summary created by Wireshark %1\n\n").arg(wireshark_svnversion);
+    out << tr("Summary created by Wireshark %1\n\n").arg(wireshark_gitversion);
 
     // File Section
     out << tr("File: \n");
index 5ac710980c072952334ffe162f13f788e1eb7819..9362e6765e79a28214be947ebc9a22da41acc7ed 100644 (file)
@@ -102,7 +102,7 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data)
     os_info_str = g_string_new("");
     get_os_version_info(os_info_str);
 
-    g_snprintf(appname, sizeof(appname), "Wireshark " VERSION "%s", wireshark_svnversion);
+    g_snprintf(appname, sizeof(appname), "Wireshark " VERSION "%s", wireshark_gitversion);
 
     shb_hdr = g_new(wtapng_section_t,1);
     shb_hdr->section_length = -1;
index 15c5612db29af7ddf5b1313b548c7e0a14918f08..82609373f6f67828678a18bce16e8021165fbc75 100644 (file)
@@ -43,7 +43,7 @@
 #include "capture-pcap-util.h"
 #include <wsutil/unicode-utils.h>
 
-#include "svnversion.h"
+#include "version.h"
 
 #ifdef HAVE_WINDOWS_H
 #include <windows.h>
 # include <sys/capability.h>
 #endif
 
-#ifdef SVNVERSION
-       const char *wireshark_svnversion = " (" SVNVERSION " from " SVNPATH ")";
+#ifdef GITVERSION
+       const char *wireshark_gitversion = " (" GITVERSION " from " GITBRANCH ")";
 #else
-       const char *wireshark_svnversion = "";
+       const char *wireshark_gitversion = "";
 #endif
 
 /*
@@ -626,7 +626,7 @@ do_cpuid(int *CPUInfo, guint32 selector){
        __cpuid(CPUInfo, selector);
 }
 #elif defined(__GNUC__)
-#if defined(__x86_64__)  
+#if defined(__x86_64__)
 static inline void
 do_cpuid(guint32 *CPUInfo, int selector)
 {
@@ -697,7 +697,7 @@ static void get_mem_info(GString *str _U_)
        MEMORYSTATUSEX statex;
 
        statex.dwLength = sizeof (statex);
-       
+
        if(GlobalMemoryStatusEx (&statex))
                g_string_append_printf(str, ", with ""%" G_GINT64_MODIFIER "d" "MB of physical memory.\n", statex.ullTotalPhys/(1024*1024));
 #endif
index 154d8b1c60a927d50e26e0da4845b36c83ae2c17..26b0424127963bcd0fdb8e3c598cde4ee13ae724 100644 (file)
@@ -31,9 +31,9 @@ extern "C" {
 #endif /* __cplusplus */
 
 /*
- * The svn version string or ""
+ * The Git version string or ""
  */
-extern const gchar *wireshark_svnversion;
+extern const gchar *wireshark_gitversion;
 
 /*
  * Get various library compile-time versions and append them to