Skip to content

Commit

Permalink
functools.total_order
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghao committed May 23, 2012
1 parent 852151c commit 84fbfbf
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions fabfile/rcs/svn.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os
import functools

from fabric.api import abort, local, lcd

from ..cmds import lpath_exists
from ..state import myenv


@functools.total_ordering
class SmartName(object):

def __init__(self, full_path_or_repo, tag=None, base=None):
Expand Down Expand Up @@ -37,22 +39,9 @@ def __str__(self):
def __eq__(self, r):
return str(self) == str(r)

def __ne__(self, r):
return not self == r

def __lt__(self, r):
return str(self) < str(r)

def __le__(self, r):
return (self == r) or (self < r)

def __gt__(self, r):
return str(self) > r

def __ge__(self, r):
return (self == r) or (self > r)



class SVN(object):

Expand Down

0 comments on commit 84fbfbf

Please sign in to comment.