Rev 4414: (Matthew Fuller) Catch the number of cores on FreeBSD too. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Jun 5 16:03:22 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4414
revision-id: pqm at pqm.ubuntu.com-20090605150317-n3bjy7kqjvizgiv6
parent: pqm at pqm.ubuntu.com-20090605081039-abvojdsxjbg5i4ff
parent: fullermd at over-yonder.net-20090605091302-tdw4zqpuv1n0dxl5
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-06-05 16:03:17 +0100
message:
  (Matthew Fuller) Catch the number of cores on FreeBSD too.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
    ------------------------------------------------------------
    revno: 4413.1.1
    revision-id: fullermd at over-yonder.net-20090605091302-tdw4zqpuv1n0dxl5
    parent: pqm at pqm.ubuntu.com-20090605081039-abvojdsxjbg5i4ff
    committer: Matthew Fuller <fullermd at over-yonder.net>
    branch nick: bsd-concurrency
    timestamp: Fri 2009-06-05 04:13:02 -0500
    message:
      Catch the number of cores on FreeBSD too.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
=== modified file 'NEWS'
--- a/NEWS	2009-06-05 07:14:08 +0000
+++ b/NEWS	2009-06-05 09:13:02 +0000
@@ -114,6 +114,8 @@
 
 * The number of cores is also detected on Solaris and win32. (Vincent Ladeuil)
 
+* The number of cores is also detected on FreeBSD. (Matthew Fuller)
+
 
 bzr 1.15
 ########

=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py	2009-06-05 07:10:13 +0000
+++ b/bzrlib/osutils.py	2009-06-05 09:13:02 +0000
@@ -1841,6 +1841,10 @@
     def _local_concurrency():
         return subprocess.Popen(['sysctl', '-n', 'hw.availcpu'],
                                 stdout=subprocess.PIPE).communicate()[0]
+elif sys.platform[0:7] == 'freebsd':
+    def _local_concurrency():
+        return subprocess.Popen(['sysctl', '-n', 'hw.ncpu'],
+                                stdout=subprocess.PIPE).communicate()[0]
 elif sys.platform == 'sunos5':
     def _local_concurrency():
         return subprocess.Popen(['psrinfo', '-p',],




More information about the bazaar-commits mailing list