| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybPython::svndiff::SVN Class Reference

Inheritance diagram for DybPython::svndiff::SVN:
[legend]
Collaboration diagram for DybPython::svndiff::SVN:
[legend]
List of all members.

Public Member Functions

def __init__
def __call__

Static Public Attributes

tuple cmd = property(__cmd )
tuple msg = property(lambda self:self.get("msg","naughty-no-msg") )
tuple author = property(lambda self:self.get("author","no-author") )
tuple changed = property(_changed )
tuple diff = property(lambda self:self(cmd="diff") )

Private Member Functions

def __cmd
def _changed

Static Private Attributes

string _cmd = "%(exepath)s %(opt)s %(cmd)s %(path)s "
string _cmdr = " --revision %(revision)s "

Detailed Description

Definition at line 41 of file svndiff.py.


Member Function Documentation

def DybPython::svndiff::SVN::__cmd (   self  )  [private]

Definition at line 44 of file svndiff.py.

00044                    :
00045         if self.get('revision',None):
00046             return self._cmdr % self
00047         else:
00048             return self._cmd % self
    cmd = property(__cmd )     

def DybPython::svndiff::SVN::_changed (   self  )  [private]

Definition at line 53 of file svndiff.py.

00053                       :
00054         """
00055         List of full repository paths changed in the specified revision
00056         """
00057         c = []
00058         pthl = False
00059         for i,line in enumerate(self(cmd="log",opt="--verbose --non-interactive").rstrip().split("\n")):
00060             if pthl:
00061                 ele = line.split()              
00062             else:
00063                 ele = []
00064             if line=="Changed paths:":
00065                 pthl = True
00066             elif line=="":
00067                 pthl = False
00068             else:
00069                 pass
00070             if len(ele)==2:
00071                 path = ele[1]
00072                 if path[0]=='/':
00073                     path = path[1:]
00074                 c.append(path)       
00075             elif len(ele)==0:
00076                 pass
00077             else:
                print "SVN._changed unexpected [%-2d][%s][%s][%r]" % (i,pthl,line,ele)

def DybPython::svndiff::SVN::__init__ (   self,
  args,
  kwargs 
)

Reimplemented from DybPython::svndiff::Cmd.

Definition at line 81 of file svndiff.py.

00083                                        :
00084         Cmd.__init__(self,*args,**kwargs)
00085         self.update( exepath=os.environ.get("SVN", "svn"), opt="" )
00086         path = self.get('path',None)
00087         assert path, "SVN a path argument is required "
00088         if path.startswith('http'):
00089             pass
00090         else: 
00091             self['path'] = os.path.expanduser( self['path'] )
            assert os.path.isdir( os.path.join( self['path'], ".svn"  )), "Directory %r is not SVN working copy " % self

def DybPython::svndiff::Cmd::__call__ (   self,
  args,
  kwargs 
) [inherited]

Definition at line 36 of file svndiff.py.

00036                                        :
00037         self.update( kwargs )
00038         print "performing command [%s] " % self.cmd
00039         return os.popen( self.cmd ).read()
00040 
class SVN(Cmd):


Member Data Documentation

string DybPython::svndiff::SVN::_cmd = "%(exepath)s %(opt)s %(cmd)s %(path)s " [static, private]

Definition at line 42 of file svndiff.py.

string DybPython::svndiff::SVN::_cmdr = " --revision %(revision)s " [static, private]

Definition at line 43 of file svndiff.py.

tuple DybPython::svndiff::SVN::cmd = property(__cmd ) [static]

Reimplemented from DybPython::svndiff::Cmd.

Definition at line 49 of file svndiff.py.

tuple DybPython::svndiff::SVN::msg = property(lambda self:self.get("msg","naughty-no-msg") ) [static]

Definition at line 50 of file svndiff.py.

tuple DybPython::svndiff::SVN::author = property(lambda self:self.get("author","no-author") ) [static]

Definition at line 51 of file svndiff.py.

tuple DybPython::svndiff::SVN::changed = property(_changed ) [static]

Definition at line 78 of file svndiff.py.

tuple DybPython::svndiff::Cmd::diff = property(lambda self:self(cmd="diff") ) [static, inherited]

Definition at line 33 of file svndiff.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:13:02 2011 for DybPython by doxygen 1.4.7