mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
git migration: Remove support for file versions
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: * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Alter the "core show file version" CLI command such that it always reports the version of Asterisk. The file version is no longer available. * main/manager: The Version key now always reports the Asterisk version. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action. - Modification of the "core show file version" CLI command. Change-Id: Ia932d3c64cd18a14a3c894109baa657ec0a85d28
This commit is contained in:
@@ -5961,9 +5961,6 @@ static int manager_modulecheck(struct mansession *s, const struct message *m)
|
||||
const char *module = astman_get_header(m, "Module");
|
||||
const char *id = astman_get_header(m, "ActionID");
|
||||
char idText[256];
|
||||
#if !defined(LOW_MEMORY)
|
||||
const char *version;
|
||||
#endif
|
||||
char filename[PATH_MAX];
|
||||
char *cut;
|
||||
|
||||
@@ -5980,11 +5977,6 @@ static int manager_modulecheck(struct mansession *s, const struct message *m)
|
||||
astman_send_error(s, m, "Module not loaded");
|
||||
return 0;
|
||||
}
|
||||
snprintf(cut, (sizeof(filename) - strlen(filename)) - 1, ".c");
|
||||
ast_debug(1, "**** ModuleCheck .c file %s\n", filename);
|
||||
#if !defined(LOW_MEMORY)
|
||||
version = ast_file_version_find(filename);
|
||||
#endif
|
||||
|
||||
if (!ast_strlen_zero(id)) {
|
||||
snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
|
||||
@@ -5993,7 +5985,7 @@ static int manager_modulecheck(struct mansession *s, const struct message *m)
|
||||
}
|
||||
astman_append(s, "Response: Success\r\n%s", idText);
|
||||
#if !defined(LOW_MEMORY)
|
||||
astman_append(s, "Version: %s\r\n\r\n", version ? version : "");
|
||||
astman_append(s, "Version: %s\r\n\r\n", ast_get_version());
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user