aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-14 17:03:16 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-14 17:30:19 +0000
commit0d9e1813f031b6b4449654265f66b92595f73122 (patch)
tree85cbc8bbac4ef4e29a76634e3dc918bfacb2df68
parent47a57ef2597ff09c3c8f5d9400713ee8f7052b55 (diff)
downloadpaludis-0d9e1813f031b6b4449654265f66b92595f73122.tar.gz
paludis-0d9e1813f031b6b4449654265f66b92595f73122.tar.xz
Change subversion revision for git head
-rw-r--r--configure.ac26
-rw-r--r--doc/api/cplusplus/examples/example_about.cc4
-rw-r--r--doc/api/cplusplus/examples/example_command_line.cc4
-rwxr-xr-xdoc/api/python/example_about.py4
-rw-r--r--doc/api/ruby/example_about.rb4
-rw-r--r--paludis/about.hh.in5
-rw-r--r--paludis/about_TEST.cc2
-rw-r--r--paludis/repositories/e/ebuild.cc12
-rw-r--r--paludis/repositories/e/fetch_visitor.cc4
-rw-r--r--python/about.cc2
-rw-r--r--ruby/paludis_ruby.cc4
-rw-r--r--src/clients/accerso/accerso.cc4
-rw-r--r--src/clients/adjutrix/adjutrix.cc4
-rw-r--r--src/clients/contrarius/contrarius.cc4
-rw-r--r--src/clients/importare/importare.cc4
-rw-r--r--src/clients/inquisitio/inquisitio.cc4
-rw-r--r--src/clients/instruo/instruo.cc4
-rw-r--r--src/clients/paludis/paludis.cc4
-rw-r--r--src/clients/qualudis/qualudis.cc4
-rw-r--r--src/clients/reconcilio/reconcilio.cc4
20 files changed, 57 insertions, 50 deletions
diff --git a/configure.ac b/configure.ac
index 2176513..b4c5919 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1277,18 +1277,24 @@ AC_SUBST([BUILDHOST])
BUILDDATE=`date +%Y-%m-%dT%H:%M:%S%z`
AC_SUBST([BUILDDATE])
-if test -d "${ac_top_srcdir:-./}/.svn" ; then
- SVNVERSION=`svnversion "${ac_top_srcdir:-./}"`
+if test -d "${ac_top_srcdir:-./}/.git" ; then
+ GITHEAD=`git describe 2>/dev/null`
+ if test -z ${GITHEAD} ; then
+ GITHEAD=`git rev-parse HEAD`
+ fi
+ if test -n "`git diff-index --name-only HEAD`" ; then
+ GITHEAD=${GITHEAD}-dirty
+ fi
else
- SVNVERSION=
+ GITVERSION=
fi
-AC_MSG_CHECKING([for svn revision])
-AC_ARG_WITH([svn-revision],
- AS_HELP_STRING([--with-svn-revision], [Specify svn revision]),
- SVNVERSION=`eval echo $withval`,
- SVNVERSION=`eval echo $SVNVERSION`)
-AC_MSG_RESULT([$SVNVERSION])
-AC_SUBST([SVNVERSION])
+AC_MSG_CHECKING([for git head])
+AC_ARG_WITH([git-head],
+ AS_HELP_STRING([--with-git-head], [Specify Git head]),
+ GITHEAD=`eval echo $withval`,
+ GITHEAD=`eval echo $GITHEAD`)
+AC_MSG_RESULT([$GITHEAD])
+AC_SUBST([GITHEAD])
dnl }}}
dnl {{{ output
diff --git a/doc/api/cplusplus/examples/example_about.cc b/doc/api/cplusplus/examples/example_about.cc
index 2ef9156..3008f72 100644
--- a/doc/api/cplusplus/examples/example_about.cc
+++ b/doc/api/cplusplus/examples/example_about.cc
@@ -24,8 +24,8 @@ int main(int, char *[])
cout << "Built using Paludis " << PALUDIS_VERSION_MAJOR << "." << PALUDIS_VERSION_MINOR
<< "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " " << PALUDIS_GIT_HEAD;
cout << endl;
diff --git a/doc/api/cplusplus/examples/example_command_line.cc b/doc/api/cplusplus/examples/example_command_line.cc
index a1c9f2d..2a82cc1 100644
--- a/doc/api/cplusplus/examples/example_command_line.cc
+++ b/doc/api/cplusplus/examples/example_command_line.cc
@@ -71,8 +71,8 @@ examples::show_version_and_exit()
{
cout << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl;
std::exit(EXIT_SUCCESS);
diff --git a/doc/api/python/example_about.py b/doc/api/python/example_about.py
index 1ca297f..b444545 100755
--- a/doc/api/python/example_about.py
+++ b/doc/api/python/example_about.py
@@ -8,5 +8,5 @@ import paludis
print("Built using Paludis " + str(paludis.VERSION_MAJOR) + "." + str(paludis.VERSION_MINOR) +
"." + str(paludis.VERSION_MICRO) + paludis.VERSION_SUFFIX),
-if paludis.SUBVERSION_REVISION:
- print 'r' + paludis.SUBVERSION_REVISION
+if paludis.GIT_HEAD:
+ print 'git-' + paludis.GIT_HEAD
diff --git a/doc/api/ruby/example_about.rb b/doc/api/ruby/example_about.rb
index 98dfc53..fbb65af 100644
--- a/doc/api/ruby/example_about.rb
+++ b/doc/api/ruby/example_about.rb
@@ -10,8 +10,8 @@ require 'Paludis'
print "Built using Paludis ", Paludis::VersionMajor, ".", Paludis::VersionMinor,
".", Paludis::VersionMicro, Paludis::VersionSuffix
-if not Paludis::SubversionRevision.empty?
- print ' ', Paludis::SubversionRevision
+if not Paludis::GitHead.empty?
+ print ' ', Paludis::GitHead
end
print "\n"
diff --git a/paludis/about.hh.in b/paludis/about.hh.in
index 1791749..3b53709 100644
--- a/paludis/about.hh.in
+++ b/paludis/about.hh.in
@@ -77,11 +77,12 @@
+ (100 * PALUDIS_VERSION_MINOR) + PALUDIS_VERSION_MICRO)
/**
- * The subversion revision, if applicable (eg "65" or "65M" or "").
+ * The Git head used to build this binary, if applicable (eg "deadbeef" or "1.0.0-40-f00-dirty" or "").
*
* \ingroup g_about
+ * \since 0.28
*/
-#define PALUDIS_SUBVERSION_REVISION "@SVNVERSION@"
+#define PALUDIS_GIT_HEAD "@GITHEAD@"
/**
* The CXXFLAGS used to build Paludis.
diff --git a/paludis/about_TEST.cc b/paludis/about_TEST.cc
index cd5bac4..de0091b 100644
--- a/paludis/about_TEST.cc
+++ b/paludis/about_TEST.cc
@@ -56,7 +56,7 @@ namespace test_cases
TEST_CHECK_EQUAL(PALUDIS_VERSION, 10000 * PALUDIS_VERSION_MAJOR +
100 * PALUDIS_VERSION_MINOR + PALUDIS_VERSION_MICRO);
- TEST_CHECK(std::string(PALUDIS_SUBVERSION_REVISION) != "i am a fish");
+ TEST_CHECK(std::string(PALUDIS_GIT_HEAD) != "i am a fish");
}
} test_case_about;
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 229fb1a..5012063 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -126,8 +126,8 @@ EbuildCommand::operator() ()
.with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." +
stringify(PALUDIS_VERSION_MINOR) + "." +
stringify(PALUDIS_VERSION_MICRO) + stringify(PALUDIS_VERSION_SUFFIX) +
- (std::string(PALUDIS_SUBVERSION_REVISION).empty() ?
- std::string("") : "-r" + std::string(PALUDIS_SUBVERSION_REVISION)))
+ (std::string(PALUDIS_GIT_HEAD).empty() ?
+ std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD)))
.with_setenv("PALUDIS_TMPDIR", stringify(params[k::builddir()]))
.with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/")
.with_setenv("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " "))
@@ -715,8 +715,8 @@ WriteVDBEntryCommand::operator() ()
.with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." +
stringify(PALUDIS_VERSION_MINOR) + "." +
stringify(PALUDIS_VERSION_MICRO) +
- (std::string(PALUDIS_SUBVERSION_REVISION).empty() ?
- std::string("") : "-r" + std::string(PALUDIS_SUBVERSION_REVISION)))
+ (std::string(PALUDIS_GIT_HEAD).empty() ?
+ std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD)))
.with_setenv("EAPI", stringify((*params[k::package_id()]->eapi())[k::exported_name()]))
.with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/")
.with_setenv("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " "))
@@ -918,8 +918,8 @@ WriteBinaryEbuildCommand::operator() ()
.with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." +
stringify(PALUDIS_VERSION_MINOR) + "." +
stringify(PALUDIS_VERSION_MICRO) +
- (std::string(PALUDIS_SUBVERSION_REVISION).empty() ?
- std::string("") : "-r" + std::string(PALUDIS_SUBVERSION_REVISION)))
+ (std::string(PALUDIS_GIT_HEAD).empty() ?
+ std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD)))
.with_setenv("EAPI", stringify((*params[k::package_id()]->eapi())[k::exported_name()]))
.with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/")
.with_setenv("PALUDIS_TMPDIR", stringify(params[k::builddir()]))
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index d639dd7..7137deb 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -215,8 +215,8 @@ FetchVisitor::visit_leaf(const FetchableURIDepSpec & u)
.with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." +
stringify(PALUDIS_VERSION_MINOR) + "." +
stringify(PALUDIS_VERSION_MICRO) +
- (std::string(PALUDIS_SUBVERSION_REVISION).empty() ?
- std::string("") : "-r" + std::string(PALUDIS_SUBVERSION_REVISION)))
+ (std::string(PALUDIS_GIT_HEAD).empty() ?
+ std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD)))
.with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/")
.with_setenv("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " "))
.with_setenv("PALUDIS_HOOK_DIRS", join(hook_dirs->begin(), hook_dirs->end(), " "))
diff --git a/python/about.cc b/python/about.cc
index 93a20cf..9497222 100644
--- a/python/about.cc
+++ b/python/about.cc
@@ -34,5 +34,5 @@ void expose_about()
s.attr("VERSION") = stringify(PALUDIS_VERSION_MAJOR) + "."
+ stringify(PALUDIS_VERSION_MINOR) + "." + stringify(PALUDIS_VERSION_MICRO);
s.attr("VERSION_SUFFIX") = stringify(PALUDIS_VERSION_SUFFIX);
- s.attr("SUBVERSION_REVISION") = stringify(PALUDIS_SUBVERSION_REVISION);
+ s.attr("GIT_HEAD") = stringify(PALUDIS_GIT_HEAD);
}
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index bde7d5f..aa18ec0 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -489,8 +489,8 @@ void PALUDIS_VISIBLE paludis::ruby::init()
rb_define_const(c_paludis_module, "VersionMicro", INT2FIX(PALUDIS_VERSION_MICRO));
rb_define_const(c_paludis_module, "VersionSuffix",
rb_str_new2(stringify(PALUDIS_VERSION_SUFFIX).c_str()));
- rb_define_const(c_paludis_module, "SubversionRevision",
- rb_str_new2(stringify(PALUDIS_SUBVERSION_REVISION).c_str()));
+ rb_define_const(c_paludis_module, "GitHead",
+ rb_str_new2(stringify(PALUDIS_GIT_HEAD).c_str()));
RegisterRubyClass::get_instance()->execute();
}
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index c50dd9f..b083283 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -91,8 +91,8 @@ main(int argc, char *argv[])
{
cout << "accerso, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl << endl;
cout << "Paludis comes with ABSOLUTELY NO WARRANTY. Paludis is free software, and you" << endl;
cout << "are welcome to redistribute it under the terms of the GNU General Public" << endl;
diff --git a/src/clients/adjutrix/adjutrix.cc b/src/clients/adjutrix/adjutrix.cc
index 9ae5832..ae8369f 100644
--- a/src/clients/adjutrix/adjutrix.cc
+++ b/src/clients/adjutrix/adjutrix.cc
@@ -77,8 +77,8 @@ namespace
{
cout << "adjutrix, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl;
}
diff --git a/src/clients/contrarius/contrarius.cc b/src/clients/contrarius/contrarius.cc
index 057b987..6274c75 100644
--- a/src/clients/contrarius/contrarius.cc
+++ b/src/clients/contrarius/contrarius.cc
@@ -138,8 +138,8 @@ int main(int argc, char *argv[])
{
cout << "contrarius, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl << endl;
cout << "Paludis comes with ABSOLUTELY NO WARRANTY. Paludis is free software, and you" << endl;
cout << "are welcome to redistribute it under the terms of the GNU General Public" << endl;
diff --git a/src/clients/importare/importare.cc b/src/clients/importare/importare.cc
index 097cfde..bf5fb8a 100644
--- a/src/clients/importare/importare.cc
+++ b/src/clients/importare/importare.cc
@@ -59,8 +59,8 @@ namespace
{
cout << "importare, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl;
}
}
diff --git a/src/clients/inquisitio/inquisitio.cc b/src/clients/inquisitio/inquisitio.cc
index 885bd9d..790b359 100644
--- a/src/clients/inquisitio/inquisitio.cc
+++ b/src/clients/inquisitio/inquisitio.cc
@@ -47,8 +47,8 @@ namespace
{
cout << "inquisitio, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl;
}
}
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index b55ec69..d3d7bf5 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -200,8 +200,8 @@ main(int argc, char *argv[])
{
cout << "instruo, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl << endl;
cout << "Paludis comes with ABSOLUTELY NO WARRANTY. Paludis is free software, and you" << endl;
cout << "are welcome to redistribute it under the terms of the GNU General Public" << endl;
diff --git a/src/clients/paludis/paludis.cc b/src/clients/paludis/paludis.cc
index de1b570..cd76849 100644
--- a/src/clients/paludis/paludis.cc
+++ b/src/clients/paludis/paludis.cc
@@ -74,8 +74,8 @@ namespace
{
cout << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl;
}
}
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 1e3d6e6..75a15a4 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -376,8 +376,8 @@ int main(int argc, char *argv[])
{
cout << "qualudis, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ cout << " git " << PALUDIS_GIT_HEAD;
cout << endl << endl;
cout << "Paludis comes with ABSOLUTELY NO WARRANTY. Paludis is free software, and you" << endl;
cout << "are welcome to redistribute it under the terms of the GNU General Public" << endl;
diff --git a/src/clients/reconcilio/reconcilio.cc b/src/clients/reconcilio/reconcilio.cc
index 1919c7e..422460d 100644
--- a/src/clients/reconcilio/reconcilio.cc
+++ b/src/clients/reconcilio/reconcilio.cc
@@ -46,8 +46,8 @@ namespace
{
std::cout << "reconcilio, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
<< PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;
- if (! std::string(PALUDIS_SUBVERSION_REVISION).empty())
- std::cout << " svn " << PALUDIS_SUBVERSION_REVISION;
+ if (! std::string(PALUDIS_GIT_HEAD).empty())
+ std::cout << " git " << PALUDIS_GIT_HEAD;
std::cout << std::endl;
}
}