Hi Albert,

The SCMTool class is the communication layer between Review Board and
the repositories. Every supported source code management system (Git,
Subversion, etc.) have a corresponding SCMTool class.

Primarily, the class has a few main purposes: downloading files (based
on path and revision) from a repository, and parsing the diff (using a
custom DiffParser subclass) for revision information (and any special
metadata that's useful). There are some other things it does as well,
though, particularly in 1.5. For example, checking if a repository
path points to a valid repository, converting a SCM-specific revision
string into a normalized Review Board revision indicator, checking if
a file at all exists in a repository, and a few other small things.

Without knowing your needs, I can't say much. However, if you look at
the other SCMTool classes, you should have some good examples to work
from.

In Review Board, any bundled SCMTool must live in the scmtools
directory, and the module path must be included in setup.py. To get a
development environment to recognize it, you'd run
'./reviewboard/manage.py registerscmtools'. If you're using a
production environment with this tool, you can either build your own
package from your development tree, or package your SCMTool as a
third-party Python egg, add lines in your setup.py file based on the
SCMTool lines in Review Board's setup.py, install your package, and do
an rb-site upgrade on your site.

Christian


On Thursday, June 17, 2010, Albert <albert.geo...@gmail.com> wrote:
> I need to understand the role of SCMTool class and how a class
> inheriting from this should be implmented. Any information will be
> greatly appreciated.
>
> Thanks,
> Albert
>
> --
> Want to help the Review Board project? Donate today at 
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to 
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/reviewboard?hl=en

-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to