Make Authors check account for tests being run with different os.getcwd() depending on how they're run. Add missing people to Authors.
This commit is contained in:
parent
910b741533
commit
67a8d635af
1
.mailmap
1
.mailmap
@ -28,6 +28,7 @@
|
||||
<matt.dietz@rackspace.com> <matthewdietz@Matthew-Dietzs-MacBook-Pro.local>
|
||||
<matt.dietz@rackspace.com> <mdietz@openstack>
|
||||
<mordred@inaugust.com> <mordred@hudson>
|
||||
<nirmal.ranganathan@rackspace.com> <nirmal.ranganathan@rackspace.coom>
|
||||
<paul@openstack.org> <paul.voccio@rackspace.com>
|
||||
<paul@openstack.org> <pvoccio@castor.local>
|
||||
<rconradharris@gmail.com> <rick.harris@rackspace.com>
|
||||
|
1
Authors
1
Authors
@ -19,6 +19,7 @@ Devin Carlen <devin.carlen@gmail.com>
|
||||
Ed Leafe <ed@leafe.com>
|
||||
Eldar Nugaev <enugaev@griddynamics.com>
|
||||
Eric Day <eday@oddments.org>
|
||||
Eric Windisch <eric@cloudscaling.com>
|
||||
Ewan Mellor <ewan.mellor@citrix.com>
|
||||
Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp>
|
||||
Hisaki Ohara <hisaki.ohara@intel.com>
|
||||
|
@ -24,18 +24,19 @@ from nova.utils import parse_mailmap, str_dict_replace, synchronized
|
||||
|
||||
class ProjectTestCase(test.TestCase):
|
||||
def test_authors_up_to_date(self):
|
||||
if os.path.exists('.bzr'):
|
||||
topdir = os.path.normpath(os.path.dirname(__file__) + '/../../')
|
||||
if os.path.exists(os.path.join(topdir, '.bzr')):
|
||||
contributors = set()
|
||||
|
||||
mailmap = parse_mailmap('.mailmap')
|
||||
mailmap = parse_mailmap(os.path.join(topdir, '.mailmap'))
|
||||
|
||||
import bzrlib.workingtree
|
||||
tree = bzrlib.workingtree.WorkingTree.open('.')
|
||||
tree = bzrlib.workingtree.WorkingTree.open(topdir)
|
||||
tree.lock_read()
|
||||
try:
|
||||
parents = tree.get_parent_ids()
|
||||
g = tree.branch.repository.get_graph()
|
||||
for p in parents[1:]:
|
||||
for p in parents:
|
||||
rev_ids = [r for r, _ in g.iter_ancestry(parents)
|
||||
if r != "null:"]
|
||||
revs = tree.branch.repository.get_revisions(rev_ids)
|
||||
@ -44,7 +45,8 @@ class ProjectTestCase(test.TestCase):
|
||||
email = author.split(' ')[-1]
|
||||
contributors.add(str_dict_replace(email, mailmap))
|
||||
|
||||
authors_file = open('Authors', 'r').read()
|
||||
authors_file = open(os.path.join(topdir, 'Authors'),
|
||||
'r').read()
|
||||
|
||||
missing = set()
|
||||
for contributor in contributors:
|
||||
|
Loading…
Reference in New Issue
Block a user