Package moap :: Package vcs :: Module vcs :: Class VCS
[hide private]
[frames] | no frames]

Class VCS

source code

extern.log.log.Loggable --+
                          |
                         VCS
Known Subclasses:

cvar path: the path to the top of the source tree

Instance Methods [hide private]
 
__init__(self, path=None) source code
bool
commit(self, paths, message)
Commit the given list of paths, with the given message.
source code
dict of str -> list of str
createTree(self, paths)
Given the list of paths, create a dict of parentPath -> [child, ...] If the path is in the root of the repository, parentPath will be ''
source code
str
diff(self, path)
Return a diff for the given path.
source code
list of str
getAdded(self, path)
Get a list of paths newly added under the given path.
source code
 
getChanges(self, path, diff=None)
Get a list of changes for the given path and subpaths.
source code
list of str
getDeleted(self, path)
Get a list of paths deleted under the given path.
source code
 
getFileMatcher(self)
Return an re matcher object that will expand to the file being changed.
source code
 
getNotIgnored(self)
Returns: list of paths unknown to the VCS, relative to the base path
source code
dict of str -> list of str
getPropertyChanges(self, path)
Get a list of property changes for the given path and subpaths.
source code
 
ignore(self, paths, commit=True)
Make the VCS ignore the given list of paths.
source code
 
update(self, path)
Update the given path to the latest version.
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Class Variables [hide private]
  logCategory = 'VCS'
Implementors can provide a category to log their messages under.
  name = 'Some Version Control System'
Method Details [hide private]

commit(self, paths, message)

source code 

Commit the given list of paths, with the given message. Note that depending on the VCS, parents that were just added may need to be commited as well.

Parameters:
  • paths (list)
  • message (str)
Returns: bool

diff(self, path)

source code 

Return a diff for the given path.

Returns: str
the diff

getAdded(self, path)

source code 

Get a list of paths newly added under the given path.

Returns: list of str
list of paths

getChanges(self, path, diff=None)

source code 

Get a list of changes for the given path and subpaths.

Parameters:
  • diff (str) - the diff to use instead of a local vcs diff (only useful for testing)
Returns:
dict of path -> list of (oldLine, oldCount, newLine, newCount)

getDeleted(self, path)

source code 

Get a list of paths deleted under the given path.

Returns: list of str
list of paths

getFileMatcher(self)

source code 

Return an re matcher object that will expand to the file being changed.

The default implementation works for CVS and SVN.

getNotIgnored(self)

source code 
Returns:
list of paths unknown to the VCS, relative to the base path

getPropertyChanges(self, path)

source code 

Get a list of property changes for the given path and subpaths. These are metadata changes to files, not content changes.

Returns: dict of str -> list of str
dict of path -> list of property names

ignore(self, paths, commit=True)

source code 

Make the VCS ignore the given list of paths.

Parameters:
  • paths (list of str) - list of paths, relative to the checkout directory
  • commit (boolean) - if True, commit the ignore updates.