Initial Monotone Support

Review Request #393 — Created May 18, 2008 and submitted

Information

Review Board SVN (deprecated)

Reviewers

This basically works.  It depends on a local database which we somehow need to determine how to update.

Aside from that, binary files are not currently marked, and empty files cause the diff viewer to blow up.

I can provide some diffs for testing if anyone would so desire.

---

Round two, I think I got everything, although I'm not sure how to handle the FileNotFound, since I'm using file id's which don't contain the name or anything...

 
chipx86
  1. This is a good first pass. After these changes (mostly stylistic) we should get the post-review support written and get the known issues fixed up.
  2. /mtn.py (Diff revision 1)
     
     
    Maybe place this last in the file. We don't tend to use these, but I'm not opposed to it. Might be nice to standardize on them.
  3. /mtn.py (Diff revision 1)
     
     
     
     
     
    The things we're importing should start on the same line as the "from ... import". We should be able to fit one or two per line. Then continue them on the next line, indented with the first thing we're importing.
  4. /mtn.py (Diff revision 1)
     
     
     
     
    Two blank lines here.
  5. /mtn.py (Diff revision 1)
     
     
     
    I don't think we want to throw an ImportError. We might want something, but I'd rather we introduce a RepositoryNotFound exception in scmtools/core.py and use that.
  6. /mtn.py (Diff revision 1)
     
     
    if "mtn: misuse: no file" in err:
    
  7. /mtn.py (Diff revision 1)
     
     
    This should include the path and revision as arguments.
  8. /mtn.py (Diff revision 1)
     
     
     
     
    Two blank lines here.
  9. /mtn.py (Diff revision 1)
     
     
    SCMTool subclasses tend to be the first class in the file. Not a big deal, but we should try to standardize on that.
  10. /mtn.py (Diff revision 1)
     
     
     
     
    Two blank lines here.
  11. /mtn.py (Diff revision 1)
     
     
    If "is binary" in self.lines[linenum]:
  12. /mtn.py (Diff revision 1)
     
     
     
    Blank line before the return.
  13. /mtn.py (Diff revision 1)
     
     
    Excess blank line we can get rid of.
  14. 
      
chipx86
  1. Looking better.
  2. /scmtools/mtn.py (Diff revision 2)
     
     
    This should return an SCMError of some sort. SCMError("Repository %s does not exist" % path) would probably work.
  3. /scmtools/mtn.py (Diff revision 2)
     
     
     
     
    Call status "failure" like the other tools use. You can then squash the next few lines:
    
    if not failure:
        return out
    
    if "mtn: ...."
  4. /scmtools/mtn.py (Diff revision 2)
     
     
    No ">= 0"
  5. /scmtools/mtn.py (Diff revision 2)
     
     
    This should include the file and revision information, if they exist. (Provide as much as possible)
  6. 
      
david
  1. I've gotten tired of seeing this review request moulder here, so I've made the changes Christian asked for, listed the known limitations in a comment, and committed it. Hopefully someone else will come pick this up and finish it.
  2. 
      
Loading...