diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 246: Use hint when reporting version with versiontools.

Message ID 20111003122614.15457.61219.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki Oct. 3, 2011, 12:26 p.m. UTC
------------------------------------------------------------
revno: 246
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: trunk
timestamp: Fri 2011-09-30 15:45:00 +0200
message:
  Use hint when reporting version with versiontools.
  
  This allows versiontools to track down the place the code is stored and thus
  initialize vcs helpers correctly.
modified:
  lava_projects/extension.py
  lava_server/context_processors.py
  setup.py


--
lp:lava-server
https://code.launchpad.net/~linaro-validation/lava-server/trunk

You are subscribed to branch lp:lava-server.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_projects/extension.py'
--- lava_projects/extension.py	2011-09-23 08:29:48 +0000
+++ lava_projects/extension.py	2011-09-30 13:45:00 +0000
@@ -42,6 +42,6 @@ 
 
     @property
     def version(self):
-        from lava_projects import __version__
+        import lava_projects
         import versiontools
-        return versiontools.format_version(__version__)
+        return versiontools.format_version(lava_projects.__version__, hint=lava_projects)

=== modified file 'lava_server/context_processors.py'
--- lava_server/context_processors.py	2011-08-18 15:00:07 +0000
+++ lava_server/context_processors.py	2011-09-30 13:45:00 +0000
@@ -18,13 +18,13 @@ 
 
 import versiontools
 
+import lava_server
 from lava_server.extension import loader
-from lava_server import __version__
 
 def lava(request):
     return {
         'lava': {
             'extension_list': loader.extensions,
-            'version': versiontools.format_version(__version__)
+            'version': versiontools.format_version(lava_server.__version__, hint=lava_server)
         }
     }

=== modified file 'setup.py'
--- setup.py	2011-09-23 08:35:26 +0000
+++ setup.py	2011-09-30 13:45:00 +0000
@@ -63,11 +63,11 @@ 
         'linaro-django-xmlrpc >= 0.4',
         'python-openid >= 2.2.4',  # this should be a part of django-openid-auth deps
         'south >= 0.7.3',
-        'versiontools >= 1.3.1',
+        'versiontools >= 1.8',
         'markdown >= 2.0.3',
     ],
     setup_requires=[
-        'versiontools >= 1.3.1',
+        'versiontools >= 1.8',
     ],
     tests_require=[
         'django-testscenarios >= 0.7.1',