-
-
trunk/reviewboard/scmtools/hg.py (Diff revision 2) Separate these onto two lines (python style guidelines)
-
-
trunk/reviewboard/scmtools/hg.py (Diff revision 2) Trailing whitespace. I'll only mark this one, but you've got a few of these spread around -- just look for red blocks in the diff viewer here.
-
trunk/reviewboard/scmtools/hg.py (Diff revision 2) If Hg doesn't have a concept of changesets the way that perforce does, you probably don't need these for now. At the moment, this is just used for retrieving log information from the VCS for a revision that hasn't yet been committed.
-
trunk/reviewboard/scmtools/hg.py (Diff revision 2) Two blank lines between classes, please (here and below)
-
trunk/reviewboard/scmtools/tests.py (Diff revision 2) We should be able to add binary files to the svn repository just fine
Mercurial (hg) SCMTool
Review Request #97 — Created June 22, 2007 and submitted
Information | |
---|---|
mrowe | |
Review Board SVN (deprecated) | |
trunk | |
137 | |
Reviewers | |
reviewboard | |
Update 2007-08-09: Moved fixture data into its own JSON file. Catch up with upstream changes. General clean up. The tests now use a hg repo in testdata/hg_repo, which I couldn't attach to the patch. I have emailed a tarball to David. Update 2007-08-06: Uploaded a new diff to use the new DiffParser per Christian's comment. Update 2007-07-17: Uploaded a new diff that addresses the issues noted by Christian. Also, a small fix to the parsing of diffs that create files, and a small change to make us compatible with Mercurial 0.9.4 (repo.LookupError moved, so I use a more general and hopefully stable exception). ===== Update: Uploaded a new diff that fixes the style/whitespace issues noted. Now applies against rev 773 (in particular, the rename of SCMException to SCMError). I've also cleaned up the handling of diffs that create files, and overridden a more sensible method in DiffParser. ===== Update: Uploaded a new diff that now applies against the DiffParser patch (http://reviews.review-board.org/r/99/) directly, rather than against the GitTool patch. ===== A very tentative attempt at Mercurial support for reviewboard. This patch is based on Nick Loeve's git scmtool (http://reviews.review-board.org/r/80/). NOTE that it depends on the changes to DiffParser in that patch (so that HgTool can provide a parser for hg-style diffs). If anyone is interested, I have a mirror of the reviewboard source in mercurial (http://hg.mojain.com/mirrors/reviewboard) and a Mercurial Queues repo containing this patch and the git one it depends on (http://hg.mojain.com/patches/reviewboard).
Update 2007-08-09: tests working again--all tests passing. Update 2007-08-06: the tests are currently broken, due to an upstream change to django. I'm working on getting them fixed. ===== I have it talking to a Mercurial repository and correctly reading diffs. There are basic unit tests for the diff parsing and other supporting methods. I had to remove the test that actually retrieved a file from a repo, since I haven't found a good way of getting a repo into a patch (the .hg dir contains binary files). I suspect that the answer will be to create the repo dynamically as part of the fixture setup. (I have a rough version of this working, but it's not in this patch due to being *very* rough).
-
-
-
-
trunk/reviewboard/scmtools/hg.py (Diff revision 4) Go ahead and just remove this function. It's not used and will probably go away.
-
trunk/reviewboard/scmtools/hg.py (Diff revision 4) Can you change the indentation of the text to be the same as the """ ?
-
-
trunk/reviewboard/scmtools/fixtures/hg.json (Diff revision 4) This should probably be part of the default fixture.
-
-
-
trunk/reviewboard/scmtools/tests.py (Diff revision 4) Might be nice to have a utility function in the class that takes the diff contents and returns the result of parse()[0], so that we don't duplicate it everywhere.
-
-
-
-
-
trunk/reviewboard/scmtools/tests.py (Diff revision 5) Perhaps send us a tarball of the binary files for this?
-
-
trunk/reviewboard/scmtools/hg.py (Diff revision 5) This will now need to be updated to work with the new DiffParser changes in SVN (r852). You can find the review request for this on the All Review Requests page for docs on how this now works.