[Pkg-xen-changes] r852 - trunk/xen/debian/bin

Bastian Blank waldi at alioth.debian.org
Sun Mar 27 19:38:50 UTC 2011


Author: waldi
Date: Sun Mar 27 19:38:49 2011
New Revision: 852

Log:
debian/bin/genorig.py: Detect repository type.

Modified:
   trunk/xen/debian/bin/genorig.py

Modified: trunk/xen/debian/bin/genorig.py
==============================================================================
--- trunk/xen/debian/bin/genorig.py	Sun Mar 27 19:31:11 2011	(r851)
+++ trunk/xen/debian/bin/genorig.py	Sun Mar 27 19:38:49 2011	(r852)
@@ -11,6 +11,7 @@
 from debian_xen.debian import VersionXen
 from debian_linux.debian import Changelog
 
+
 class Main(object):
     log = sys.stdout.write
 
@@ -20,6 +21,11 @@
         self.changelog_entry = Changelog(version=VersionXen)[0]
         self.source = self.changelog_entry.source
 
+        if os.path.exists(os.path.join(repo, '.hg')):
+            self.repo_type = 'hg'
+        else:
+            raise NotImplementedError
+
     def __call__(self):
         import tempfile
         self.temp_dir = tempfile.mkdtemp(prefix='genorig', dir='debian')
@@ -69,6 +75,7 @@
         if p.wait():
             raise RuntimeError
 
+
 if __name__ == '__main__':
     from optparse import OptionParser
     p = OptionParser(prog=sys.argv[0], usage='%prog [OPTION]... DIR')



More information about the Pkg-xen-changes mailing list