Re: Trying to demo review board

2010-07-20 Thread Chris Clark
My 2 cents, if you want to demo ReviewBoard you really should use a 
supported SCM.


Adding support for an SCM isn't super hard BUT it isn't super trivial 
either. There isn't a how-to doc for adding an SCM, you just have to be 
committed to doing it. I know as I've done it. It really isn't hard but 
it could take you a few days. I got started by setting up ReviewBoard 
with Subversion and debugging through the Subversion support to check 
internal behavior (I probably could have used the test suite but I used 
a demo site I setup).


ReviewBoard needs original files to apply the diffs/patches too.

One idea I've had is that someone (i.e. not me ;-) ) could implement a 
fake SCM for ReviewBoard that will parse diffs and create fake files for 
ReviewBoard to patch. E.g. in scmtools create a new module called 
fake_unifieddiff.py with a class of FakeUnifiedDiffTool( subclass of 
SCMTool) and a FakeUnifiedDiffParser(that sub classes DiffParser). 
FakeUnifiedDiffParser would then process unified diffs and convert into 
pre patch files and store them (e.g. on the file system). 
FakeUnifiedDiffTool could then pick up the processed files when 
ReviewBoard asks for the original file.


E.g.  Consider the following:

>type \tmp\orig.txt
   This is line 1
   This is line 2
   This is line 3
   This is line 4
   This is line 5
   This is line 6

>type \tmp\new.txt
   This is line 1
   This is line 2
   This is line 3 which has been changed
   This is line 4
   This is line 5
   This is line 6
   This is line 7

>diff -u \tmp\orig.txt \tmp\new.txt
   --- \tmp\orig.txt   Tue Jul 20 11:11:05 2010
   +++ \tmp\new.txtTue Jul 20 11:11:04 2010
   @@ -1,6 +1,7 @@
This is line 1
This is line 2
   -This is line 3
   +This is line 3 which has been changed
This is line 4
This is line 5
This is line 6
   +This is line 7


The fake diff parser would take the diff and try and create as much of 
the original file as possible to allow patch to succeed. In this example 
the diff actually has all of the original file visible, but if you have 
the following:


>diff -u \tmp\orig.txt \tmp\new.txt -c1
   diff: conflicting specifications of output style
   *** \tmp\orig.txt   Tue Jul 20 11:11:05 2010
   --- \tmp\new.txtTue Jul 20 11:11:04 2010
   ***
   *** 2,4 
 This is line 2
   ! This is line 3
 This is line 4
   --- 2,4 
 This is line 2
   ! This is line 3 which has been changed
 This is line 4
   ***
   *** 6 
   --- 6,7 
 This is line 6
   + This is line 7

Note, not all of the original file is visible (line 5) so I would 
suggest the fake parser simple create a blank line (you need a line 
there otherwise the patch will fail).


Issues:

  1. Clearly the limitation of this approach is that you can't expand
 all of the file when reviewing the change like you can with a real
 SCM tool
  2. If you are going to go to all the hassle of creating the fake
 scm/parser you could implement support for your existing SCM with
 the same amount of time/effort (provided you have Python support
 for your SCM already, if you do not you can cheat and spawn
 executables to do the work you need).


Chris

tpinet wrote:

I am in the exact same situation as Erik. I already have a script (on
Windows) that will grab a diff of a shelve set and save to a file on
the local system. If anyone is interested it is "tf diff /
shelveset: /format:unified /ignorespace /ignoreeol > the.diff".
The problem is that I can not move this diff into RB since there is no
TFS Repo support.

I opened http://code.google.com/p/reviewboard/issues/detail?id=1731
this week. I would be willing to pitch in to get some basic support
set up so our Org can use this great tool.

Tim

On Jul 7, 3:12 pm, Erik Bleifield  wrote:
  

I am seeking to propose using reviewboard at my company. We are one
more TFS shop.

Short of full TFS support, I am attempting to at least demo the
functionality of reviewboard for a group of interested folks.

I have some code files - initial and revisions - copied out to a
directory.

Is it possible to create a diff and upload it to review board without
having reviewboard set to comprehend any source code repository?

What are the steps to do this?

What *specifically* is the patch diff command to generate a properly
formatted diff for reviewboard to understand?

I currently have the current 1.0 release installed on a windows
server.

Thanks,

-Erik



  


--
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: Trying to demo review board

2010-07-17 Thread tpinet
I am in the exact same situation as Erik. I already have a script (on
Windows) that will grab a diff of a shelve set and save to a file on
the local system. If anyone is interested it is "tf diff /
shelveset: /format:unified /ignorespace /ignoreeol > the.diff".
The problem is that I can not move this diff into RB since there is no
TFS Repo support.

I opened http://code.google.com/p/reviewboard/issues/detail?id=1731
this week. I would be willing to pitch in to get some basic support
set up so our Org can use this great tool.

Tim

On Jul 7, 3:12 pm, Erik Bleifield  wrote:
> I am seeking to propose using reviewboard at my company. We are one
> more TFS shop.
>
> Short of full TFS support, I am attempting to at least demo the
> functionality of reviewboard for a group of interested folks.
>
> I have some code files - initial and revisions - copied out to a
> directory.
>
> Is it possible to create a diff and upload it to review board without
> having reviewboard set to comprehend any source code repository?
>
> What are the steps to do this?
>
> What *specifically* is the patch diff command to generate a properly
> formatted diff for reviewboard to understand?
>
> I currently have the current 1.0 release installed on a windows
> server.
>
> Thanks,
>
> -Erik

-- 
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: Trying to demo review board

2010-07-14 Thread David Trowbridge
It's going to be really hard to configure a review board to work
without a source repository at all. There is a "local file" SCMTool
which reads the original version off disk instead of fetching it from
source control, but it was an early-stage debug tool and probably
doesn't work anymore (plus there's no post-review, UI, etc). Your best
option for a quick demo is probably to use our demo site:
http://demo.reviewboard.org/

-David



On Tue, Jul 13, 2010 at 8:01 AM, Erik Bleifield  wrote:
> Will post-review work without any source code repository configured?
>
> --
> 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

-- 
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: Trying to demo review board

2010-07-14 Thread Erik Bleifield
Will post-review work without any source code repository configured?

-- 
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: Trying to demo review board

2010-07-08 Thread Jan Koprowski


On 7 Lip, 21:12, Erik Bleifield  wrote:
> I am seeking to propose using reviewboard at my company. We are one
> more TFS shop.
>
> Short of full TFS support, I am attempting to at least demo the
> functionality of reviewboard for a group of interested folks.
>
> I have some code files - initial and revisions - copied out to a
> directory.
>
> Is it possible to create a diff and upload it to review board without
> having reviewboard set to comprehend any source code repository?

No because ReviewBoard assume they can show whole file on demand (not
only a diff). So they need version control somewhere to read rest of
the file if needed.

> What are the steps to do this?
>
> What *specifically* is the patch diff command to generate a properly
> formatted diff for reviewboard to understand?

Unix command "diff -u file.version1 file.version2" is ok. To patch
source you can use standard "patch" command from distribution/cygwin.
But there is dedicated tool to generate and send to Review Board diffs
called "post-review". Please - here You have documentation [http://
www.reviewboard.org/docs/manual/dev/users/tools/post-review/] about
this command.

> I currently have the current 1.0 release installed on a windows
> server.
>
> Thanks,
>
> -Erik

-- 
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