Re: Accessing different repo types from post-review
The way to do this would be to edit postreview.py either by adding some sort of directive as I think you are suggesting or by customizing for your site/usage. > > If it were me, I'd edit the SCMCLIENTS list definition (I've actually done > this for our site, I have customization for VMS so svn isn't checked as VMS > command spawning is not implemented in CPython or Jython). See > http://www.reviewboard.org/docs/codebase/dev/getting-started/ under > RBTools if you want to start with headrevs from git. > > E.g. I have something like: > > ### re-define SCMCLIENTS, this makes merging changes easier (than > customizing SCMCLIENTS) :-) > SCMCLIENTS = ( > SVNClient(), > PiccoloClient(), > ) > Personally, I'd love to be able to specify the right class in .reviewboardrc. We probably are going to have a student writing a new backend for post-review (and some new clients) so we'll be able to factor this into the design. Christian -- 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
Re: Accessing different repo types from post-review
Jay wrote: On Sep 21, 12:11 pm, Chris Clark wrote: It looks like p4 is claiming there is a perforce repo in the svn location. A quick "hack"/test would be to modify postreview to check svn first. I.e. hack the SCMCLIENTS def. Let's assume this suggestion actually works since it looks like the script first tries hg, then p4, probably then svn. It seems there needs to be a way to explicitly indicate which scm provider to use, rather than do it implicitly since it's conceivable they could all work for a given directory. Not really, it isn't good practice (IMHO) to use multiple SCMs in the same working directory. You may have a mix of SCM's under a given tree but not in the same directory. Take for instance the following structure: c:/dev - this is the root for the perforce clientspec c:/dev/myproject/vers1 - this is a perforce version of the project called out in the clientspec c:/dev/myproject/vers2 - this is the root for an svn repository for the project I could see how perforce might be picked up for myproject/vers2 even though it isn't specified in the perforce clientspec. If there was a way to explicitly declare the repo type, then this wouldn't be an issue. The way to do this would be to edit postreview.py either by adding some sort of directive as I think you are suggesting or by customizing for your site/usage. If it were me, I'd edit the SCMCLIENTS list definition (I've actually done this for our site, I have customization for VMS so svn isn't checked as VMS command spawning is not implemented in CPython or Jython). See http://www.reviewboard.org/docs/codebase/dev/getting-started/ under RBTools if you want to start with headrevs from git. E.g. I have something like: ### re-define SCMCLIENTS, this makes merging changes easier (than customizing SCMCLIENTS) :-) SCMCLIENTS = ( SVNClient(), PiccoloClient(), ) Chris -- 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
Re: Accessing different repo types from post-review
> > On Sep 21, 12:11 pm, Chris Clark wrote: > > >> It looks like p4 is claiming there is a perforce repo in the svn > >> location. A quick "hack"/test would be to modify postreview to check svn > >> first. I.e. hack the SCMCLIENTS def. > Let's assume this suggestion actually works since it looks like the script first tries hg, then p4, probably then svn. It seems there needs to be a way to explicitly indicate which scm provider to use, rather than do it implicitly since it's conceivable they could all work for a given directory. Take for instance the following structure: c:/dev - this is the root for the perforce clientspec c:/dev/myproject/vers1 - this is a perforce version of the project called out in the clientspec c:/dev/myproject/vers2 - this is the root for an svn repository for the project I could see how perforce might be picked up for myproject/vers2 even though it isn't specified in the perforce clientspec. If there was a way to explicitly declare the repo type, then this wouldn't be an issue. ...Jay -- 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
Re: Accessing different repo types from post-review
in file postreview.py somewhere in /usr/lib/python2.x/site-packges/rbtools/ (this could be zipped so You probably must use some smart editor which allow change files in zipped archives) On Tue, Sep 21, 2010 at 10:43 PM, Jay wrote: > On Sep 21, 12:11 pm, Chris Clark wrote: >> >> It looks like p4 is claiming there is a perforce repo in the svn >> location. A quick "hack"/test would be to modify postreview to check svn >> first. I.e. hack the SCMCLIENTS def. > > And where would the SCMCLIENTS.def be located? Is this on the client? > I can't seem to find any config files for post-review apart from > a .post-review-cookie file in "Local Settings/Application Data"... > > ...Jay > > -- > 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 -- ><> Jan Koprowski -- 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
Re: Accessing different repo types from post-review
On Sep 21, 12:11 pm, Chris Clark wrote: > > It looks like p4 is claiming there is a perforce repo in the svn > location. A quick "hack"/test would be to modify postreview to check svn > first. I.e. hack the SCMCLIENTS def. And where would the SCMCLIENTS.def be located? Is this on the client? I can't seem to find any config files for post-review apart from a .post-review-cookie file in "Local Settings/Application Data"... ...Jay -- 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
Re: Accessing different repo types from post-review
Jay wrote: I have post-review installed on windows and have successfully been creating RB requests against perforce. We also have SVN projects, but when I try to use post-review against them it wants to talk to perforce instead. For instance if I enter: post-review --server=http://somehost/reviewboard --repository- url=https://some-svn-repo-url --revision-range=0:999 --debug I see: hg root p4 info repository info: Path: sdgperforce:1666, Base path: None, Supports changesets: True So how do I get post-review to speak svn instead of perforce for a given request? The reviewboard instance is aware of the svn repositories and others that only post against svn don't seem to have a problem. It looks like p4 is claiming there is a perforce repo in the svn location. A quick "hack"/test would be to modify postreview to check svn first. I.e. hack the SCMCLIENTS def. Chris -- 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