Diff format description in documentation

2010-12-20 Thread Steen Manniche
Hi all,

I noticed that in the documentation, there is a subsection explaining diff 
formats, esp. context and unified diff. What is perhaps missing is a guide 
on how to produce them using the diff tool, ie. which options to give diff 
in order to produce the outputs.

Something along the lines of:

To produce a unified diff, use:
diff -u oldfile newfile
To produce a context diff, use:
diff -c oldfile newfile

It could be benificial to include a link to either gnu docs 
(http://www.gnu.org/software/hello/manual/diff/Context-Format.html#Context-Format
 
and http://www.gnu.org/software/hello/manual/diff/Unified-Format.html) or 
wikipedia (http://en.wikipedia.org/wiki/Diff#Context_format and 
http://en.wikipedia.org/wiki/Diff#Unified_format)

Should I open an enhancement item in the issue tracker for this?

Best regards,
Steen

-- 
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: Diff format description in documentation

2010-12-20 Thread Christian Hammond
Hi Steen,

You're welcome to open the enhancement request. Linking to the
Wikipedia docs would be useful.

However, GNU diff is not sufficient to generate a diff compatible with
Review Board. It must specifically be a diff generated by a
SCM-specific tool, such as 'svn diff' or 'git diff'. Even then, we
recommend to people that they use our post-review tool, as that works
around various issues in diffs generated by some of these tools (and
is even required for such systems as Perforce).

So, rather than a quick link to those docs, what we'd really need is
an in-depth guide to generating diffs for Git, SVN, Perforce, and
every other one we support. It may be a useful thing to have, but I'd
much rather tell people use post-review. There's work being done on
a new set of scripts in our RBTools package, one of which will produce
a proper, compatible diff for a given type of repository. We'll be
pointing people to that once it's out, and it'd sufficiently replace
that guide.

I don't want to encourage people too highly to start playing with
arguments for diff generation, as it can potentially cause
compatibility problems, and not all arguments are even supported by
the various tools.

Christian

--
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com



On Mon, Dec 20, 2010 at 2:19 AM, Steen Manniche boxun...@gmail.com wrote:
 Hi all,

 I noticed that in the documentation, there is a subsection explaining diff
 formats, esp. context and unified diff. What is perhaps missing is a guide
 on how to produce them using the diff tool, ie. which options to give diff
 in order to produce the outputs.

 Something along the lines of:

 To produce a unified diff, use:
 diff -u oldfile newfile
 To produce a context diff, use:
 diff -c oldfile newfile

 It could be benificial to include a link to either gnu docs
 (http://www.gnu.org/software/hello/manual/diff/Context-Format.html#Context-Format
 and http://www.gnu.org/software/hello/manual/diff/Unified-Format.html) or
 wikipedia (http://en.wikipedia.org/wiki/Diff#Context_format and
 http://en.wikipedia.org/wiki/Diff#Unified_format)

 Should I open an enhancement item in the issue tracker for this?

 Best regards,
 Steen

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