summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-04-11 21:38:22 -0500
committerCorey Farrell <git@cfware.com>2015-04-13 03:48:57 -0400
commit4a58261694f1538a419dd869f87ea4590171a9f2 (patch)
treea8d3196d5b69f233f814ef3fa7a543c2ce50bd24 /utils
parent1174ef588dafe864fe3f2c1f8297690def8f85d1 (diff)
git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
Diffstat (limited to 'utils')
-rw-r--r--utils/ael_main.c6
-rw-r--r--utils/astdb2sqlite3.c2
-rw-r--r--utils/astman.c11
-rw-r--r--utils/check_expr.c12
-rw-r--r--utils/conf2ael.c10
5 files changed, 18 insertions, 23 deletions
diff --git a/utils/ael_main.c b/utils/ael_main.c
index 86588ee4b..223762597 100644
--- a/utils/ael_main.c
+++ b/utils/ael_main.c
@@ -18,7 +18,7 @@
#include <regex.h>
#include <limits.h>
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+ASTERISK_REGISTER_FILE()
#include "asterisk/backtrace.h"
#include "asterisk/channel.h"
@@ -33,8 +33,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
int option_debug = 0;
int option_verbose = 0;
#if !defined(LOW_MEMORY)
-void ast_register_file_version(const char *file, const char *version) { }
-void ast_unregister_file_version(const char *file) { }
+void __ast_register_file(const char *file) { }
+void __ast_unregister_file(const char *file) { }
#endif
/*** MODULEINFO
diff --git a/utils/astdb2sqlite3.c b/utils/astdb2sqlite3.c
index ba35f9360..38080e84d 100644
--- a/utils/astdb2sqlite3.c
+++ b/utils/astdb2sqlite3.c
@@ -29,8 +29,6 @@
#include "asterisk.h"
-//ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/utils/astman.c b/utils/astman.c
index 315b3b065..0099a13f6 100644
--- a/utils/astman.c
+++ b/utils/astman.c
@@ -27,8 +27,7 @@
***/
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-#include "asterisk.h"
+ASTERISK_REGISTER_FILE()
#include <newt.h>
#include <stdio.h>
@@ -89,13 +88,13 @@ struct ast_chan {
static AST_LIST_HEAD_NOLOCK_STATIC(chans, ast_chan);
/* dummy functions to be compatible with the Asterisk core for md5.c */
-void ast_register_file_version(const char *file, const char *version);
-void ast_register_file_version(const char *file, const char *version)
+void __ast_register_file(const char *file);
+void __ast_register_file(const char *file)
{
}
-void ast_unregister_file_version(const char *file);
-void ast_unregister_file_version(const char *file)
+void __ast_unregister_file(const char *file);
+void __ast_unregister_file(const char *file)
{
}
diff --git a/utils/check_expr.c b/utils/check_expr.c
index 6cd535df2..de668f691 100644
--- a/utils/check_expr.c
+++ b/utils/check_expr.c
@@ -21,7 +21,7 @@
***/
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+ASTERISK_REGISTER_FILE()
#include "asterisk/ast_expr.h"
@@ -152,8 +152,6 @@ void ast_log(int level, const char *file, int line, const char *function, const
fflush(stdout);
va_end(vars);
}
-//void ast_register_file_version(const char *file, const char *version);
-//void ast_unregister_file_version(const char *file);
char *find_var(const char *varname);
void set_var(const char *varname, const char *varval);
@@ -161,8 +159,8 @@ unsigned int check_expr(char* buffer, char* error_report);
int check_eval(char *buffer, char *error_report);
void parse_file(const char *fname);
-void ast_register_file_version(const char *file, const char *version);
-void ast_register_file_version(const char *file, const char *version) { }
+void __ast_register_file(const char *file);
+void __ast_register_file(const char *file) { }
#if !defined(LOW_MEMORY)
int ast_add_profile(const char *x, uint64_t scale) { return 0;}
#endif
@@ -174,8 +172,8 @@ int ast_atomic_fetchadd_int_slow(volatile int *p, int v)
return ret;
}
-void ast_unregister_file_version(const char *file);
-void ast_unregister_file_version(const char *file)
+void __ast_unregister_file(const char *file);
+void __ast_unregister_file(const char *file)
{
}
diff --git a/utils/conf2ael.c b/utils/conf2ael.c
index 5d36f4231..99304b2f5 100644
--- a/utils/conf2ael.c
+++ b/utils/conf2ael.c
@@ -28,7 +28,7 @@
***/
#include "asterisk.h"
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+ASTERISK_REGISTER_FILE()
#include "asterisk/paths.h" /* CONFIG_DIR */
#include <locale.h>
@@ -79,13 +79,13 @@ char ast_config_AST_SYSTEM_NAME[20] = ""; */
int option_debug = 0;
int option_verbose = 0;
-void ast_register_file_version(const char *file, const char *version);
-void ast_register_file_version(const char *file, const char *version)
+void __ast_register_file(const char *file);
+void __ast_register_file(const char *file)
{
}
-void ast_unregister_file_version(const char *file);
-void ast_unregister_file_version(const char *file)
+void __ast_unregister_file(const char *file);
+void __ast_unregister_file(const char *file)
{
}
#if !defined(LOW_MEMORY)