Op Woensdag 2007-09-05 skryf lars: > Hi, > > currently the versioncontrol.py file contains some duplicate code. > The attached patch improves this by moving the code to the base class > of > the revision control interfaces.
versioncontrol.py | 319 +++++++++++++++++++++--------------------------------- 1 file changed, 126 insertions(+), 193 deletions(-) :-) > Additionally the following issues are fixed: > - add the "--git-dir" parameter to every git call to allow the git > repositories > to be in locations different from the current directory > - fix the relative path handling of bzr and darcs for the same reason > > I tested the patch with pootle and subversion in a linux system. > Additionally I tested the operation "getcleanfile" for all supported > revision > control systems. We will need to hear from Miklos about testing the other systems. > > I would be glad to receive some feedback regarding the way I > implemented the > functions of the base class. > Is its interface easily understandable (e.g. for implementing other > RCS connectors)? Perhaps the one thing that might not be obvious is the explanation of ABSOLUTE_LOCATION. Someone reading it won't necessarily know what self.location or "the base directory" is. But now I'm being really difficult :-) > Is it generic enough for other revision control systems, that are not > yet > implemented? I'm not familiar with any systems that work differently from the ones we already have. > I am open to suggestion for improvements! Not that there is anything wrong with the current patch, but these are some things I just thought of: - Let's write the comments with multiline string style comments. This way epydoc can generate nice documentation for each part of the base class. (It needs to be below the declared variable - check translate/lang/common.py for example). - Should we perhaps check in the base class' __init__ that the required variables were actually overridden? - Should we perhaps provide empty update, getcleanfile, and commitfile methods in the base class? Perhaps a NotImplementedError or something like that will help developers. These methods are not really optional. None of them very important, as I said. > > From my point of view, this would be the last necessary patch, before > moving > the revision control interface to the translate toolkit, as it was > suggested > before. > > regards, > Lars > Great! I'm excited about the progress. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle