Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using git makes revision.py obsolete. #14

Merged
merged 1 commit into from
Apr 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"""

from .meta import MetaObject
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Authentication(MetaObject):
"""
Expand Down
4 changes: 0 additions & 4 deletions bloomfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@
from binascii import hexlify, unhexlify

from .decorator import Constructor, constructor
from .revision import update_revision_information

if __debug__:
from time import time
from .dprint import dprint
from .decorator import attach_profiler

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class BloomFilter(Constructor):
def _init_(self, m_size, k_functions, prefix, filter_):
assert isinstance(m_size, int)
Expand Down
4 changes: 0 additions & 4 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
from socket import gethostbyname

from .candidate import BootstrapCandidate
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

_trackers = [(u"dispersy1.tribler.org", 6421),
(u"dispersy2.tribler.org", 6422),
Expand Down
4 changes: 0 additions & 4 deletions callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from .decorator import attach_profiler
from .dprint import dprint
from .revision import update_revision_information

if __debug__:
from atexit import register as atexit_register
Expand All @@ -30,9 +29,6 @@
# dprint warning when registered call, or generator call, should have run N seconds ago
QUEUE_DELAY_FOR_WARNING = 1.0

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Callback(object):
if __debug__:
@staticmethod
Expand Down
4 changes: 0 additions & 4 deletions candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ def is_address(address):
assert address[1] >= 0, address[1]
return True

# update version information directly from SVN
from .revision import update_revision_information
update_revision_information("$HeadURL$", "$Revision$")

# delay and lifetime values are chosen to ensure that a candidate will not exceed 60.0 or 30.0
# seconds. However, taking into account round trip time and processing delay we to use smaller
# values without conflicting with the next 5.0 walk cycle. Hence, we pick 2.5 seconds below the
Expand Down
4 changes: 0 additions & 4 deletions community.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@
from .dprint import dprint
from .member import DummyMember, Member, MemberFromId
from .resolution import PublicResolution, LinearResolution, DynamicResolution
from .revision import update_revision_information
from .statistics import CommunityStatistics
from .timeline import Timeline
from .candidate import WalkCandidate

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class SyncCache(object):
def __init__(self, time_low, time_high, modulo, offset, bloom_filter):
self.time_low = time_low
Expand Down
4 changes: 0 additions & 4 deletions conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .distribution import FullSyncDistribution, LastSyncDistribution, DirectDistribution
from .message import DelayPacketByMissingMember, DropPacket, Message
from .resolution import PublicResolution, LinearResolution, DynamicResolution
from .revision import update_revision_information

if __debug__:
from .authentication import Authentication
Expand All @@ -22,9 +21,6 @@
from .dprint import dprint
from .resolution import Resolution

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Conversion(object):
"""
A Conversion object is used to convert incoming packets to a different, possibly more recent,
Expand Down
4 changes: 0 additions & 4 deletions crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
@contact: [email protected]
"""

# update version information directly from SVN
from .revision import update_revision_information
update_revision_information("$HeadURL$", "$Revision$")

if False:
#
# disable crypto
Expand Down
5 changes: 0 additions & 5 deletions database.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import sqlite3

from .dprint import dprint
from .revision import update_revision_information
from .singleton import Singleton

if __debug__:
Expand All @@ -28,10 +27,6 @@
while exists(DB_DEBUG_FILE):
DB_DEBUG_FILE="database_queries_%d.txt" % randint(1,9999999)


# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class IgnoreCommits(Exception):
"""
Ignore all commits made within the body of a 'with database:' clause.
Expand Down
4 changes: 0 additions & 4 deletions debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
from .dprint import dprint
from .member import Member
from .message import Message
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class DebugOnlyMember(Member):
_cache = OrderedDict()
Expand Down
4 changes: 0 additions & 4 deletions debugcommunity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
from .message import Message, DropPacket, DelayMessageByProof
from .payload import Payload
from .resolution import PublicResolution, LinearResolution, DynamicResolution
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

#
# Node
Expand Down
4 changes: 0 additions & 4 deletions decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

from .dprint import dprint

# update version information directly from SVN
from .revision import update_revision_information
update_revision_information("$HeadURL$", "$Revision$")

class Constructor(object):
"""
Allow a class to have multiple constructors. The right one will
Expand Down
4 changes: 0 additions & 4 deletions destination.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from .meta import MetaObject
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Destination(MetaObject):
class Implementation(MetaObject.Implementation):
Expand Down
4 changes: 0 additions & 4 deletions dispersy.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,10 @@
from .payload import SignatureRequestPayload, SignatureResponsePayload
from .requestcache import Cache, RequestCache
from .resolution import PublicResolution, LinearResolution
from .revision import update_revision_information
from .statistics import DispersyStatistics
from .singleton import Singleton
from .singleton import cleanup as cleanup_singletons

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

# the callback identifier for the task that periodically takes a step
CANDIDATE_WALKER_CALLBACK_ID = "dispersy-candidate-walker"

Expand Down
4 changes: 0 additions & 4 deletions dispersydatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@

from .distribution import FullSyncDistribution
from .dprint import dprint
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

LATEST_VERSION = 16

Expand Down
4 changes: 0 additions & 4 deletions distribution.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from .meta import MetaObject
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

"""
Each Privilege can be distributed, usualy through the transfer of a message, in different ways.
Expand Down
4 changes: 0 additions & 4 deletions endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
import threading

from .candidate import Candidate
from .revision import update_revision_information

if __debug__:
from .dprint import dprint

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

if sys.platform == 'win32':
SOCKET_BLOCK_ERRORCODE = 10035 # WSAEWOULDBLOCK
else:
Expand Down
4 changes: 0 additions & 4 deletions member.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@

from .dispersydatabase import DispersyDatabase
from .crypto import ec_from_private_bin, ec_from_public_bin, ec_signature_length, ec_verify, ec_sign
from .revision import update_revision_information

if __debug__:
from .dprint import dprint
from .crypto import ec_check_public_bin, ec_check_private_bin

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

def cleanup():
"""
Removes all member caches.
Expand Down
4 changes: 0 additions & 4 deletions message.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
from .member import DummyMember
from .meta import MetaObject
from .revision import update_revision_information

if __debug__:
from .dprint import dprint

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

#
# Exceptions
#
Expand Down
4 changes: 0 additions & 4 deletions meta.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import inspect

from .dprint import dprint
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class MetaObject(object):
class Implementation(object):
Expand Down
4 changes: 0 additions & 4 deletions payload.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from hashlib import sha1

from .meta import MetaObject
from .revision import update_revision_information

if __debug__:
from .bloomfilter import BloomFilter
Expand All @@ -15,9 +14,6 @@ def is_address(address):
assert address[1] >= 0, address[1]
return True

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Payload(MetaObject):
class Implementation(MetaObject.Implementation):
pass
Expand Down
4 changes: 0 additions & 4 deletions requestcache.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
from random import random
from .revision import update_revision_information

if __debug__:
def identifier_to_string(identifier):
return identifier.encode("HEX") if isinstance(identifier, str) else identifier
from .dprint import dprint

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Cache(object):
timeout_delay = 10.0
cleanup_delay = 10.0
Expand Down
4 changes: 0 additions & 4 deletions resolution.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
from .meta import MetaObject
from .revision import update_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Resolution(MetaObject):
class Implementation(MetaObject.Implementation):
Expand Down
11 changes: 0 additions & 11 deletions revision.py

This file was deleted.

4 changes: 0 additions & 4 deletions script.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@
from .member import Member
from .message import BatchConfiguration, Message, DelayMessageByProof, DropMessage
from .resolution import PublicResolution, LinearResolution
from .revision import update_revision_information
from .tool.lencoder import log, make_valid_key

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

def assert_(value, *args):
if not value:
raise AssertionError(*args)
Expand Down
4 changes: 0 additions & 4 deletions singleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
from random import sample
from threading import RLock

# update version information directly from SVN
from .revision import update_revision_information
update_revision_information("$HeadURL$", "$Revision$")

def cleanup():
"""
Removes all singleton instances from existing Singleton subclasses
Expand Down
6 changes: 0 additions & 6 deletions statistics.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
from time import time

from .revision import update_revision_information, get_revision_information

# update version information directly from SVN
update_revision_information("$HeadURL: https://svn.tribler.org/dispersy/branches/20120612-27046-mainbranch/dispersy.py $", "$Revision: 28434 $")

class Statistics():
@staticmethod
def dict_inc(dictionary, key, value=1L):
Expand All @@ -25,7 +20,6 @@ def __init__(self, dispersy):
self.connection_type = None
self.database_version = dispersy.database.database_version
self.lan_address = None
self.revision = get_revision_information()
self.start = self.timestamp = time()

# nr packets received
Expand Down
4 changes: 0 additions & 4 deletions timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@

from .authentication import MemberAuthentication, DoubleMemberAuthentication
from .resolution import PublicResolution, LinearResolution, DynamicResolution
from .revision import update_revision_information

if __debug__:
from .dprint import dprint

# update version information directly from SVN
update_revision_information("$HeadURL$", "$Revision$")

class Timeline(object):
def __init__(self, community):
if __debug__:
Expand Down