You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/07/29 22:23:18 UTC
rapidsvn feedback
Hi guys -- I've started looking at rapidsvn, and I wanted to throw
some feedback your way. Obviously, none of this is meant to be a
personal attack... just pure constructive criticism from an outsider.
First, I think steps need to be taken to "lower the barrier" for other
people to contribute. There are a few simple policies that Subversion
itself has followed from the very beginning, and I think these
policies have a made a *huge* difference in increasing the
user-friendliness of the code. Certainly, nobody is going to tell you
how to run your project. :-) But you should still mull these ideas
over, give them some thought:
* 80-column code formatting. Not everyone in the world uses tiny
fonts in an editor that takes up the whole screen.
* Using spaces for all indentation, instead of tabs. We have
support-files that give us this behavior in Emacs and vi. It
keeps the code looking clean and neat, no matter how you're
viewing it. Most modern editors will do the Right Thing and keep
code aligned as you work, even when indentation is all spaces. At
the moment, a lot of your code looks weirdly misaligned.
* Choose a log message policy. I already see some vague messages in
your log; it's not really clear what happened in every commit. I
shouldn't have to force myself to run 'svn log -v' or 'svn diff
-rN' to figure out what people did. The Subversion project uses a
log policy documented in our HACKING file; or maybe you want to
make up your own. Just avoid ambiguous log messages -- choose
some policy!
* EOL style: some of your source files seem to have CRLF endings,
and some just have LF endings. If you have a lot of
cross-platform developers, you probably want to set
'svn:eol-style' to 'native' on everything. CVS does this by
default, but SVN does not. If you don't set this property, I fear
you're going to end up with a lot of flip-flopping of eol styles
in the future.... which means you won't be able to see changes
when you run 'svn diff'; the *entire* file will look changed.
* Commit policies. Choose some that you like, and stick with them.
For example, a first good policy is to make sure that HEAD always
compiles cleanly. This kind of discipline really pays off; when
somebody checks out the latest rapidsvn code and it fails on a
syntax error..., they get very frustrated. (Which is what I'm
getting right now, by the way...) Continuing on this theme,
another good policy is to make sure that HEAD always compiles
against the latest Subversion API. People are making commits to
the main Subversion code every day, and the API won't be frozen
until 1.0. Two days ago, I couldn't compile rapidsvn because the
interface to 'svn_client_status' had changed since Alpha, and
apparently no rapidsvn developers had noticed -- they were still
using week-old header files! I'm not saying that you need to
stand by, nervously waiting for the svn API to change, ready to
instantly patch rapidsvn; instead, if you're about to commit a
change to rapidsvn, make sure that your working copy compiles
against the latest svn libraries. At least that way we can
backdate our svn libraries to the date of the last rapidsvn
commit, and know it will work!
Second, I have comments about the actual content/design of rapidsvn.
These are purely personal opinions, just my first impressions:
* It seems strange to me that you've got a big window pane that is
essentially showing the output of 'svn st -v': the working
revision, the last changed rev, and so on. But the *whole* point
of 'svn status' is to show the "status" of a file: is it locally
modified? Is it in a state of conflict? Is it scheduled for
addition or deletion? Instead, I have to push a button (or
right-menu-click) to run "status" on the individual item. I don't
understand why the the status enum isn't being used and displayed
right there in the main list; svn_client_status() is giving you
everything you need already. (And every other svn GUI I've seen
is doing this.)
* I also don't understand the output-scroll area at the bottom of
the screen. It looks (at first glance) like you're just capturing
the output of the commandline-client as it runs! After playing
with it a bit, I can tell that's not really true... but I still
don't understand the motivation. Why are you trying to mimic the
output of the commandline program? Why would a GUI user want to
see little U's and G's flying by during an update? I think you
should be making use of the *GUI* somehow. Make the updated items
light up in different colors. Mark conflicted items as red. And
so on. I'm just encouraging you to think "beyond the commandline
box." :-)
Anyway, looks like you guys are off to a good start. I hope this
feedback was useful!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Tom Lord <lo...@regexps.com>.
> maybe it's just that i'm spoiled by working on subversion, but it goes
> a long way towards making someone want to spend time digging through
> the code.
+1
-t
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by cm...@collab.net.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> On Mon, Jul 29, 2002 at 05:23:18PM -0500, Ben Collins-Sussman wrote:
>
> > * 80-column code formatting.
> > * Using spaces for all indentation, instead of tabs.
> > * Choose a log message policy.
> > * EOL style:
> > * Commit policies.
>
> +1 on all of that.
>
> i would like to contribute more fixes to problems that i find, but
> it's not a whole lot of fun going through code that feels sloppy, not
> because of anything that's technically wrong with it, but just because
> of formatting or policy issues, which is what these are.
>
> maybe it's just that i'm spoiled by working on subversion, but it goes
> a long way towards making someone want to spend time digging through
> the code.
Second that. I actually was preparing a patch for rapidsvn this
weekend, but because my VC6 is setup to use spaces instead of tabs
(configured that way because of my Subversion work), I actually opted
out of making the patch. I very much want to actively contribute to
rapidsvn, but it would drive me nuts to have to reconfigure my editor
preferences every time I switch between that code and Subversion's.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Mon, Jul 29, 2002 at 05:23:18PM -0500, Ben Collins-Sussman wrote:
> * 80-column code formatting.
> * Using spaces for all indentation, instead of tabs.
> * Choose a log message policy.
> * EOL style:
> * Commit policies.
+1 on all of that.
i would like to contribute more fixes to problems that i find, but
it's not a whole lot of fun going through code that feels sloppy, not
because of anything that's technically wrong with it, but just because
of formatting or policy issues, which is what these are.
maybe it's just that i'm spoiled by working on subversion, but it goes
a long way towards making someone want to spend time digging through
the code.
-garrett
--
garrett rooney Remember, any design flaw you're
rooneg@electricjellyfish.net sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn propset:eol-style commit error
Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On Tue, Jul 30, 2002 at 07:23:40PM -0400, Garrett Rooney wrote:
> > On Tue, Jul 30, 2002 at 04:19:42PM -0700, Brent R. Matzelle
> wrote:
> > > Hello gentlemen,
> > >
> > > I just did a large commit that changed several files to
> eol-style
> > > native and received the error below. Does this present a
> problem?
> >
> > yes. there are files in the repository wiht mixed windows and
> unix
> > line endings, so subversion is failing to do the conversion to
> native
> > when you try to update or check out the code.
>
> actually, i'm wrong. it turns out svn will handle it fine if you
> download the directory from scratch, but if your text base files
> already have mixed line endings (mine did, yours seem to, sussmans
> didn't for some reason), you will get the error.
>
> i just blew away rapidsvn/src and 'svn up'd and it worked.
That worked nicely. Thanks.
Brent
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn propset:eol-style commit error
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tue, Jul 30, 2002 at 07:23:40PM -0400, Garrett Rooney wrote:
> On Tue, Jul 30, 2002 at 04:19:42PM -0700, Brent R. Matzelle wrote:
> > Hello gentlemen,
> >
> > I just did a large commit that changed several files to eol-style
> > native and received the error below. Does this present a problem?
>
> yes. there are files in the repository wiht mixed windows and unix
> line endings, so subversion is failing to do the conversion to native
> when you try to update or check out the code.
actually, i'm wrong. it turns out svn will handle it fine if you
download the directory from scratch, but if your text base files
already have mixed line endings (mine did, yours seem to, sussmans
didn't for some reason), you will get the error.
i just blew away rapidsvn/src and 'svn up'd and it worked.
-garrett
--
garrett rooney Remember, any design flaw you're
rooneg@electricjellyfish.net sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn propset:eol-style commit error
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tue, Jul 30, 2002 at 04:19:42PM -0700, Brent R. Matzelle wrote:
> Hello gentlemen,
>
> I just did a large commit that changed several files to eol-style
> native and received the error below. Does this present a problem?
yes. there are files in the repository wiht mixed windows and unix
line endings, so subversion is failing to do the conversion to native
when you try to update or check out the code.
we need to change the svn:eol-style back, then fix the code to have
the same line endings. unfortunately this will be a bit difficult if
one cannot get a valid working copy to play with so you can do the
'svn merge'.
any suggestions guys?
all i can think of is doing a remote 'svn cp' to copy the previous
revision over the current revision. that would likely get rid of it.
-garrett
--
garrett rooney Remember, any design flaw you're
rooneg@electricjellyfish.net sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn propset:eol-style commit error
Posted by Philip Martin <ph...@codematters.co.uk>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:
> I just did a large commit that changed several files to eol-style
> native and received the error below. Does this present a problem?
>
> svn_error: #21030 : <Inconsistent line ending style>
> C:/dev/rapidsvn/src/action_thread.h
Issue 601 :-/
http://subversion.tigris.org/issues/show_bug.cgi?id=601
"eol conversion and keyword expansion need regression tests"
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
svn propset:eol-style commit error
Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
Hello gentlemen,
I just did a large commit that changed several files to eol-style
native and received the error below. Does this present a problem?
Brent
svn_error: #21002 : <A general problem occured>
Commit succeeded, but other errors follow:
svn_error: #21046 : <Problem running log>
Error bumping revisions post-commit (details follow):
svn_error: #21046 : <Problem running log>
in directory C:/dev/rapidsvn/src
svn_error: #21046 : <Problem running log>
start_handler: error processing command 'committed' in
C:/dev/rapidsvn/src
svn_error: #21046 : <Problem running log>
error replacing text-base: action_thread.h
svn_error: #21030 : <Inconsistent line ending style>
C:/dev/rapidsvn/src/action_thread.h
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Mark Brown <br...@sirena.org.uk>.
On Tue, Jul 30, 2002 at 02:50:56AM +0200, Branko ??ibej wrote:
> I agree that the information is useful, I just don't agree it should be
> in the Subversion Handbook. I wouldn't mind if you create another
> document, and have the handbook refer to it; but IMHO the handbook
> should be about mechanics, not politics. :-)
At least the EOL issue belongs in the handbook (probably under the
"Subversion for CVS users" section or similar) since that's a technical
difference and it is likely to bite people.
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Scott Lamb wrote:
> Branko Čibej wrote:
>
>> Josef Wolf wrote:
>>
>>> *PLEASE* add this great summary to the handbook! A chapter named
>>> "Good Practices" or some such would be great.
>>
>>
>> No. The handbook is about using Subversion, not about good project
>> management practices.
>
>
> Why?
>
> This information would be helpful. These are particularly important
> when using SCM systems. Subversion now is getting relatively
> experienced users who have used CVS, were dissatisfied, and are
> willing to be on the bleeding edge to get something better. But
> post-1.0, there will users who have never used another SCM system and
> are not familiar with these ideas.
There are hundreds of books about project management and SCM.
I agree that the information is useful, I just don't agree it should be
in the Subversion Handbook. I wouldn't mind if you create another
document, and have the handbook refer to it; but IMHO the handbook
should be about mechanics, not politics. :-)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices (was: rapidsvn feedback)
Posted by Michael Wood <mw...@its.uct.ac.za>.
On Tue, Jul 30, 2002 at 08:57:11PM -0500, Karl Fogel wrote:
> Greg Stein <gs...@lyra.org> writes:
> > The meaning that Karl meant from http://www.dictionary.com/:
> >
> > v. intr.
> >
> > 1. To fish by trailing a line, as from a moving boat.
> > 2.
> > 1. To wander about; ramble.
> > 2. Slang. To patrol an area in search for someone or something.
> > 3. Music. To sing heartily or gaily.
> > 4. To roll or spin around.
> >
> > 2.1 is the meaning he is going for.
> >
> > Cheers,
> > -g
>
> Speaking of nuances!... :-)
And all along I thought it was 2.2 ;)
--
Michael Wood <mw...@its.uct.ac.za>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices (was: rapidsvn feedback)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> The meaning that Karl meant from http://www.dictionary.com/:
>
> v. intr.
>
> 1. To fish by trailing a line, as from a moving boat.
> 2.
> 1. To wander about; ramble.
> 2. Slang. To patrol an area in search for someone or something.
> 3. Music. To sing heartily or gaily.
> 4. To roll or spin around.
>
> 2.1 is the meaning he is going for.
>
> Cheers,
> -g
Speaking of nuances!... :-)
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best practices #2
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> Revised version after Karl's comments.
> Add "Best Practices" chapter to handbook.
>
> * doc/handbook/best_practices.texi:
> New file with tips to use Subversion more effectively.
>
> * doc/handbook/svn-handbook.texi:
> Link to new chapter.
Applied in revision 2916.
You cleaned up some of the overly-verbose phrasing from my email, too,
thanks :-).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] Best practices #2
Posted by Scott Lamb <sl...@slamb.org>.
Revised version after Karl's comments.
--
Scott Lamb
Add "Best Practices" chapter to handbook.
* doc/handbook/best_practices.texi:
New file with tips to use Subversion more effectively.
* doc/handbook/svn-handbook.texi:
Link to new chapter.
Index: ./doc/handbook/svn-handbook.texi
===================================================================
--- ./doc/handbook/svn-handbook.texi
+++ ./doc/handbook/.svn/tmp/svn-handbook.texi.62476.00001.tmp Thu Aug 8 15:08:56 2002
@@ -97,12 +97,14 @@
* Getting Started:: History, installation and overview of Subversion.
* Client Cookbook:: How to use the Subversion client.
* Repository Administration:: Managing a repository.
+* Best Practices:: Tips to use Subversion more effectively.
* Appendices:: Other useful documents and pointers.
@end menu
@include getting_started.texi
@include client.texi
@include repos_admin.texi
+@include best_practices.texi
@include appendices.texi
@bye
Index: ./doc/handbook/best_practices.texi
===================================================================
--- ./doc/handbook/best_practices.texi
+++ ./doc/handbook/best_practices.texi Thu Aug 8 15:04:54 2002
@@ -0,0 +1,202 @@
+@node Best Practices
+@chapter Best Practices
+
+Tips to use Subversion more effectively.
+
+In this chapter, we'll focus on how to avoid some pitfalls of version
+control systems in general and Subversion specifically.
+
+@menu
+* Source code formatting::
+* When you commit::
+@end menu
+
+
+
+@c ------------------------------------------------------
+@node Source code formatting
+@section Source code formatting
+
+Subversion diffs and merges text files work on a line-by-line basis. They
+don't understand the syntax of programming languages or even know when
+you've just reflowed text to a different line width.
+
+Given this design, it's important to avoid unnecessary reformatting. It
+creates unnecessary conflicts when merging branches, updating working
+copies, and applying patches. It also can drown you in noise when viewing
+differences between revisions.
+
+You can avoid these problems by following clearly-defined formatting rules.
+The Subversion project's own
+@uref{http://svn.collab.net/repos/svn/trunk/HACKING,HACKING} document and
+the @uref{http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html,Code
+Conventions for the Java Programming Language} are good examples.
+
+Tabs are particularly important. Some projects, like Subversion, do not use
+tabs at all in the source tree. Others always use them and define a
+particular tab size.
+
+It can be very helpful to have an editor smart enough to help adhere to
+these rules. For example, @command{vim} can do this on a per-project basis
+with @file{.vimrc} commands like the following:
+
+@verbatim
+autocmd BufRead,BufNewFile */rapidsvn/*.{cpp,h}
+ setlocal ts=4 noexpandtab
+autocmd BufRead,BufNewFile */subversion/*.[ch]
+ setlocal sw=2 expandtab cinoptions=>2sn-s{s^-s:s
+@end verbatim
+
+Check your favorite editor's documentation for more information.
+
+@subsection When you have to reformat
+
+In the real world, we're not always so perfect. Formatting preferences may
+change over time, or we may just make mistakes. There are things you can do
+to minimize the problems of reformatting.
+
+These are good guidelines to follow:
+
+@itemize @bullet
+@item If you're making a sweeping reformatting change, do it in a single
+commit with no semantic changes. Give precise directions on duplicating
+formatting changes.
+@item If you've made semantic changes to some area of code and see
+inconsistent formatting in the immediate context, it's okay to reformat.
+Causing conflicts is not as great a concern because your semantic changes
+are likely to do that anyway.
+@end itemize
+
+Here's an example of a sweeping reformat:
+
+@example
+$ svn co file:///repo/path/trunk indent_wc
+$ indent -gnu indent_wc/src/*.[ch]
+$ svn commit -m 'Ran indent -gnu src/*.[ch]' indent_wc
+@end example
+
+This follows all rules: there were no semantic changes mixed in (no files
+were changed other than through @command{indent}). The @command{indent}
+commandline was given, so the changes can be very easily duplicated. All the
+reformatting was done in a single revision.
+
+Let's say these changes occurred to the trunk at revision 26. The head
+revision is now 42. You created a branch at revision 13 and now want to
+merge it back into the trunk. Ordinarily you'd do this:
+
+@example
+$ svn co file://repo/path/trunk merge_wc
+$ svn merge -r 13:head file://repo/path/branches/mybranch merge_wc
+@dots{} # resolve conflicts
+$ svn commit -m 'Merged branch'
+@end example
+
+But with the reformatting changes, there will be many, many conflicts. If
+you follow these rules, you can merge more easily:
+
+@example
+$ svn co -r 25 file://repo/path/trunk merge_wc
+$ svn merge -r 13:head file://repo/path/branches/mybranch merge_wc
+@dots{} # resolve conflicts
+$ indent -gnu src/*.[ch]
+$ svn up
+@dots{} # resolve conflicts
+$ svn commit -m 'Merged branch'
+@end example
+
+In English, the procedure is:
+
+@itemize @bullet
+@item Check out a pre-reformatting trunk working copy.
+@item Merge all branch changes. Fix conflicts.
+@item Reformat in the same manner.
+@item Update to the head revision. Fix conflicts.
+@item Check in the merged working copy.
+@end itemize
+
+@subsection Ignoring whitespace differences
+
+When viewing differences between revisions, you can customize
+@command{svn diff} output to hide whitespace changes. The @samp{-x} argument
+passes arguments through to GNU diff. Here are some useful arguments:
+
+@table @b
+@item @samp{-b}
+Ignore differences in whitespace only.
+@item @samp{-B}
+Ignore added/removed blank lines.
+@item @samp{-i}
+Ignore changes in case.
+@item @samp{-t}
+Expand tabs to spaces to preserve alignment.
+@item @samp{-T}
+Output a tab rather than a space at the beginning of each line to start on a
+tab stop.
+@end table
+
+The commit emails always show whitespace-only changes.
+@file{commit-email.pl} uses @command{svnlook diff} to get differences, which
+doesn't support the @samp{-x} option.
+
+@subsection Line endings
+
+Different platforms (Unix, Windows, MacOS) have different conventions for
+marking the line endings of text files. Simple editors may rewrite line
+endings, causing problems with diff and merge. This is a subset of the
+formatting problems.
+
+Subversion has built-in support for normalizing line endings. To enable it,
+set the @samp{svn:eol-style} property to ``native''. @xref{Properties}.
+
+
+@c ------------------------------------------------------
+@node When you commit
+@section When you commit
+
+It pays to take some time before you commit to review your changes and
+create an appropriate log message. You are publishing the newly changed
+project anew every time you commit. This is true in two senses:
+
+@itemize @bullet
+@item When you commit, you are potentially destabilizing the head revision.
+Many projects have a policy that the head revision is ``stable'' --- it
+should always parse/compile, it should always pass unit tests, etc. If you
+don't get something right, you may be inconveniencing an arbitrary number of
+people until someone commits a fix.
+@item You can not easily remove revisions. (There is no equivalent to
+@samp{cvs admin -o}.) If you might not want something to be in the
+repository, make sure it is not included in your commit. Check for
+sensitive information, autogenerated files, and unnecessary large files.
+@end itemize
+
+If you later don't like your log message, it is possible to change it. The
+@samp{svnadmin setlog} command will do this locally. You can set up the
+@uref{http://svn.collab.net/repos/svn/trunk/tools/cgi/tweak-log.cgi,tweak-log.cgi}
+script to allow the same thing remotely. All the same, creating a good log
+message beforehand helps clarify your thoughts and avoid committing a mistake.
+
+You should run a @samp{svn diff} before each commit and ask yourself:
+
+@itemize @bullet
+@item do these changes belong together? It's best that each revision is a
+single logical change. It's very easy to forget that you've started another
+change.
+@item do I have a log entry for these changes?
+@end itemize
+
+Defining a log entry policy is also helpful --- the Subversion
+@uref{http://svn.collab.net/repos/svn/trunk/HACKING,HACKING} document is a
+good model. If you always embed filenames, function names, etc. then you can
+easily search through the logs with
+@uref{http://svn.collab.net/repos/svn/trunk/tools/client-side/search-svnlog.pl,search-svnlog.pl}.
+
+You may want to write the log entry as you go. It's common to create a file
+@file{changes} with your log entry in progress. When you commit, use
+@samp{svn ci -F changes}.
+
+@subsection Binary files
+
+Subversion does not have any way to merge or view differences of binary
+files, so it's critical that these have accurate log messages. Since you
+can't review your changes with @samp{svn diff} immediately before
+committing, it's a particularly good idea to write the log entry as you go.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> I've had bad luck before with merging not being smart enough to
> realize a change has already been done, especially when I've had to
> adapt it a bit. This would say so explicitly.
I don't see why the --no-merge flag would address that problem, if
running indent before the second update doesn't address it. In any
case, we have a much more general plan for handling repeated merges
(not started implementing yet, but it shouldn't require the user to be
aware of the reindent).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
> Scott Lamb <sl...@slamb.org> writes:
>
>>Then let's say I've checked out revision 62. At revision 65, someone
>>reindented. I've made changes to my working copy and want to commit
>>them without conflict. I could this with:
>>
>> $ svn up -r 64
>> $ svn up -r 65 --no-merge
>> $ indent -gnu src/*.[ch]
>> $ svn up
>
>
> Why not just run indent before you update to rev 65?
I've had bad luck before with merging not being smart enough to realize
a change has already been done, especially when I've had to adapt it a
bit. This would say so explicitly.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> Then let's say I've checked out revision 62. At revision 65, someone
> reindented. I've made changes to my working copy and want to commit
> them without conflict. I could this with:
>
> $ svn up -r 64
> $ svn up -r 65 --no-merge
> $ indent -gnu src/*.[ch]
> $ svn up
Why not just run indent before you update to rev 65?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
> Karl Fogel <kf...@newton.ch.collab.net> writes:
>
>> * If you're working in some area of code anyway, and you see
>> inconsistent indentation in the context lines around that area,
>> it's okay to fix them up too while you're there. Just point out
>> in the log message that there were also formatting changes, so
>> people know to ignore them when scanning the change. In fact,
>> this kind of gradual, as-you-go reindentation is one of the best
>> ways to get a badly indented but active code base into shape,
>> while still avoiding a painful "flag day" on which everything
>> gets reindented at once. (Not that we have that problem, but CVS
>> does, and this is how they're solving it).
>
>
> Oh, I forgot mention an important reason to avoid sweeping
> reformattings. People may have outstanding patches (at home, attached
> to an issue, posted to a website, whatever), and big reformats make
> those patches suddenly inapplicable, or at any rate much harder to
> apply.
Okay, I'll mention that reason.
I have to wonder if there's a fairly easy way to reduce this problem,
similar to how my branch example works.
Hmm, let's say there's an argument to "svn up" or "svn switch" called
"--no-merge". It updates the working copy base files only. Useful for
explicitly saying "I've already merged this".
Then let's say I've checked out revision 62. At revision 65, someone
reindented. I've made changes to my working copy and want to commit them
without conflict. I could this with:
$ svn up -r 64
$ svn up -r 65 --no-merge
$ indent -gnu src/*.[ch]
$ svn up
And there'd be no conflict. Still an inconvenience, but I think less so
if you've made a lot of changes.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Karl Fogel <kf...@newton.ch.collab.net> writes:
> * If you're working in some area of code anyway, and you see
> inconsistent indentation in the context lines around that area,
> it's okay to fix them up too while you're there. Just point out
> in the log message that there were also formatting changes, so
> people know to ignore them when scanning the change. In fact,
> this kind of gradual, as-you-go reindentation is one of the best
> ways to get a badly indented but active code base into shape,
> while still avoiding a painful "flag day" on which everything
> gets reindented at once. (Not that we have that problem, but CVS
> does, and this is how they're solving it).
Oh, I forgot mention an important reason to avoid sweeping
reformattings. People may have outstanding patches (at home, attached
to an issue, posted to a website, whatever), and big reformats make
those patches suddenly inapplicable, or at any rate much harder to
apply.
And the reason that gradual, as-you-go reformatting is good is that it
means you're doing the reformatting in an area of code that's changing
*anyway*, so you're not likely to be making a patch inapplicable
unless it was going to be made inapplicable anyway (by the semantic
changes).
I think it would be good to explain this. People often think of
working copies and the repository, but forget to think about other
places where changes might be stored.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: removing a revision (Re: [PATCH] Best Practices)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Michael Price <mp...@atl.lmco.com> writes:
> I tried it over ra_dav. Since only the httpd process was growing with the
> size of the file I figured it was just a ra_dav issue and didn't try the
> local case. The resident set size of the subversion process was only a few
> megabytes and didn't change during the entire operation.
>
> Would you like me to fill out the issue or will you do it?
Would you mind filling it out? You're the "primary source" :-)...
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: removing a revision (Re: [PATCH] Best Practices)
Posted by Michael Price <mp...@atl.lmco.com>.
Karl Fogel writes:
> Okay, thanks. This is broken, of course; memory use should be roughly
> constant, with data arriving streamily. But I think it's a problem we
> sort of knew about, although we don't have an issue filed for it.
>
> Were you doing this over ra_local or ra_dav? Or did you try both?
> Curious to know if it behaved the same...
I tried it over ra_dav. Since only the httpd process was growing with the
size of the file I figured it was just a ra_dav issue and didn't try the
local case. The resident set size of the subversion process was only a few
megabytes and didn't change during the entire operation.
Would you like me to fill out the issue or will you do it?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: removing a revision (Re: [PATCH] Best Practices)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Okay, thanks. This is broken, of course; memory use should be roughly
constant, with data arriving streamily. But I think it's a problem we
sort of knew about, although we don't have an issue filed for it.
Were you doing this over ra_local or ra_dav? Or did you try both?
Curious to know if it behaved the same...
-K
Michael Price <mp...@atl.lmco.com> writes:
> OK. Created a 2GB file containing random data. Created a new
> repository. Checked out the repository. Added the 2GB file. Did the
> commit. If you try this at home... have a lot of disk space because you'll
> need to store:
>
> 1. the original 2GB file
> 2. the 2GB temporary file in .svn/tmp
> 3. the portion of the 2GB file that gets added to the repo
> 4. the log files for the portion that gets added to the repo
>
> On my machine, each process has a hard limit of 448MB data segment size
> and 64MB stack size.
>
> The first time, everything was going along fine until I ran out of disk
> space :)
>
> The second time, after fixing the disk space issue, apache ran until it
> reached its process memory limit and then stopped. It had committed 448MB
> of the file when it stopped.
>
> So, don't commit a file larger than any memory limits on the server or it
> won't work.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: removing a revision (Re: [PATCH] Best Practices)
Posted by Michael Price <mp...@atl.lmco.com>.
Karl Fogel writes:
> > On a side note, I quickly ran 'top' to see how much memory was going to be
> > used while adding this large file. I was pleased to see that subversion's
> > memory use never really increased while the httpd process grew to 65MB and
> > stayed that way. If I add a 2GB file (which I didn't think to try until
> > just now), what's going to happen to httpd? It'll be a few hours until I
> > get to try it so if anyone cares to try first, let me know.
>
> Let us know what happens!
OK. Created a 2GB file containing random data. Created a new
repository. Checked out the repository. Added the 2GB file. Did the
commit. If you try this at home... have a lot of disk space because you'll
need to store:
1. the original 2GB file
2. the 2GB temporary file in .svn/tmp
3. the portion of the 2GB file that gets added to the repo
4. the log files for the portion that gets added to the repo
On my machine, each process has a hard limit of 448MB data segment size
and 64MB stack size.
The first time, everything was going along fine until I ran out of disk
space :)
The second time, after fixing the disk space issue, apache ran until it
reached its process memory limit and then stopped. It had committed 448MB
of the file when it stopped.
So, don't commit a file larger than any memory limits on the server or it
won't work.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: removing a revision (Re: [PATCH] Best Practices)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Michael Price <mp...@atl.lmco.com> writes:
> I was about to ask if there was an easy way to remove revisions short of
> dumping and loading. Last night I had two .pgn files (containing chess
> move lists) in a directory. I wanted to commit the small one (3KB), not
> the large one (73MB). Of course, I end up typing the filename of the large
> one. So am I stuck dumping and loading now to get rid of the enormous
> file?
Yup. Sorry :-(.
> On a side note, I quickly ran 'top' to see how much memory was going to be
> used while adding this large file. I was pleased to see that subversion's
> memory use never really increased while the httpd process grew to 65MB and
> stayed that way. If I add a 2GB file (which I didn't think to try until
> just now), what's going to happen to httpd? It'll be a few hours until I
> get to try it so if anyone cares to try first, let me know.
Let us know what happens!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
removing a revision (Re: [PATCH] Best Practices)
Posted by Michael Price <mp...@atl.lmco.com>.
Scott Lamb writes:
> I once made the mistake of adding an OpenLDAP configuration file with my
> root DN's password embedded. (Hashed in SSHA, but still.) So tweaking
> later isn't always enough - you might want the incorrect stuff to not be
> in the history at all. Since there's no way to remove a revision (short
> of dumping/loading, and then probably manually re-adding any following
> revisions), best to avoid that.
I was about to ask if there was an easy way to remove revisions short of
dumping and loading. Last night I had two .pgn files (containing chess
move lists) in a directory. I wanted to commit the small one (3KB), not
the large one (73MB). Of course, I end up typing the filename of the large
one. So am I stuck dumping and loading now to get rid of the enormous
file?
On a side note, I quickly ran 'top' to see how much memory was going to be
used while adding this large file. I was pleased to see that subversion's
memory use never really increased while the httpd process grew to 65MB and
stayed that way. If I add a 2GB file (which I didn't think to try until
just now), what's going to happen to httpd? It'll be a few hours until I
get to try it so if anyone cares to try first, let me know.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
> Scott Lamb <sl...@slamb.org> writes:
>>+@c ------------------------------------------------------
>>+@node When you commit
>>+@section When you commit
>>+
>>+It pays to take some time before you commit to review your changes and
>>+create an appropriate log message. Subversion does not have any convenient
>>+way of removing revisions (there is no equivalent to @samp{cvs admin -o}),
>>+so get it right the first time.
>
>
> The inability to remove committed revisions is unrelated to the
> quality of the log message. If the log message is bad, Subversion
> *does* offer the ability to fix it up afterwards -- so "get it right
> the first time" is not at all necessary here. And while revisions
> can't be removed, more tweaks can always be committed later... So even
> regarding the content of the change, the "get it right the first time"
> advice is a little unconvincing, at least when justified on that
> basis.
I once made the mistake of adding an OpenLDAP configuration file with my
root DN's password embedded. (Hashed in SSHA, but still.) So tweaking
later isn't always enough - you might want the incorrect stuff to not be
in the history at all. Since there's no way to remove a revision (short
of dumping/loading, and then probably manually re-adding any following
revisions), best to avoid that.
I was trying to say the changes can't be modified, not the log message.
I'll clarify. And add your other reason.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
>>+@subsection Line endings
>>+
>>+Different platforms (Unix, Windows, MacOS) have different conventions for
>>+marking the line endings of text files. Simple editors may rewrite line
>>+endings, causing problems with diff and merge. This is a subset of the
>>+formatting problems.
>>+
>>+Subversion has built-in support for normalizing line endings. To enable it,
>>+set the @samp{svn:eol-style} property to ``native''. @xref{Properties}.
>
>
> "normalizing" doesn't mean much by itself. I think it would be better
> to describe what it actually does, and why it helps solve the problem.
I was trying to avoid duplicating the @samp{svn:eol-style} subsubsection
of the properties node, which already does that. In fact, the cross
reference to it is pretty much the point of this subsection.
Is there a way to do a cross reference to a specific spot within a node?
Otherwise, I might just move much of that to this chapter.
> Okay. Maybe one more iteration, then we can commit this material and
> work on it inline?
Sure. No big objections to the rest of your proposed changes.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> Here's the new chapter. I think I did manage to keep it pretty
> Subversion-centered.
Nice work! Several specific comments below, but overall it was very
readable, and I liked the practice of giving examples both as command
transcripts and then as a plain-language outline for clarity -- having
both really helps readers.
> +@c ------------------------------------------------------
> +@node Source code formatting
> +@section Source code formatting
> +
> +Subversion works by creating a set of binary differences between two
> +revisions. It has no knowledge of syntactic vs. sematic differences ---
> +everything is just a difference of bytes.
> +
> +Given this design, it's important to avoid unnecessary syntactic
> +differences. They can cause merges to unnecessarily conflict as well as
> +drowning you in noise when viewing differences between revisions.
I realize that I may have said something misleading about this in an
earlier mail, but:
How exactly does inconsistency between different developers'
indentation styles lead to these problems? I can see how it would
lead to the eventual need for reindentation, which *in turn* leads to
the problems described above, but that's not quite the same thing.
The difference is subtle but important, I think.
It is later reindentation, not the original inconsistent formatting
itself, that leads to the unnecessary noise problem (more on
reindentation later). And so the point of persuading everyone to use
consistent formatting now is to avoid that later reindentation, not
because consistent formatting *itself* causes Subversion to work
better.
The paragraph about syntactic vs semantic is misleading. Subversion's
binary diffing has nothing to do with this problem. In fact, the
`diff' and `merge' commands aren't merely paying attention to bytes,
they're paying attention to lines, because historically a lot of
formats have used line-based syntax. The issue isn't really knowing
syntactic vs semantic differences anyway -- it's about whether the
tool knows anything at all about syntax. And diff/merge *do* know
some very primitive things about syntax, just not much... You see what
I'm getting at here.
> +In the real world, we're not always so perfect. Formatting preferences may
> +change over time, or we may just make mistakes. There are things you can do
> +to minimize the problems of reformatting.
> +
> +Here's a simple rule: never mix formatting and semantic changes in a single
> +revision. Give precise directions on duplicating formatting changes. When
> +possible, combine all formatting changes into a single revision.
A simple rule, but not quite the one that we follow :-).
Many projects use these guidelines instead (CVS does, and I'm pretty
sure that in Subversion we do in practice):
* If you're making a sweeping reformatting/reindentation change,
then yes, do it in an independent commit with no semantic
changes.
* If you're working in some area of code anyway, and you see
inconsistent indentation in the context lines around that area,
it's okay to fix them up too while you're there. Just point out
in the log message that there were also formatting changes, so
people know to ignore them when scanning the change. In fact,
this kind of gradual, as-you-go reindentation is one of the best
ways to get a badly indented but active code base into shape,
while still avoiding a painful "flag day" on which everything
gets reindented at once. (Not that we have that problem, but CVS
does, and this is how they're solving it).
> +@subsection Ignoring whitespace differences
> +
> +When viewing differences between revisions, you may want to not see any
> +whitespace-only changes. @command{svn diff -b} will accomplish this.
> +
> +The commit emails always show whitespace-only changes.
> +@file{commit-email.pl} uses @command{svnlook diff} to get differences, which
> +doesn't support the @samp{-b} option.
"svn diff -x -b", actually. And there may be other flags to diff
worth recommending here, too, check the diff documentation.
> +@subsection Line endings
> +
> +Different platforms (Unix, Windows, MacOS) have different conventions for
> +marking the line endings of text files. Simple editors may rewrite line
> +endings, causing problems with diff and merge. This is a subset of the
> +formatting problems.
> +
> +Subversion has built-in support for normalizing line endings. To enable it,
> +set the @samp{svn:eol-style} property to ``native''. @xref{Properties}.
"normalizing" doesn't mean much by itself. I think it would be better
to describe what it actually does, and why it helps solve the problem.
> +@c ------------------------------------------------------
> +@node When you commit
> +@section When you commit
> +
> +It pays to take some time before you commit to review your changes and
> +create an appropriate log message. Subversion does not have any convenient
> +way of removing revisions (there is no equivalent to @samp{cvs admin -o}),
> +so get it right the first time.
The inability to remove committed revisions is unrelated to the
quality of the log message. If the log message is bad, Subversion
*does* offer the ability to fix it up afterwards -- so "get it right
the first time" is not at all necessary here. And while revisions
can't be removed, more tweaks can always be committed later... So even
regarding the content of the change, the "get it right the first time"
advice is a little unconvincing, at least when justified on that
basis.
See below for another basis on which to justify it.
> +You should run a @samp{svn diff} before each commit and ask yourself:
> +
> +@itemize @bullet
> +@item do these changes belong together? It's best that each revision is a
> +single logical change. It's very easy to forget that you've started another
> +change.
> +@item do I have a log entry for these changes?
> +@end itemize
Nice points. This might be a good place to mention the practice many
projects have of keeping the head of trunk "stable" (buildable,
parseable, whatever the appropriate thing is for that project). That
is, to point out that the repository is not merely a place that stores
your changes -- rather, it effectively *publishes* the newly changed
project anew every time you commit. So if you don't get something
right, you may be inconveniencing an arbitrary number of people until
someone commits a fix. That ought to give one pause :-).
> +Defining a log entry policy is also helpful --- the Subversion
> +@uref{http://svn.collab.net/repos/svn/trunk/HACKING,HACKING} document is a
> +good model. If you always embed filenames, function names, etc. then you can
> +easily search through the logs with
> +@uref{http://svn.collab.net/repos/svn/trunk/tools/client-side/search-svnlog.pl,search-svnlog.pl}.
Yeah. This advice is specific to source code people; in general,
might want to consider what advice would be appropriate for other
kinds of projects too. (I'm not saying it's a bad example, just that
there might be more to say here. The log message policies appropriate
for programming projects may not be a good fit for other types of
projects.)
> +@subsection Binary files
> +
> +Subversion does not have any way to merge or view differences of binary
> +files, so it's critical that these have verbose log messages. Since you
> +can't review your changes with @samp{svn diff} immediately before
> +committing, you might create a new file @file{changes} whenever you start
> +work and modify it as you go. @samp{svn ci -F changes} will use this file as
> +a commit message.
I don't think that the non-diffability of non-text files implies that
the log message must be _verbose_, merely that it should summarize the
change accurately. (Which is really just as true of any other kind of
change...)
And the write-the-log-message-as-you-go thing is used by lots of
people, independently of whether they changed binary files.
Hmmm. I guess I'm just saying that these particular two "best
practices" are not ones I've actually observed in the developers whose
Subversion usage I'm most familiar with (myself, Mike, and Ben). We
all keep running log messages, whether or not binary files are
involved. And we don't aim for verbosity, but for descriptiveness,
again independent of binary files or no binary files. So these
practices may not be as widespread as you assumed... :-)
Okay. Maybe one more iteration, then we can commit this material and
work on it inline?
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Here's the new chapter. I think I did manage to keep it pretty
Subversion-centered.
I specifically tried to include information from:
* HACKING
<http://svn.collab.net/repos/svn/trunk/HACKING>
* Ben Collins-Sussman: "rapidsvn feedback"
Message-ID: <86...@kepler.ch.collab.net>
<http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=18582>
* Martin Pool: "Re: rapidsvn feedback"
Message-ID: <20...@toey.home>
<http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=19236>
* Karl Fogel: "Re: Best Practices"
Message-ID: <85...@newton.ch.collab.net>
<http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=19087>
--
Scott Lamb
Add "Best Practices" chapter to handbook.
* doc/handbook/best_practices.texi:
New file with tips to use Subversion more effectively.
* doc/handbook/svn-handbook.texi:
Link to new chapter.
Index: ./doc/handbook/svn-handbook.texi
===================================================================
--- ./doc/handbook/svn-handbook.texi
+++ ./doc/handbook/.svn/tmp/svn-handbook.texi.62476.00001.tmp Thu Aug 8 09:05:49 2002
@@ -97,12 +97,14 @@
* Getting Started:: History, installation and overview of Subversion.
* Client Cookbook:: How to use the Subversion client.
* Repository Administration:: Managing a repository.
+* Best Practices:: Tips to use Subversion more effectively.
* Appendices:: Other useful documents and pointers.
@end menu
@include getting_started.texi
@include client.texi
@include repos_admin.texi
+@include best_practices.texi
@include appendices.texi
@bye
Index: ./doc/handbook/best_practices.texi
===================================================================
--- ./doc/handbook/best_practices.texi
+++ ./doc/handbook/best_practices.texi Thu Aug 8 09:05:34 2002
@@ -0,0 +1,159 @@
+@node Best Practices
+@chapter Best Practices
+
+Tips to use Subversion more effectively.
+
+In this chapter, we'll focus on how to avoid some pitfalls of version
+control systems in general and Subversion specifically.
+
+@menu
+* Source code formatting::
+* When you commit::
+@end menu
+
+
+
+@c ------------------------------------------------------
+@node Source code formatting
+@section Source code formatting
+
+Subversion works by creating a set of binary differences between two
+revisions. It has no knowledge of syntactic vs. sematic differences ---
+everything is just a difference of bytes.
+
+Given this design, it's important to avoid unnecessary syntactic
+differences. They can cause merges to unnecessarily conflict as well as
+drowning you in noise when viewing differences between revisions.
+
+You can avoid these problems by following clearly-defined formatting rules.
+The Subversion project's own
+@uref{http://svn.collab.net/repos/svn/trunk/HACKING,HACKING} document and
+the @uref{http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html,Code
+Conventions for the Java Programming Language} are good examples.
+
+Tabs are particularly important. Some projects, like Subversion, do not use
+tabs at all in the source tree. Others always use them and define a
+particular tab size.
+
+It can be very helpful to have an editor smart enough to help adhere to
+these rules. For example, @command{vim} can do this on a per-project basis
+with @file{.vimrc} commands like the following:
+
+@verbatim
+autocmd BufRead,BufNewFile */rapidsvn/*.{cpp,h}
+ setlocal ts=4 noexpandtab
+autocmd BufRead,BufNewFile */subversion/*.[ch]
+ setlocal sw=2 expandtab cinoptions=>2sn-s{s^-s:s
+@end verbatim
+
+Check your favorite editor's documentation for more information.
+
+@subsection When you have to reformat
+
+In the real world, we're not always so perfect. Formatting preferences may
+change over time, or we may just make mistakes. There are things you can do
+to minimize the problems of reformatting.
+
+Here's a simple rule: never mix formatting and semantic changes in a single
+revision. Give precise directions on duplicating formatting changes. When
+possible, combine all formatting changes into a single revision.
+
+Reformatting might go like this:
+
+@example
+$ svn co file:///repo/path/trunk indent_wc
+$ indent -gnu indent_wc/src/*.[ch]
+$ svn commit -m 'Ran indent -gnu src/*.[ch]' indent_wc
+@end example
+
+This follows all rules: there were no semantic changes mixed in (no files
+were changed other than through @command{indent}). The @command{indent}
+commandline was given, so the changes can be very easily duplicated. All the
+reformatting was done in a single revision.
+
+Let's say these changes occurred to the trunk at revision 26. The head
+revision is now 42. You created a branch at revision 13 and now want to
+merge it back into the trunk. Ordinarily you'd do this:
+
+@example
+$ svn co file://repo/path/trunk merge_wc
+$ svn merge -r 13:head file://repo/path/branches/mybranch merge_wc
+@dots{} # resolve conflicts
+$ svn commit -m 'Merged branch'
+@end example
+
+But with the reformatting changes, there will be many, many conflicts. If
+you follow these rules, you can merge more easily:
+
+@example
+$ svn co -r 25 file://repo/path/trunk merge_wc
+$ svn merge -r 13:head file://repo/path/branches/mybranch merge_wc
+@dots{} # resolve conflicts
+$ indent -gnu src/*.[ch]
+$ svn up
+@dots{} # resolve conflicts
+$ svn commit -m 'Merged branch'
+@end example
+
+In English, the procedure is:
+
+@itemize @bullet
+@item Check out a pre-reformatting trunk working copy.
+@item Merge all branch changes. Fix conflicts.
+@item Reformat in the same manner.
+@item Update to the head revision. Fix conflicts.
+@item Check in the merged working copy.
+@end itemize
+
+@subsection Ignoring whitespace differences
+
+When viewing differences between revisions, you may want to not see any
+whitespace-only changes. @command{svn diff -b} will accomplish this.
+
+The commit emails always show whitespace-only changes.
+@file{commit-email.pl} uses @command{svnlook diff} to get differences, which
+doesn't support the @samp{-b} option.
+
+@subsection Line endings
+
+Different platforms (Unix, Windows, MacOS) have different conventions for
+marking the line endings of text files. Simple editors may rewrite line
+endings, causing problems with diff and merge. This is a subset of the
+formatting problems.
+
+Subversion has built-in support for normalizing line endings. To enable it,
+set the @samp{svn:eol-style} property to ``native''. @xref{Properties}.
+
+
+@c ------------------------------------------------------
+@node When you commit
+@section When you commit
+
+It pays to take some time before you commit to review your changes and
+create an appropriate log message. Subversion does not have any convenient
+way of removing revisions (there is no equivalent to @samp{cvs admin -o}),
+so get it right the first time.
+
+You should run a @samp{svn diff} before each commit and ask yourself:
+
+@itemize @bullet
+@item do these changes belong together? It's best that each revision is a
+single logical change. It's very easy to forget that you've started another
+change.
+@item do I have a log entry for these changes?
+@end itemize
+
+Defining a log entry policy is also helpful --- the Subversion
+@uref{http://svn.collab.net/repos/svn/trunk/HACKING,HACKING} document is a
+good model. If you always embed filenames, function names, etc. then you can
+easily search through the logs with
+@uref{http://svn.collab.net/repos/svn/trunk/tools/client-side/search-svnlog.pl,search-svnlog.pl}.
+
+@subsection Binary files
+
+Subversion does not have any way to merge or view differences of binary
+files, so it's critical that these have verbose log messages. Since you
+can't review your changes with @samp{svn diff} immediately before
+committing, you might create a new file @file{changes} whenever you start
+work and modify it as you go. @samp{svn ci -F changes} will use this file as
+a commit message.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> Hmmm, I don't like (1) because it is too smattering. I neither like (2)
> because it describes only a special case (changing whitespace) of the
> (more general) coding-style-issue (see above). While "diff -w" and
> "patch -l" can help you out with changing whitespace to some degree,
> I know of no good solution for changing style from e.g. GNU to K+R or
> vice-versa. Therefore I feel that it is much more important to warn
> of changing style than just changing whitespace.
Good point. After we commit Scott's material (as soon as I climb out
of my coding stack), maybe you/him/both can massage it accordingly.
> I think it might be a good idea to make this document a
> plain-text-file. This way people could just copy+paste the parts
> they think their project would benefit of into their HACKING file.
> Such a decision would imply that it should _not_ go into the
> handbook, since the handbook is not plan-text. It could be even
> splitted into a texinfo-part for the appendix and a plain-text-part
> for copy+paste.
I think you can generate plain text from the handbook.
> An issue with such a document and discussions about it is that it
> could provoke religious wars. I am not sure whether it is always
> possible to avoid such wars. OTOH I think we should definitely keep
> such wars out of the developers list. If we want to continue this
> discussion, it probably should move to the user's mailing-list?
> Isn't it time to activate the user's list now that Alpha is out?
Not yet, I think. We still want feedback to be visible to everyone.
Anyway, religious wars are just as counterproductive on the users list
as they are on the dev list. If the document starts provoking such
wars, we can deal with it then. Thus far, it hasn't. (Earlier
proposals to create a much *broader* document did, but we've
fortunately settled on a Subversion-specific document).
> While we are at the changing-whitespace-topic: IMHO "svn switch" and
> "svn update" should get an option like --ignore-whitespace because
> they often run diff/patch internally to do the merges... Hmmm, maybe
> giving them something like --tabify and --untabify could be a good
> idea, too?
I haven't given it much thought, and frankly can't right now. Maybe
someone else can...
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Josef Wolf <jw...@raven.inka.de>.
On Thu, Aug 01, 2002 at 04:38:01PM -0500, Karl Fogel wrote:
> Josef, can you clear this up by posting a concise description of what
> you envision for this document?
Well, it would be directed to _svn users_, this is why I originally
thought it would be a good idea to put it into an appendix of the
svn handbook. It would try to give hints/guidance/tips for users with
no/little expirience how to create and maintain their own repository
and HACKING file (well, not exactly, but something similar). I think
this is an important thing, because many newbie-errors made in the
early days of the repo are hard to correct once the repo has grown
too savage.
Just to give an example:
You have decided for the svn project that you want to use the GNU
coding style and fixed that in your HACKING file.
The analogous part of this document would look something like this:
"You should pick one coding style in the early days of your
repository. It does not matter which of the many available styles
you choose, but you should be comfortable with it and expect to be
comfortable as long as the repository exists. The important thing
with this is that you start using the choosen style as soon as
possible (best is right from creation of the repo), because changing
style between revisions will put you directly into hell if you ever
need to merge across this specific revision."
Along would go a rationale. Something like I have written in
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=179283
about indent(1).
In an other mail withhin this thread you wrote:
> Hmmm. Let me try to explain myself more clearly: There are two paths
> this specific example could take:
>
> 1. "You should use consistent formatting because it makes your code
> easier to read, and not everyone has wide screens and
> line-ending-tolerant editors."
>
> versus
>
> 2. "If you use only spaces for indentation, and maintain a
> consistent indentation style, then the 'svn diff' command will
> not show spurious diffs. Also, you should know about the
> following options to 'svn diff -x'..."
>
> They're both about formatting, but (2) is geared toward the Subversion
> Handbook, where as (1) is not. I'm always okay with stuff of the (2)
> variety, but feel strongly that we shouldn't include stuff of the (1)
> variety.
Hmmm, I don't like (1) because it is too smattering. I neither like (2)
because it describes only a special case (changing whitespace) of the
(more general) coding-style-issue (see above). While "diff -w" and
"patch -l" can help you out with changing whitespace to some degree,
I know of no good solution for changing style from e.g. GNU to K+R or
vice-versa. Therefore I feel that it is much more important to warn
of changing style than just changing whitespace.
Some further thoughts:
I think it might be a good idea to make this document a
plain-text-file. This way people could just copy+paste the parts
they think their project would benefit of into their HACKING file.
Such a decision would imply that it should _not_ go into the
handbook, since the handbook is not plan-text. It could be even
splitted into a texinfo-part for the appendix and a plain-text-part
for copy+paste.
An issue with such a document and discussions about it is that it
could provoke religious wars. I am not sure whether it is always
possible to avoid such wars. OTOH I think we should definitely keep
such wars out of the developers list. If we want to continue this
discussion, it probably should move to the user's mailing-list?
Isn't it time to activate the user's list now that Alpha is out?
While we are at the changing-whitespace-topic: IMHO "svn switch" and
"svn update" should get an option like --ignore-whitespace because
they often run diff/patch internally to do the merges... Hmmm, maybe
giving them something like --tabify and --untabify could be a good
idea, too?
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> I certainly can't be positive what Josef is talking about. But I did have an
> idea on why you were getting frustrated trying to make your thoughts clear
> (B&W vs grey), and that I think a simple shut-down on the topic might not be
> entirely Right(tm).
>
> That said: yes, a generic Best Practices for non-SVN topics doesn't belong.
> I did say that. :-) But I just don't want to see us try to control a topic
> that could be beneficial.
Josef, can you clear this up by posting a concise description of what
you envision for this document?
Possibly my understanding of what you want to write is not the same as
yours (and clearly is not the same as Greg's! :-) ).
Thanks,
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Greg Stein <gs...@lyra.org>.
I certainly can't be positive what Josef is talking about. But I did have an
idea on why you were getting frustrated trying to make your thoughts clear
(B&W vs grey), and that I think a simple shut-down on the topic might not be
entirely Right(tm).
That said: yes, a generic Best Practices for non-SVN topics doesn't belong.
I did say that. :-) But I just don't want to see us try to control a topic
that could be beneficial.
Cheers,
-g
On Thu, Aug 01, 2002 at 04:22:20PM -0500, Karl Fogel wrote:
> Greg Stein <gs...@lyra.org> writes:
> > It is black and white in *your* mind. Others do not distinguish it as
> > clearly. Thus, many people see a *very* valid tie-together of SVN and a best
> > practices doc for it.
> >
> > It is fine for /you/ to not want it here, but I think it is a valid topic
> > for this list (I'm not speaking authoritatively here; just a +1 on saying
> > that the topic is fine for this list). CVS has had *years* to build up a set
> > of practices on how to use the thing effectively. SVN is just beginning, and
> > we (the people on this list) are the people that are going to flesh out that
> > information and those best practices.
>
> If Josef is talking about a best practices that is specific to SVN,
> then +1 on talking about it here. (Stuff like "how to arrange
> branches in the repository", etc).
>
> But as far as I can tell, he's talking about a generic Best Practices
> document that has things like "Format your code in 80 columns." Do
> you really think *that* has anything to do with what revision control
> system one is using? And furthermore, he's not talking about the
> HACKING file, which explicitly limits its domain to the Subversion
> project. He's talking about a new document, which claims to be a
> guideline for lots of projects, and which is not Subversion-specific.
>
> I haven't seen anyone else on this list who wants to start the same
> document Josef is talking about.
>
> What you are +1'ing is not the same thing Josef is proposing (or if it
> is, then Josef is not being very clear IMHO).
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
> Keep it about Subversion, or clearly related to Subversion, that's all
> I'm saying.
>
> Is that clearer?
Yeah, and that sounds pretty reasonable to me. Everything I had in mind
was because of the peculiarities of SCM systems and Subversion-specific
information like the diff arguments and svn:eol-style could be included
throughout.
If no one beats me to it (Frisbee-playing and moving and class and work,
oh my), I'll send in a patch along these lines.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> That's not entirely true. I was interested in a chapter or appendix to
> the Subversion Handbook on general best practices for using SCM,
> including stuff like "use a consistent indentation style/correct line
> endings" These are not specific to Subversion but particularly
> important for SCM systems (so diffs aren't obfuscated with
> reindentation, etc). I lost interest when it was clear it wouldn't be
> accepted as part of the handbook. It just wasn't worth it to me to
> create a whole new project for what I expected to be a couple pages of
> tips.
(Sorry to have forgotten about that post of yours!)
Yeah, we should also teach people about the flags to `svn diff' that
make it ignore whitespace. That's fine to include in the Handbook.
Hmmm. Let me try to explain myself more clearly: There are two paths
this specific example could take:
1. "You should use consistent formatting because it makes your code
easier to read, and not everyone has wide screens and
line-ending-tolerant editors."
versus
2. "If you use only spaces for indentation, and maintain a
consistent indentation style, then the 'svn diff' command will
not show spurious diffs. Also, you should know about the
following options to 'svn diff -x'..."
They're both about formatting, but (2) is geared toward the Subversion
Handbook, where as (1) is not. I'm always okay with stuff of the (2)
variety, but feel strongly that we shouldn't include stuff of the (1)
variety.
Keep it about Subversion, or clearly related to Subversion, that's all
I'm saying.
Is that clearer?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Scott Lamb <sl...@slamb.org>.
Karl Fogel wrote:
> I haven't seen anyone else on this list who wants to start the same
> document Josef is talking about.
That's not entirely true. I was interested in a chapter or appendix to
the Subversion Handbook on general best practices for using SCM,
including stuff like "use a consistent indentation style/correct line
endings" These are not specific to Subversion but particularly important
for SCM systems (so diffs aren't obfuscated with reindentation, etc). I
lost interest when it was clear it wouldn't be accepted as part of the
handbook. It just wasn't worth it to me to create a whole new project
for what I expected to be a couple pages of tips.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> It is black and white in *your* mind. Others do not distinguish it as
> clearly. Thus, many people see a *very* valid tie-together of SVN and a best
> practices doc for it.
>
> It is fine for /you/ to not want it here, but I think it is a valid topic
> for this list (I'm not speaking authoritatively here; just a +1 on saying
> that the topic is fine for this list). CVS has had *years* to build up a set
> of practices on how to use the thing effectively. SVN is just beginning, and
> we (the people on this list) are the people that are going to flesh out that
> information and those best practices.
If Josef is talking about a best practices that is specific to SVN,
then +1 on talking about it here. (Stuff like "how to arrange
branches in the repository", etc).
But as far as I can tell, he's talking about a generic Best Practices
document that has things like "Format your code in 80 columns." Do
you really think *that* has anything to do with what revision control
system one is using? And furthermore, he's not talking about the
HACKING file, which explicitly limits its domain to the Subversion
project. He's talking about a new document, which claims to be a
guideline for lots of projects, and which is not Subversion-specific.
I haven't seen anyone else on this list who wants to start the same
document Josef is talking about.
What you are +1'ing is not the same thing Josef is proposing (or if it
is, then Josef is not being very clear IMHO).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by William Uther <wi...@cs.cmu.edu>.
On 1/8/02 5:31 PM, "Greg Stein" <gs...@lyra.org> wrote:
> On Thu, Aug 01, 2002 at 02:10:29PM -0500, Karl Fogel wrote:
>> ...
>> Sigh. I'm genuinely frustrated at my inability to make this clear:
>
> It is black and white in *your* mind. Others do not distinguish it as
> clearly. Thus, many people see a *very* valid tie-together of SVN and a best
> practices doc for it.
>
> It is fine for /you/ to not want it here, but I think it is a valid topic
> for this list (I'm not speaking authoritatively here; just a +1 on saying
> that the topic is fine for this list). CVS has had *years* to build up a set
> of practices on how to use the thing effectively. SVN is just beginning, and
> we (the people on this list) are the people that are going to flesh out that
> information and those best practices.
Maybe this would be good on the users list?
It isn't particularly related to svn development, but it is somewhat related
to svn use.
\x/ill :-}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Aug 01, 2002 at 02:10:29PM -0500, Karl Fogel wrote:
>...
> Sigh. I'm genuinely frustrated at my inability to make this clear:
It is black and white in *your* mind. Others do not distinguish it as
clearly. Thus, many people see a *very* valid tie-together of SVN and a best
practices doc for it.
It is fine for /you/ to not want it here, but I think it is a valid topic
for this list (I'm not speaking authoritatively here; just a +1 on saying
that the topic is fine for this list). CVS has had *years* to build up a set
of practices on how to use the thing effectively. SVN is just beginning, and
we (the people on this list) are the people that are going to flesh out that
information and those best practices.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices (was: rapidsvn feedback)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> > No, *not* in the svn repo. In its own repo. New document, new
> > project. Not related to Subversion.
>
> Ummm. Do we really want to run an own repo for just a couple of pages?
^^^^
I see I'm not getting through, here :-).
This is not "we". This document is *your* project (plus anyone else
who wants to join you). It is not part of the Subversion project, and
should not be discussed nor developed here.
Josef, I'm sorry to keep posting saying the same thing. But what I
want to avoid is this list getting swamped with mails about generic
Best Practices (a topic which is sure to generate huge, noisy
threads).
> But maybe you are right and it would actually get a lot of pages, so
> it would make sense to separate it. So give me some days to put the
> pieces together and _then_ determine whether/where we want to put the
> result.
Put it anywhere you want, as long as it's not the Subversion
repository.
Sigh. I'm genuinely frustrated at my inability to make this clear:
Imagine you were starting a new project, to write a GUI for
controlling satellites in orbit. You're looking for a place to put
that project. Now, *why* would you post on the Subversion dev list to
discuss the project and where to put it?
You wouldn't, because it's a different project, of course.
THAT's the situation you're in with this document.
So ***please*** stop posting about it here, okay?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices (was: rapidsvn feedback)
Posted by Josef Wolf <jw...@raven.inka.de>.
On Thu, Aug 01, 2002 at 10:41:47AM -0500, Karl Fogel wrote:
> > I still think it is not worth to create a separate document because
[ ... ]
> No, *not* in the svn repo. In its own repo. New document, new
> project. Not related to Subversion.
Ummm. Do we really want to run an own repo for just a couple of pages?
> Of course, most of this stuff is *already* in the svn repo, in the
> HACKING file.
The HACKING file describes the politics of the _svn_ project. This is
different from a file with suggestions to newbies how to run _their_
projects.
But maybe you are right and it would actually get a lot of pages, so
it would make sense to separate it. So give me some days to put the
pieces together and _then_ determine whether/where we want to put the
result.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices (was: rapidsvn feedback)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> I still think it is not worth to create a separate document because
> most of the things I can think of to put there are already written by
> Ben Collins-Sussman in his original article which was the start of
> this thread. There are only two or three Items I would like to
> add. But when the majority of the core team thinks it should be a
> separate document, I will try to put the peaces together so someone
> could commit it into the svn repo. After a while (1.0?) we can again
> take a look at it and let it alone if it has grown large or move it
> into the appendix of the handbook if they are still only a couple of
> pages.
Sorry to have to restate this again:
No, *not* in the svn repo. In its own repo. New document, new
project. Not related to Subversion.
Of course, most of this stuff is *already* in the svn repo, in the
HACKING file. That's the document you want. It exists. We've had it
for a long time. It is the guide to Subversion contributors, and a
handbook section on contributing to Subversion can of course reference
it. But it's there because it's what a Subversion contributor has to
know. It's Subversion-specific -- it is not a separate project to
document the best practices of all open source projects.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Best Practices (was: rapidsvn feedback)
Posted by Josef Wolf <jw...@raven.inka.de>.
On Tue, Jul 30, 2002 at 05:26:06PM -0700, Greg Stein wrote:
> I don't think anybody is *against* writing such a document. Fine. Someone
> should just go ahead and write the darned thing. We can then incorporate it,
> reference it, or whatever from the standard documentation.
I still think it is not worth to create a separate document because
most of the things I can think of to put there are already written by
Ben Collins-Sussman in his original article which was the start of
this thread. There are only two or three Items I would like to
add. But when the majority of the core team thinks it should be a
separate document, I will try to put the peaces together so someone
could commit it into the svn repo. After a while (1.0?) we can again
take a look at it and let it alone if it has grown large or move it
into the appendix of the handbook if they are still only a couple of
pages.
I would start out with a plain text document, because I have (yet) no
clue how to write texinfo. It would be nice if someone could point me
to a texinfo-HOWTO, so I could rewrite it.
Opinions?
> > If you agree with Karl that I am a troll:
> He absolutely did not say that.
Oh! Thanks for clearing this up. As you can easily see, english is
not my native language. I have heard the word "troll" only on Usenet
before, and was misguided by the different meaning. Karl, I'm sorry
that I misunderstood you this way.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Best Practices (was: rapidsvn feedback)
Posted by Greg Stein <gs...@lyra.org>.
All right. This thread is really getting out of hand.
I don't think anybody is *against* writing such a document. Fine. Someone
should just go ahead and write the darned thing. We can then incorporate it,
reference it, or whatever from the standard documentation.
Stop going back and forth about nuances. The simple fact is that the doc
doesn't exist, so all this is premature banter.
On Wed, Jul 31, 2002 at 01:30:10AM +0200, Josef Wolf wrote:
>...
> If you agree with Karl that I am a troll:
He absolutely did not say that. He said something along the lines of "go
trolling for authors on the mailing list". In this case, trolling means to
gather helpers. There is definitely the perjorative form along the lines of
"trolling for flame fests".
The meaning that Karl meant from http://www.dictionary.com/:
v. intr.
1. To fish by trailing a line, as from a moving boat.
2.
1. To wander about; ramble.
2. Slang. To patrol an area in search for someone or something.
3. Music. To sing heartily or gaily.
4. To roll or spin around.
2.1 is the meaning he is going for.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Tue, Jul 30, 2002 at 11:40:29PM +0200, Branko ??ibej wrote:
> >(*) I don't think that this appendix would take much more than one or
> > two single pages... Creating a separate document for a single page
> > seems to be overkill to me... And it would make an additional
> > hurdle for newbies, because they first have to _find_ this
> > ducument.
>
> Oh, really? If you can explain on two pages all the mistakes you made 10
> years ago, and how to avoid them, you were either extremely lucky to
> make so few mistakes, or are still making them but aren't aware of it. :-)
I have never suggested that I could put all my mistakes of the past 10
years into two pages. And I think that noone on this list is really
interested in my mistakes on bying the wrong stocks ;-). And I
certainly agree with you that you can never enumerate all possible
mistakes.
OTOH there are many mistakes which typically lead into problems when
you try to track versions (whether or not you use a SCM). I am _not_
proposing to enumerate _all_ of those mistakes. But I think it would
be a good thing if the most annoying/destructive would be mentioned in
an appendix of the handbook. If you agree with Karl that I am a troll:
say so and I will shut up...
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Josef Wolf wrote:
>When I think about 10 years ago, I would be _glad_ if there were an
>appendix "Good Praxices" in the CVS dokumentation. I had to learn it
>the hard way because there was no such appendix. I think most of us
>had to learn it the hard way, because there was no such appendix. Why
>do you want to force people to learn the hard way? The problem is that
>you can't easily correct most of those things reactive. If you don't
>do it right from the start, the remainder of the (repo-)life will
>claim for the sins of the early stages.
>
(Yes, yes, and I started writing my first C programs before I really
understood what a pointer is. Results were predictable. Then I reed a
few C books, and some good programming practices books. See, today I can
get my pointers right almost every second try!)
What you say is beside the point. We should not clutter up our
documentation with side issues, however mertied. -1.
By all means, start a companion document, I have nothing against that.
>>Good SCM practices are completely independent of Subversion. You can
>>use SVN without good practices. You can have good practices and yet
>>not be using SVN.
>>
>>
>
>Although this is true, I don't think it makes much sense to use svn
>without good practices. Failing to use good practices will result in
>failings to get benefits out of svn. Thinking this way, it makes
>no sense to use svn without good practices.
>
>But Anyway. Since it seems the svn core team don't like the "good
>practices" appendix reside in the main handbook, maybe there could be
>a consensus to create a separate good-practices-hadbook. While this
>would be overkill(*), I think it would be better than having nothing...
>
>(*) I don't think that this appendix would take much more than one or
> two single pages... Creating a separate document for a single page
> seems to be overkill to me... And it would make an additional
> hurdle for newbies, because they first have to _find_ this
> ducument.
>
Oh, really? If you can explain on two pages all the mistakes you made 10
years ago, and how to avoid them, you were either extremely lucky to
make so few mistakes, or are still making them but aren't aware of it. :-)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Martin Pool <mb...@toey.home>.
On 30 Jul 2002, Karl Fogel <kf...@newton.ch.collab.net> wrote:
> Josef Wolf <jw...@raven.inka.de> writes:
> > loose the benefits of svn if you start "bad Practices". Just for an
> > example: run all the svn-code through indent(1) and commit the
> > results. While this is neither a failure in svn nor in indent, this
> > will lead you into hell when you have to merge across the revision at
> > which you ran indent. You can still get benefits from svn, but you
> > are calling for hell on the long run if you really do such a thing.
>
> This particular piece of advice I'm +1 on putting in the handbook.
> It's a "common unintended technical consequence" of a revision control
> system, and since people may not think of it, it's appropriate to warn
> them.
If you must reindent code (and sometimes you must), then
- make no other changes in that revision
- put the indent comand line in the log message
That makes it possible (although a bit of a hassle) to merge code from
a branch that has not been indented: you make a copy, indent it the
same way, and then merge. There will be relatively few 'noise'
conflicts.
I only realized this pattern a year ago or so, and I find it works
quite well. I think it could usefully be in there, in addition to the
rule about gratuituous reindenting.
For what it's worth I think it would be good to mention "good
practices" in the documentation somewhere, with appropriate context.
I don't think you need to prescribe a commit policy, but you can
usefully say "many projects find it useful to agree on a commit
policy, such as requiring the project to pass 'make check' before
commit (etc)." The current CVS manual at least touches on this.
--
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> loose the benefits of svn if you start "bad Practices". Just for an
> example: run all the svn-code through indent(1) and commit the
> results. While this is neither a failure in svn nor in indent, this
> will lead you into hell when you have to merge across the revision at
> which you ran indent. You can still get benefits from svn, but you
> are calling for hell on the long run if you really do such a thing.
This particular piece of advice I'm +1 on putting in the handbook.
It's a "common unintended technical consequence" of a revision control
system, and since people may not think of it, it's appropriate to warn
them.
Advising against some Bad Practices (common practices that are
appropriate elsewhere, but that won't work well with Subversion) is a
very different thing from listing all Good Practices :-).
> > Hey, if you want to write a book on good practices, go for it! Even
> > feel free to post once on this list trolling for co-authors; it's
> > technically off-topic, but hey, we're easy... :-)
>
> Ummm... When you think I am a troll, maybe I should really shut up.
Oh dear. "Trolling" is not a pejorative in net-speak, as far as I'm
aware; I certainly didn't mean it that way.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Tue, Jul 30, 2002 at 04:26:23PM -0500, Karl Fogel wrote:
> > Although this is true, I don't think it makes much sense to use svn
> > without good practices. Failing to use good practices will result in
> > failings to get benefits out of svn. Thinking this way, it makes
> > no sense to use svn without good practices.
>
> Huh? This is simply not true. You can get plenty of benefit from
> Subversion, with no other practices at all besides just using a
> version control system.
You misunderstood my point. My point was simply that you can easily
loose the benefits of svn if you start "bad Practices". Just for an
example: run all the svn-code through indent(1) and commit the
results. While this is neither a failure in svn nor in indent, this
will lead you into hell when you have to merge across the revision at
which you ran indent. You can still get benefits from svn, but you
are calling for hell on the long run if you really do such a thing.
My point is that such an appendix could keep many people from shooting
in their feet. You are right when you say that this things are not
specific to svn. But newbies will start to blame svn because the
problems they experience will come along with svn.
> Are you claiming you got _no_ benefit out of CVS, when you used it
> before having learned "good practices"? :-)
No! I got great benefits out of CVS. But I would have saved a lot of
trouble if I had known about some important things 10 years
ago. Things become even worse: Since you can't (officially) change
historic things once they are in the repo, the errors you have done in
your early days will haunt you as long as the specific repository
exists. Thus it is very important to start doing things right when you
create the repo. Maybe I am somewhat paranoid on this point, but as I
mentioned before: I had to learn the hard way. And I think I am not
the only one who had to go the hard way...
> Hey, if you want to write a book on good practices, go for it! Even
> feel free to post once on this list trolling for co-authors; it's
> technically off-topic, but hey, we're easy... :-)
Ummm... When you think I am a troll, maybe I should really shut up.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> When I think about 10 years ago, I would be _glad_ if there were an
> appendix "Good Praxices" in the CVS dokumentation. I had to learn it
> the hard way because there was no such appendix. I think most of us
> had to learn it the hard way, because there was no such appendix. Why
> do you want to force people to learn the hard way? The problem is that
> you can't easily correct most of those things reactive. If you don't
> do it right from the start, the remainder of the (repo-)life will
> claim for the sins of the early stages.
The authors of the CVS documentation had no way of knowing whether you
were versioning source code or kitchen recipes; they had no way of
knowing how many people were working on your project; they had know
way of knowing if you already had established practices in place.
The *only* thing they knew was that you need to learn to use CVS
(because otherwise, why would you be reading the documentation?). So
that's what they wrote about.
> Although this is true, I don't think it makes much sense to use svn
> without good practices. Failing to use good practices will result in
> failings to get benefits out of svn. Thinking this way, it makes
> no sense to use svn without good practices.
Huh? This is simply not true. You can get plenty of benefit from
Subversion, with no other practices at all besides just using a
version control system.
Are you claiming you got _no_ benefit out of CVS, when you used it
before having learned "good practices"? :-)
> But Anyway. Since it seems the svn core team don't like the "good
> practices" appendix reside in the main handbook, maybe there could be
> a consensus to create a separate good-practices-hadbook. While this
> would be overkill(*), I think it would be better than having nothing...
Hey, if you want to write a book on good practices, go for it! Even
feel free to post once on this list trolling for co-authors; it's
technically off-topic, but hey, we're easy... :-)
But such a book is outside the scope of "How To Use Subversion", and
needs to start its own mailing list, repository, web site, etc. It's
a separate project (and one which has probably already been done
several times; have you tried googling for some of this stuff?)
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Kieran <ki...@esperi.demon.co.uk>.
On Wed, 31 Jul 2002, Josef Wolf wrote:
> On Tue, Jul 30, 2002 at 04:32:00PM -0500, Karl Fogel wrote:
>
> > Sorry, I forgot to repond to an important part of your mail:
> >
> > It would be a LOT longer than two pages. Believe me, I wrote half a
> > book about "good practices" once :-).
>
> Depends on how deep you want to go. I think that you can put the most
> important things into several pages according the 80/20-Rule.
>
> > What we can do is *reference* such a document, if you can find one.
>
> Why not reference the "half a book" you mentioned above? Hey, IMHO
> _anything_ would be better than the current stage which means having
> _nothing_.
>
Coz the other half is already on the web?
Just guessing randomly, of course. I'd never read a damn thing Karl
wrote.
Oh no.
Regards
Kieran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Tue, Jul 30, 2002 at 04:32:00PM -0500, Karl Fogel wrote:
> Sorry, I forgot to repond to an important part of your mail:
>
> It would be a LOT longer than two pages. Believe me, I wrote half a
> book about "good practices" once :-).
Depends on how deep you want to go. I think that you can put the most
important things into several pages according the 80/20-Rule.
> What we can do is *reference* such a document, if you can find one.
Why not reference the "half a book" you mentioned above? Hey, IMHO
_anything_ would be better than the current stage which means having
_nothing_.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> But Anyway. Since it seems the svn core team don't like the "good
> practices" appendix reside in the main handbook, maybe there could be
> a consensus to create a separate good-practices-hadbook. While this
> would be overkill(*), I think it would be better than having nothing...
>
> (*) I don't think that this appendix would take much more than one or
> two single pages... Creating a separate document for a single page
> seems to be overkill to me... And it would make an additional
> hurdle for newbies, because they first have to _find_ this
> ducument.
Sorry, I forgot to repond to an important part of your mail:
It would be a LOT longer than two pages. Believe me, I wrote half a
book about "good practices" once :-).
What we can do is *reference* such a document, if you can find one.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Tue, Jul 30, 2002 at 09:24:59AM -0500, Karl Fogel wrote:
> Scott Lamb <sl...@slamb.org> writes:
> > Why?
> >
> > This information would be helpful. These are particularly important
> > when using SCM systems. Subversion now is getting relatively
> > experienced users who have used CVS, were dissatisfied, and are
> > willing to be on the bleeding edge to get something better. But
> > post-1.0, there will users who have never used another SCM system and
> > are not familiar with these ideas.
> >
> > The chapter could be called "Good SCM Practices" to clarify it is not
> > Subversion-specific.
>
> A brief rant:
>
> The challenge in writing documentation is deciding what not to
> include. Technical books typically run *over*, not under, their
> projected page count. If we're not careful, we'll have an enormous
> doorstop in which casual browsing is punished by acres of off-topic or
> redundant material. (Sound familiar? Sound like a lot of technical
> books you've seen? :-) ).
When I think about 10 years ago, I would be _glad_ if there were an
appendix "Good Praxices" in the CVS dokumentation. I had to learn it
the hard way because there was no such appendix. I think most of us
had to learn it the hard way, because there was no such appendix. Why
do you want to force people to learn the hard way? The problem is that
you can't easily correct most of those things reactive. If you don't
do it right from the start, the remainder of the (repo-)life will
claim for the sins of the early stages.
> Good SCM practices are completely independent of Subversion. You can
> use SVN without good practices. You can have good practices and yet
> not be using SVN.
Although this is true, I don't think it makes much sense to use svn
without good practices. Failing to use good practices will result in
failings to get benefits out of svn. Thinking this way, it makes
no sense to use svn without good practices.
But Anyway. Since it seems the svn core team don't like the "good
practices" appendix reside in the main handbook, maybe there could be
a consensus to create a separate good-practices-hadbook. While this
would be overkill(*), I think it would be better than having nothing...
(*) I don't think that this appendix would take much more than one or
two single pages... Creating a separate document for a single page
seems to be overkill to me... And it would make an additional
hurdle for newbies, because they first have to _find_ this
ducument.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Daniel Berlin <db...@dberlin.org>.
On Tuesday, July 30, 2002, at 10:24 AM, Karl Fogel wrote:
> Scott Lamb <sl...@slamb.org> writes:
>> Why?
>>
>> This information would be helpful. These are particularly important
>> when using SCM systems. Subversion now is getting relatively
>> experienced users who have used CVS, were dissatisfied, and are
>> willing to be on the bleeding edge to get something better. But
>> post-1.0, there will users who have never used another SCM system and
>> are not familiar with these ideas.
>>
>> The chapter could be called "Good SCM Practices" to clarify it is not
>> Subversion-specific.
>
> A brief rant:
>
> The challenge in writing documentation is deciding what not to
> include. Technical books typically run *over*, not under, their
> projected page count.
Three reasons, having been a tech author of a best selling book (this
was back in 1996 though).
1. They want page counts when you do the outline, before the book is
ever started. People tend to underestimate how much they can write for
a given chapter to compensate.
2. You get paid for the number of pages you turn in, not the number of
pages they want.
3. If you do overestimate a page count, they want that many pages
anyway, no matter what, and you are forced to include all kinds of crap
to meet it, even if it is useless and makes the book suck.
> If we're not careful, we'll have an enormous
> doorstop in which casual browsing is punished by acres of off-topic or
> redundant material. (Sound familiar? Sound like a lot of technical
> books you've seen? :-) ).
>
I wouldn't worry about this, unless you think that we can't draw a line
somewhere.
You can put it in the appendix, and thus, casual browsing isn't
affected.
> Good SCM practices are completely independent of Subversion. You can
> use SVN without good practices. You can have good practices and yet
> not be using SVN.
>
> Let's please keep non-Subversion material out of the handbook.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Scott Lamb <sl...@slamb.org> writes:
> Why?
>
> This information would be helpful. These are particularly important
> when using SCM systems. Subversion now is getting relatively
> experienced users who have used CVS, were dissatisfied, and are
> willing to be on the bleeding edge to get something better. But
> post-1.0, there will users who have never used another SCM system and
> are not familiar with these ideas.
>
> The chapter could be called "Good SCM Practices" to clarify it is not
> Subversion-specific.
A brief rant:
The challenge in writing documentation is deciding what not to
include. Technical books typically run *over*, not under, their
projected page count. If we're not careful, we'll have an enormous
doorstop in which casual browsing is punished by acres of off-topic or
redundant material. (Sound familiar? Sound like a lot of technical
books you've seen? :-) ).
Good SCM practices are completely independent of Subversion. You can
use SVN without good practices. You can have good practices and yet
not be using SVN.
Let's please keep non-Subversion material out of the handbook.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Scott Lamb <sl...@slamb.org>.
Branko Čibej wrote:
> Josef Wolf wrote:
>> *PLEASE* add this great summary to the handbook! A chapter named
>> "Good Practices" or some such would be great.
>
> No. The handbook is about using Subversion, not about good project
> management practices.
Why?
This information would be helpful. These are particularly important when
using SCM systems. Subversion now is getting relatively experienced
users who have used CVS, were dissatisfied, and are willing to be on the
bleeding edge to get something better. But post-1.0, there will users
who have never used another SCM system and are not familiar with these
ideas.
The chapter could be called "Good SCM Practices" to clarify it is not
Subversion-specific.
--
Scott Lamb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Josef Wolf wrote:
>On Mon, Jul 29, 2002 at 05:23:18PM -0500, Ben Collins-Sussman wrote:
>
>
>
>>First, I think steps need to be taken to "lower the barrier" for other
>>people to contribute. There are a few simple policies that Subversion
>>itself has followed from the very beginning, and I think these
>>policies have a made a *huge* difference in increasing the
>>user-friendliness of the code. Certainly, nobody is going to tell you
>>how to run your project. :-) But you should still mull these ideas
>>over, give them some thought:
>> * 80-column code formatting. [ ... ]
>> * Using spaces for all indentation, [ ... ]
>> * Choose a log message policy. [ ... ]
>> * EOL style: [ ... ]
>> * Commit policies. [ ... ]
>>
>>
>
>*PLEASE* add this great summary to the handbook! A chapter named
>"Good Practices" or some such would be great.
>
No. The handbook is about using Subversion, not about good project
management practices.
Most of what Ben wrote is a summary of the way things are done in
Subversion, and is documented in HACKING. The EOL style bit is already
in the handbook.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Mon, Jul 29, 2002 at 05:23:18PM -0500, Ben Collins-Sussman wrote:
> First, I think steps need to be taken to "lower the barrier" for other
> people to contribute. There are a few simple policies that Subversion
> itself has followed from the very beginning, and I think these
> policies have a made a *huge* difference in increasing the
> user-friendliness of the code. Certainly, nobody is going to tell you
> how to run your project. :-) But you should still mull these ideas
> over, give them some thought:
> * 80-column code formatting. [ ... ]
> * Using spaces for all indentation, [ ... ]
> * Choose a log message policy. [ ... ]
> * EOL style: [ ... ]
> * Commit policies. [ ... ]
*PLEASE* add this great summary to the handbook! A chapter named
"Good Practices" or some such would be great.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:
> Saying that the Subversion client API is a moving target would be a
> great understatement. Just yesterday RapidSVN was building fine.
> Today yet another API change surfaced that prevents a clean compile.
> I want to be up to the minute as well but without a ChangeLog of API
> changes it is difficult to keep up to date. Maybe this process can
> be improved now that clients other than svn are dependent on the API?
That's not what Ben was saying, I think. He's saying, when you *do*
commit a change, make sure it compiles against the head of Subversion
as of that moment. You don't need a ChangeLog of API changes to keep
up to date; you just need to let your compiler tell you when you're
out of date :-).
But if you did want such a log, then
$ tools/client-side/search-svnlog.pl "subversion/include/"
would come pretty close to the desired result.
Alternatively, document the revision number of the Subversion trunk
that a given commit compiles against.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Alexander Mueller <al...@littleblue.de>.
>
>
>>> * EOL style: some of your source files seem to have CRLF
>>> endings, and some just have LF endings. If you have a lot of
>>> cross-platform developers, you probably want to set
>>> 'svn:eol-style' to 'native' on everything. CVS does this by
>>> default, but SVN does not. If you don't set this property, I >
>>> > fear you're going to end up with a lot of flip-flopping of eol
>>> > > styles in the future.... which means you won't be able to
>>> see changes when you run 'svn diff'; the *entire* file will look
>>> changed.
>>>
>>>
>>That is a valid concern. Unix style it is then.
>>
>>
>
>No, I'm not saying you have to force LF endings on everything. If you
>set the 'svn:mime-type' property to 'native', then each file will
>appear to have the "native" eol-style in each developer's operating
>system. Win32 users will have working copies where every file has
>CRLF line-endings, and Unix users will have working copies where every
>file has LF line-endings. And these differences will be transparently
>hidden when committing and updating.
>
+1 for native EOL.
Re: rapidsvn feedback
Posted by Ben Collins-Sussman <su...@collab.net>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:
> > The Subversion project uses a log policy documented in our
> > HACKING file; or maybe you want to make up your own. Just avoid
> > ambiguous log messages -- choose some policy!
>
> I am not sure which one or ones your are referring to. I'll take a
> look.
Or just run 'svn log http://svn.collab.net/repos/svn', and scroll
through several pages. You'll see a pattern emerge. :-)
>
> > * EOL style: some of your source files seem to have CRLF
> > endings, and some just have LF endings. If you have a lot of
> > cross-platform developers, you probably want to set
> > 'svn:eol-style' to 'native' on everything. CVS does this by
> > default, but SVN does not. If you don't set this property, I >
> > > fear you're going to end up with a lot of flip-flopping of eol
> > > > styles in the future.... which means you won't be able to
> > see changes when you run 'svn diff'; the *entire* file will look
> > changed.
>
> That is a valid concern. Unix style it is then.
No, I'm not saying you have to force LF endings on everything. If you
set the 'svn:mime-type' property to 'native', then each file will
appear to have the "native" eol-style in each developer's operating
system. Win32 users will have working copies where every file has
CRLF line-endings, and Unix users will have working copies where every
file has LF line-endings. And these differences will be transparently
hidden when committing and updating.
> Saying that the Subversion client API is a moving target would be a
> great understatement. Just yesterday RapidSVN was building fine.
> Today yet another API change surfaced that prevents a clean compile.
> I want to be up to the minute as well but without a ChangeLog of API
> changes it is difficult to keep up to date. Maybe this process can
> be improved now that clients other than svn are dependent on the API?
We'll definitely freeze the API at some point. We already have a
policy document that defines forward- and backward- API compatibilty
issues... we just haven't started using it yet.
All I'm requesting is: if you sit down to work on rapidsvn, try
updating and recompiling svn first. Tweak rapidsvn to compile, make
your changes, and commit.
We could certainly keep a ChangeLog of API changes if it helps. But
normally, your compiler will make it screamingly clear exactly which
svn_ function has changed its signature. :-)
> > Anyway, looks like you guys are off to a good start. I hope this
> > feedback was useful!
>
> These are all good suggestions. As I said above, iteration of the
> code is a key here. Please keep the suggestions coming!
Cool, best of luck to y'all!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: relative URLs (was: rapidsvn feedback)
Posted by cm...@collab.net.
Dave Cridland <da...@cridland.net> writes:
> On Thu, 2002-08-01 at 22:24, Greg Stein wrote:
> > IMO, we shouldn't use "%%" in any situation (although I could bend for the
> > cmdline). That form just isn't a standard URL.
> >
> > When you have a GUI, where there is no ambiguity about what was typed in,
> > then you allow users to enter a relative URL, and use the standard URL
> > composition guidelines to establish the absolute URL. The only tricky part
> > is decided what the "base" is for the relative URL to be useful. The RFC
> > actually covers some of how to defined a base URL.
>
> This thread is now officially confusing me. Admittedly this doesn't
> usually take much - a piece of paper with "Please Turn Over" written on
> both sides usually does the trick.
>
> What's the difference between...
>
> (base URL of directory: http://svn.somewhere.tld/repos/dir)
>
> [user@host dir]$ svn cp file1.c file2.c
This will copy file1.c to file2.c locally in your working copy, and
schedule file2.c for addition as a copy of file1.c. No commit here,
and the copy is revertable.
>
> ...and...
>
> [user@host dir]$ svn cp http://svn.somewhere.tld/repos/dir/file1.c
> http://svn.somewhere.tld/repos/dir/file2.c
This will actually commit a new file2.c as a copy of the file at the
first URL! This is not revertable.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: relative URLs (was: rapidsvn feedback)
Posted by Dave Cridland <da...@cridland.net>.
On Thu, 2002-08-01 at 22:24, Greg Stein wrote:
> IMO, we shouldn't use "%%" in any situation (although I could bend for the
> cmdline). That form just isn't a standard URL.
>
> When you have a GUI, where there is no ambiguity about what was typed in,
> then you allow users to enter a relative URL, and use the standard URL
> composition guidelines to establish the absolute URL. The only tricky part
> is decided what the "base" is for the relative URL to be useful. The RFC
> actually covers some of how to defined a base URL.
This thread is now officially confusing me. Admittedly this doesn't
usually take much - a piece of paper with "Please Turn Over" written on
both sides usually does the trick.
What's the difference between...
(base URL of directory: http://svn.somewhere.tld/repos/dir)
[user@host dir]$ svn cp file1.c file2.c
...and...
[user@host dir]$ svn cp http://svn.somewhere.tld/repos/dir/file1.c
http://svn.somewhere.tld/repos/dir/file2.c
...and other combinations of URL and file.
I'm unclear what difference there is, if any. Similarly with other
commands. The sole difference I can see is that for some commands, there
is no need to touch the repository when all arguments are a local file,
but surely this is largely a matter of being slightly smarter?
I can also see that things get more complex in terms of figuring out the
base URL of mixed working dirs, done with, say, `svn switch' (which
isn't in the man page, in case nobody's noticed.).
Perhaps a --base-url-from=<dir> switch could be used to clear up
ambiguity?
I appreciate I'm probably missing something fairly crucial here, so feel
free to treat me like an idiot. :-)
Dave.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
relative URLs (was: rapidsvn feedback)
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Aug 01, 2002 at 08:05:02AM -0700, Peter Davis wrote:
> On Thursday 01 August 2002 06:17, brane@xbc.nu wrote:
>...
> > Becasue many commands accept either an URL or a working copy path, so there
> > must be a way to distinguish the two. It would be slightly horrible if "svn
> > cp" required the %%, but "svn switch" didn't. Consistency is always good.
>
> I understand that %% would have to be required for the command line. But in
> RapidSVN, it should be easy enough for you to label a field as a "URL", which
> could imply that if you give an absolute path, the "%%" is implied (but not
> disallowed, for consistency). RapidSVN should be able to be "smart" when it
> can, whereas a "smart" command line client is just annoying.
IMO, we shouldn't use "%%" in any situation (although I could bend for the
cmdline). That form just isn't a standard URL.
When you have a GUI, where there is no ambiguity about what was typed in,
then you allow users to enter a relative URL, and use the standard URL
composition guidelines to establish the absolute URL. The only tricky part
is decided what the "base" is for the relative URL to be useful. The RFC
actually covers some of how to defined a base URL.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Peter Davis <pe...@pdavis.cx>.
On Thursday 01 August 2002 06:17, brane@xbc.nu wrote:
> Quoting Peter Davis <pe...@pdavis.cx>:
> > On Thursday 01 August 2002 01:20, brane@xbc.nu wrote:
> > > svn switch %%/branches/issue-531-dev .
> > >
> > > and the client would grok from context that %% is
> > > http://svn.collab.net/repos/svn. That shouldn't be too hard to do
> >
> > today,
> >
> > Since switch only knows how to take URLs, why not just assume that an
> > absolute
> > path "/branches/..." is relative to the repository root, without
> > requiring the "%%"?.
>
> Becasue many commands accept either an URL or a working copy path, so there
> must be a way to distinguish the two. It would be slightly horrible if "svn
> cp" required the %%, but "svn switch" didn't. Consistency is always good.
I understand that %% would have to be required for the command line. But in
RapidSVN, it should be easy enough for you to label a field as a "URL", which
could imply that if you give an absolute path, the "%%" is implied (but not
disallowed, for consistency). RapidSVN should be able to be "smart" when it
can, whereas a "smart" command line client is just annoying.
> Oh, and if you have a directory named "%%" in your working copy, you can
> always refer to it as ./%%.
True.
Whether or not RapidSVN can be "smart" and not require the "%%" in certain
cases, I'd still be +10 on implementing this in both RapidSVN and the command
line, for *all* URL-based commands.
--
Peter Davis
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by br...@xbc.nu.
Quoting Peter Davis <pe...@pdavis.cx>:
> On Thursday 01 August 2002 01:20, brane@xbc.nu wrote:
> > svn switch %%/branches/issue-531-dev .
> >
> > and the client would grok from context that %% is
> > http://svn.collab.net/repos/svn. That shouldn't be too hard to do
> today,
>
> Since switch only knows how to take URLs, why not just assume that an
> absolute
> path "/branches/..." is relative to the repository root, without
> requiring the "%%"?.
Becasue many commands accept either an URL or a working copy path, so there must
be a way to distinguish the two. It would be slightly horrible if "svn cp"
required the %%, but "svn switch" didn't. Consistency is always good.
Oh, and if you have a directory named "%%" in your working copy, you can always
refer to it as ./%%.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Peter Davis <pe...@pdavis.cx>.
On Thursday 01 August 2002 01:20, brane@xbc.nu wrote:
> svn switch %%/branches/issue-531-dev .
>
> and the client would grok from context that %% is
> http://svn.collab.net/repos/svn. That shouldn't be too hard to do today,
Since switch only knows how to take URLs, why not just assume that an absolute
path "/branches/..." is relative to the repository root, without requiring
the "%%"?.
It would be cool if "svn switch" and other URL-based commands could do this by
themselves. I can see why without the "%%" or other indicator it could
confuse easily, but "svn merge %%/branches/foo" would sure save a lot of
typing.
--
Peter Davis
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Thu, Aug 01, 2002 at 11:56:47AM -0500, cmpilato@collab.net wrote:
> svn ls `svn url`/subdir
Great! The only problem I can see is that this wont work on
Windows. But IMHO this is not a real issue. Most Windows-People would
use some GUI anyway. And if you want to do serious scripting on
Windows, you should go with cygwin and then the backticks will work
for windows, too.
So if anyone is interested in my Eur 0.02 : I am entirely +1 on this
"svn url" solution.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by br...@xbc.nu.
Alan Shutko wrote:
>Martin Pool <mb...@toey.home> writes:
>
>
>
>>It's only magic when there are two carats on the same line, otherwise
>>it doesn't look like a substitution.
>>
>>
>
>Nope, only magic when there are two carats and one is at the
>beginning of the line, on the systems I tried.
>
Dunno why people would want to use a two-carat shell, seems rather
lightweight to me. Or did you mean "caret", not the jewellers' unit of
mass (1 carat = 0.2 grams, or 0.00705 ounces for the
left-of-Atlantic-minded)? :-)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Alan Shutko <at...@acm.org>.
Martin Pool <mb...@toey.home> writes:
> It's only magic when there are two carats on the same line, otherwise
> it doesn't look like a substitution.
Nope, only magic when there are two carats and one is at the
beginning of the line, on the systems I tried.
--
Alan Shutko <at...@acm.org> - In a variety of flavors!
Survival tip 3, what you lack in numbers, make up with firepower.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Martin Pool <mb...@toey.home>.
On 1 Aug 2002, Alan Shutko <at...@acm.org> wrote:
> Zack Weinberg <za...@codesourcery.com> writes:
>
> > Not true. csh history expansion (picked up by bash and probably zsh
> > also) uses ^ to delimit a 'quick substitution'.
>
> Actually, that requires two ^'s, one at the beginning of the line.
>
> > This means some versions of csh will silently make ^path vanish,
> > since it doesn't fit their grammar.
>
> Testing bash, tcsh, csh on HP-UX 11 and SCO Openserver 5 does not
> show this problem. Can you point to one that does?
It's only magic when there are two carats on the same line, otherwise
it doesn't look like a substitution.
You could make a case that this is a perfect example of why magic
characters are confusing :-)
I'd much prefer `svn url`, or perhaps `svn repourl` or something a bit
clearer.
--
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Zack Weinberg <za...@codesourcery.com>.
On Thu, Aug 01, 2002 at 02:09:08PM -0400, Alan Shutko wrote:
> Zack Weinberg <za...@codesourcery.com> writes:
>
> > Not true. csh history expansion (picked up by bash and probably zsh
> > also) uses ^ to delimit a 'quick substitution'.
>
> Actually, that requires two ^'s, one at the beginning of the line.
To do anything useful, yes.
> > This means some versions of csh will silently make ^path vanish,
> > since it doesn't fit their grammar.
>
> Testing bash, tcsh, csh on HP-UX 11 and SCO Openserver 5 does not
> show this problem. Can you point to one that does?
Only my dim memories of the nightmare that was SunOS 4 /bin/csh,
which, even if accurate, I am willing to stipulate that we don't care.
zw
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Thu, Aug 01, 2002 at 11:56:47AM -0500, cmpilato@collab.net wrote:
> Could we perhaps just add an `svn url [TARGET]' command, and then you
> guys could just use:
>
> svn ls `svn url`/subdir
>
> ? The notion of using magic character sequences really frightens me.
+1
i would be much more comfortable with the 'svn url' command or
something like it than with anything like the other suggestions people
have been putting forth. i don't think we're likely to find a 'magic
sequence' that will work everywhere, or even most places, and even if
we can, it feels like we're cluttering up our interface with it.
-garrett
--
garrett rooney Remember, any design flaw you're
rooneg@electricjellyfish.net sufficiently snide about becomes
http://electricjellyfish.net/ a feature. -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Frohwalt Egerer <ma...@frohwalt.de>.
> -----Original Message-----
> From: cmpilato@collab.net [mailto:cmpilato@collab.net]
> Sent: Thursday, August 01, 2002 8:34 PM
> To: Alan Shutko
> Cc: Zack Weinberg; Blair Zajac; brane@xbc.nu; Josef Wolf; Ben
> Collins-Sussman; Peter Johnson; dev@subversion.tigris.org
> Subject: Re: rapidsvn feedback
>
>
> Alan Shutko <at...@acm.org> writes:
>
> > cmpilato@collab.net writes:
> >
> > > Could we perhaps just add an `svn url [TARGET]' command, and then you
> > > guys could just use:
> > >
> > > svn ls `svn url`/subdir
> >
> > Does that work on Windows?
>
> No ... but then, what does?
Using a .cmd script to assign the output of svn url to an environment
variable does.
Hell, you can easily write a wrapper xsvn.cmd that assings the output
of "svn url" to the environment variable x and then calls svn with
all supplied parameters.
The same can be done with a Unix shell quite more easily.
The only remaining problem, in Windows you'd have to write
xsvn ls %x%/subdir
and in Unix
xsvn ls $x/subdir
But all in all expansion of magic characters is a thing that shall
always be left to the shell.
(By the way, when using aliases you might even get rid of having to type
xsvn and be able to use svn ...)
If you'll add "svn url" I'll write the xsvn.cmd script :-)
Froh
P.S.: Ouch, shooting my own foot here, because I think a "magic character"
is definitley easier to use ... as long as you get used to svn doing
"magic" things behind your back. I think magic characters raise the bar
for those trying to learn subversion a little little bit more and so should
be avoided. Even if they seem comfortable.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by br...@xbc.nu.
cmpilato@collab.net wrote:
>Alan Shutko <at...@acm.org> writes:
>
>
>
>>cmpilato@collab.net writes:
>>
>>
>>
>>>Could we perhaps just add an `svn url [TARGET]' command, and then you
>>>guys could just use:
>>>
>>> svn ls `svn url`/subdir
>>>
>>>
>>Does that work on Windows?
>>
>>
>
>No ... but then, what does?
>
Subversion, for instance. You're asking for a thick ear with comments
like that. :-)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by cm...@collab.net.
Alan Shutko <at...@acm.org> writes:
> cmpilato@collab.net writes:
>
> > Could we perhaps just add an `svn url [TARGET]' command, and then you
> > guys could just use:
> >
> > svn ls `svn url`/subdir
>
> Does that work on Windows?
No ... but then, what does?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Alan Shutko <at...@acm.org>.
cmpilato@collab.net writes:
> Could we perhaps just add an `svn url [TARGET]' command, and then you
> guys could just use:
>
> svn ls `svn url`/subdir
Does that work on Windows?
--
Alan Shutko <at...@acm.org> - In a variety of flavors!
LOGIC: a set of rules to explain what we don't understand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by cm...@collab.net.
Zack Weinberg <za...@codesourcery.com> writes:
> On Thu, Aug 01, 2002 at 09:34:20AM -0700, Blair Zajac wrote:
> >
> > I'd prefer to use ^ instead
> ...
> > No Unix shells have an issue with ^.
>
> Not true. csh history expansion (picked up by bash and probably zsh
> also) uses ^ to delimit a 'quick substitution'. This means some
> versions of csh will silently make ^path vanish, since it doesn't fit
> their grammar.
Could we perhaps just add an `svn url [TARGET]' command, and then you
guys could just use:
svn ls `svn url`/subdir
? The notion of using magic character sequences really frightens me.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Alan Shutko <at...@acm.org>.
Zack Weinberg <za...@codesourcery.com> writes:
> Not true. csh history expansion (picked up by bash and probably zsh
> also) uses ^ to delimit a 'quick substitution'.
Actually, that requires two ^'s, one at the beginning of the line.
> This means some versions of csh will silently make ^path vanish,
> since it doesn't fit their grammar.
Testing bash, tcsh, csh on HP-UX 11 and SCO Openserver 5 does not
show this problem. Can you point to one that does?
--
Alan Shutko <at...@acm.org> - In a variety of flavors!
Why is there a Permanent Press setting on my iron?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Zack Weinberg <za...@codesourcery.com>.
On Thu, Aug 01, 2002 at 09:34:20AM -0700, Blair Zajac wrote:
>
> I'd prefer to use ^ instead
...
> No Unix shells have an issue with ^.
Not true. csh history expansion (picked up by bash and probably zsh
also) uses ^ to delimit a 'quick substitution'. This means some
versions of csh will silently make ^path vanish, since it doesn't fit
their grammar.
zw
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
URL of WC item (was: rapidsvn feedback)
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Aug 01, 2002 at 09:20:08AM -0500, cmpilato@collab.net wrote:
>...
> > It is not only about typing, it is also about remembering that damn
> > URL. I always need to grep the svn/INSTALL file when I need the URL
> > because I can't remember it =8)
>
> All I gotsta say is:
>
> THE_URL=`svn info working_copy_dir | grep Url: | cut -c 6-`
>
> :-) I use this *all the time*.
Bleh. That is the simpleton's mechanism. With the He-Man SWIG Checkin that I
just did, you can use the following:
#!/usr/bin/env python2
import svn._wc, svn.util
svn.util.apr_initialize()
pool = svn.util.svn_pool_create(None)
entry = svn._wc.svn_wc_entry('working_copy_dir', 0, pool)
print svn._wc.svn_wc_entry_t_url_get(entry)
hehe...
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Thu, Aug 01, 2002 at 09:20:08AM -0500, cmpilato@collab.net wrote:
> > > svn switch %%/branches/issue-531-dev .
> > It is not only about typing, it is also about remembering that damn
> > URL. I always need to grep the svn/INSTALL file when I need the URL
> > because I can't remember it =8)
>
> THE_URL=`svn info working_copy_dir | grep Url: | cut -c 6-`
So you just showed that all the needed information already can be
found within the administrative area. This means that there is no
_technical_ reason not to help people with this damn URL stuff ;-)
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Blair Zajac <bl...@orcaware.com>.
brane@xbc.nu wrote:
>
> Quoting Josef Wolf <jw...@raven.inka.de>:
>
> > On Thu, Aug 01, 2002 at 10:20:01AM +0200, brane@xbc.nu wrote:
> >
> > > Josef, would that be a good compromise?
> >
> > Definitely! Hmm... One step further could even be "svn ls %%/branches"
> > to see which branches are available or "svn cp %%/trink %%/tags/foo".
> > But this seems to be getting a big change, so it probably should be
> > left for after-1.0...
>
> No, that wouldn't be much of a problem. The arg parsing code would just convert
> %%/ to whatever the repos URL is. Once that is done, I think most commands would
> just work.
>
> > BTW: what about escaping on the command-line? AFAIK command.com would
> > stumble on %%? What about /bin/sh?
>
> Yes, shell escaping can be a problem. I'm not particularly wedded to %%; I'm
> sure we can find a prefix that's both easy to type and safe in the vast majority
> of cases/shells.
I'd prefer to use ^ instead because people are already used to meaning
the beginning of a string in regular expressions. Unfortunately, the
cmd.exe on my W2K box ignores it unless it is protected by "'s:
C:\>echo ^test
test
C:\>echo "^test"
"^test"
No Unix shells have an issue with ^.
Best,
Blair
--
Blair Zajac <bl...@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by br...@xbc.nu.
Quoting Josef Wolf <jw...@raven.inka.de>:
> On Thu, Aug 01, 2002 at 10:20:01AM +0200, brane@xbc.nu wrote:
>
> > Josef, would that be a good compromise?
>
> Definitely! Hmm... One step further could even be "svn ls %%/branches"
> to see which branches are available or "svn cp %%/trink %%/tags/foo".
> But this seems to be getting a big change, so it probably should be
> left for after-1.0...
No, that wouldn't be much of a problem. The arg parsing code would just convert
%%/ to whatever the repos URL is. Once that is done, I think most commands would
just work.
> BTW: what about escaping on the command-line? AFAIK command.com would
> stumble on %%? What about /bin/sh?
Yes, shell escaping can be a problem. I'm not particularly wedded to %%; I'm
sure we can find a prefix that's both easy to type and safe in the vast majority
of cases/shells.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by cm...@collab.net.
Josef Wolf <jw...@raven.inka.de> writes:
> On Thu, Aug 01, 2002 at 10:20:01AM +0200, brane@xbc.nu wrote:
>
> > FWIW, I _would_ support having a shortcut notation so that one didn't
> > have to type the root UTL of the repository all the time; e.g., so that
> > you could type
> >
> > svn switch %%/branches/issue-531-dev .
> >
> > and the client would grok from context that %% is
> > http://svn.collab.net/repos/svn. That shouldn't be too hard to do today,
> > and it would be positively trivial once we record the root URL
> > separately in the WC. This would save a lot of typing, and most
> > importantly, typos.
>
> It is not only about typing, it is also about remembering that damn
> URL. I always need to grep the svn/INSTALL file when I need the URL
> because I can't remember it =8)
All I gotsta say is:
THE_URL=`svn info working_copy_dir | grep Url: | cut -c 6-`
:-) I use this *all the time*.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Thu, Aug 01, 2002 at 10:20:01AM +0200, brane@xbc.nu wrote:
> FWIW, I _would_ support having a shortcut notation so that one didn't
> have to type the root UTL of the repository all the time; e.g., so that
> you could type
>
> svn switch %%/branches/issue-531-dev .
>
> and the client would grok from context that %% is
> http://svn.collab.net/repos/svn. That shouldn't be too hard to do today,
> and it would be positively trivial once we record the root URL
> separately in the WC. This would save a lot of typing, and most
> importantly, typos.
It is not only about typing, it is also about remembering that damn
URL. I always need to grep the svn/INSTALL file when I need the URL
because I can't remember it =8)
> Josef, would that be a good compromise?
Definitely! Hmm... One step further could even be "svn ls %%/branches"
to see which branches are available or "svn cp %%/trink %%/tags/foo".
But this seems to be getting a big change, so it probably should be
left for after-1.0...
BTW: what about escaping on the command-line? AFAIK command.com would
stumble on %%? What about /bin/sh?
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by br...@xbc.nu.
Josef Wolf wrote:
>On Wed, Jul 31, 2002 at 05:29:21PM -0500, Ben Collins-Sussman wrote:
>
>
>
>>>What happens when you give "svn switch" a wrong URL (one directory too
>>>deep or some such?)
>>>
>>>
>>Then your working copy is still switched to the URL.
>>That is: every single item in your working copy is deleted, and a
>>whole bunch of unrelated things are added. :-)
>>
>>
>
>That is why I wrote:
>
>| Given the example in section 2.4.2 of the handbook,
>| something like "svn switch mooIRC-beta subsystem/renderer"
>| would make more sense to me. "http://foo.com/repos/mooIRC" can be
>| determined from mooIRC/subsystem/renderer/.svn/entries and
>| "subsystem/renderer" is already given on the command line.
>
You're assuming a particular branch layout again. You can't do that.
FWIW, I _would_ support having a shortcut notation so that one didn't
have to type the root UTL of the repository all the time; e.g., so that
you could type
svn switch %%/branches/issue-531-dev .
and the client would grok from context that %% is
http://svn.collab.net/repos/svn. That shouldn't be too hard to do today,
and it would be positively trivial once we record the root URL
separately in the WC. This would save a lot of typing, and most
importantly, typos.
Josef, would that be a good compromise?
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Wed, Jul 31, 2002 at 05:29:21PM -0500, Ben Collins-Sussman wrote:
> > What happens when you give "svn switch" a wrong URL (one directory too
> > deep or some such?)
> Then your working copy is still switched to the URL.
> That is: every single item in your working copy is deleted, and a
> whole bunch of unrelated things are added. :-)
That is why I wrote:
| Given the example in section 2.4.2 of the handbook,
| something like "svn switch mooIRC-beta subsystem/renderer"
| would make more sense to me. "http://foo.com/repos/mooIRC" can be
| determined from mooIRC/subsystem/renderer/.svn/entries and
| "subsystem/renderer" is already given on the command line.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Ben Collins-Sussman <su...@collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> On Wed, Jul 31, 2002 at 03:18:14PM -0500, Ben Collins-Sussman wrote:
> > Josef Wolf <jw...@raven.inka.de> writes:
> >
> > > So you "svn update" to go back/forth along a branch and "svn switch"
> > > to jump from one branch to another? Seems that I am beginning to
> > > understand :) Looks good. It was always hard to explain new co-workers
> > > the overload of the "cvs update" and its -A switch =8). What happens
> > > when you give "svn update" a wrong URL (one directory too deep or some
> > > such?)
> >
> > 'svn update' doesn't take a URL argument, only 'svn switch'.
>
> Oops.. My last sentence should be:
>
> What happens when you give "svn switch" a wrong URL (one directory too
> deep or some such?)
Then your working copy is still switched to the URL.
That is: every single item in your working copy is deleted, and a
whole bunch of unrelated things are added. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Wed, Jul 31, 2002 at 03:18:14PM -0500, Ben Collins-Sussman wrote:
> Josef Wolf <jw...@raven.inka.de> writes:
>
> > So you "svn update" to go back/forth along a branch and "svn switch"
> > to jump from one branch to another? Seems that I am beginning to
> > understand :) Looks good. It was always hard to explain new co-workers
> > the overload of the "cvs update" and its -A switch =8). What happens
> > when you give "svn update" a wrong URL (one directory too deep or some
> > such?)
>
> 'svn update' doesn't take a URL argument, only 'svn switch'.
Oops.. My last sentence should be:
What happens when you give "svn switch" a wrong URL (one directory too
deep or some such?)
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: Re: rapidsvn feedback
Posted by Bill Tutt <ra...@lyra.org>.
> From: Ben Collins-Sussman [mailto:sussman@collab.net]
>
> Josef Wolf <jw...@raven.inka.de> writes:
>
> > Hmmm, I find it very confusing to speak about URLs when you really
> > mean branches. Maybe I am too biased to cvs philosophy, but I think
> > most SCM systems have a concept which is similar to cvs-branches.
>
> You just haven't been indoctrinated yet. :-) Perforce has the same
> idea: all tags and branches are just ordinary directories.
>
That's not completely true. Perforce's branches can contain more data
than Subversion's do. i.e. branch views, branch meta-data fields, etc..
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Ben Collins-Sussman <su...@collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:
> So you "svn update" to go back/forth along a branch and "svn switch"
> to jump from one branch to another? Seems that I am beginning to
> understand :) Looks good. It was always hard to explain new co-workers
> the overload of the "cvs update" and its -A switch =8). What happens
> when you give "svn update" a wrong URL (one directory too deep or some
> such?)
'svn update' doesn't take a URL argument, only 'svn switch'.
But yes: they are both the same code under the hood. The only
difference is that 'svn update' assumes that the URL isn't changing;
it keeps the working copy on the same URL, just changes the revision.
> Hmmm, I find it very confusing to speak about URLs when you really
> mean branches. Maybe I am too biased to cvs philosophy, but I think
> most SCM systems have a concept which is similar to cvs-branches.
You just haven't been indoctrinated yet. :-) Perforce has the same
idea: all tags and branches are just ordinary directories.
> But isn't "update" just a special case of "switch"? Can't you always
> substitute an "update" through a "switch"? And then: should the user
> really care which command is used internally? I think that on the
> User-Interface it would make very much sense to speak about
> "branches", "tags" and "revisions" and hide the "URLs" and
> "directories" that are used internally. This is just because most
> people are already used to "branches" and "tags".
> Any opinions to such a proposal?
Yes. We want all users to understand that branches and tags are
ordinary directories. We don't want to "cover up" this design
aspect. We made this decision a long time ago.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by RADICS Peter <mi...@platon.lbcons.net>.
On Wed, Jul 31, 2002 at 10:26:16PM +0200, Branko Čibej wrote:
> Josef Wolf wrote:
> >On Wed, Jul 31, 2002 at 07:03:06PM +0200, Branko ??ibej wrote:
[SNIP] // some talk about update and switch
> >I think that on the
> >User-Interface it would make very much sense to speak about
> >"branches", "tags" and "revisions" and hide the "URLs" and
> >"directories" that are used internally.
> >
Yes, this would be really nice!
> Ah, you can't do that. That's because we don't enforce a particular
> branching scheme, so the GUI can't assume where the branches are stored.
>
[SNIP]
but you don't have to force anything. here's an idea (probly after 1.0):
the repository "policy" should be defined in the repository in some form
(for example XML), and this should be communicated to the client on the initial
checkout (actually, it's enough if this information can be obtained in a
"standard" way (standard for svn, that is)).
this information could contain the default tag and branch directory structure
and then the GUI could use it to help tagging and branching.
actually, with this information it would be straightforward to implement
simple "svn tag" and "svn branch" functionality, and with a flag
the merge and switch command parameters could be these simplified names
instead of the long urls.
if this policy information is not awailable, then svn tag/branch could just
error out with a helpful message, and the GUI could disable the "nice "
branch/tag view.
this would lead to the same flexibility that we have now with regards to
repo layout, but it would help a lot for "common people" (like me:)
I don't know what's the best way to communicate this information to the client,
but I think this idea could work.
What do you all think?
regards,
mitch
ps: please CC me to the reply, 'cos I'm not on the list
--
// Radics Peter <mi...@lbcons.net> (http://lbcons.net)
//
// "If human beings don't keep exercising their lips,
// their brains start working." -- Ford Prefect
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Josef Wolf wrote:
>On Wed, Jul 31, 2002 at 07:03:06PM +0200, Branko ??ibej wrote:
>
>
>
>>Nope, that's "svn switch"; quite similar, but entirely different. :-)
>>Which is not to say you couldn't have the same UI for both update and
>>switch, of course.
>>
>>
>
>So you "svn update" to go back/forth along a branch and "svn switch"
>to jump from one branch to another? Seems that I am beginning to
>understand :) Looks good. It was always hard to explain new co-workers
>the overload of the "cvs update" and its -A switch =8). What happens
>when you give "svn update" a wrong URL (one directory too deep or some
>such?)
>
You don't give "svn update" an URL, it doesn't accept URLs. "svn help
update", right?
[snip]
>>> | REVISION: |
>>> |-------------|
>>> | Latest | << corresponds to "HEAD"
>>> | Branch... | << pops up a dialog where you enter a number
>>>
>>>
>>>
>>You mean "URL" here, don't you? Branches aren't numbered in Subversion
>>(at least, not so it's visible to the user).
>>
>>
>
>Hmmm, I find it very confusing to speak about URLs when you really
>mean branches. Maybe I am too biased to cvs philosophy, but I think
>most SCM systems have a concept which is similar to cvs-branches.
>
Look, SVN does have branches, it's just that they're the same as
directories. "svn switch" is just like "svn update", except that you
give it an URL to update your working copy from -- that is, tell it
which directory your branch is in.
>>Tags, branches, and directories are all the same thing in Subversion.
>>What you're saying would make sense in CVS, but not in SVN. The two
>>concepts are: "update", with an optional revision number or date; and
>>"switch", with a tag or branch name, and -- again -- an optional
>>revision or date.
>>
>>
>
>But isn't "update" just a special case of "switch"? Can't you always
>substitute an "update" through a "switch"?
>
Dunno, but I'd guess yes.
>And then: should the user
>really care which command is used internally?
>
No.
>I think that on the
>User-Interface it would make very much sense to speak about
>"branches", "tags" and "revisions" and hide the "URLs" and
>"directories" that are used internally.
>
Ah, you can't do that. That's because we don't enforce a particular
branching scheme, so the GUI can't assume where the branches are stored.
For example: In the Subversion repository, we decided to have the
mainline on /trunk, branches in /branches, and tags in /tags. But
there's nothing in SVN that mandates that layout. At work, for instance,
I have the repo laid out like this:
/www
/proj1
/proj1
/dev
/main
/branch_1
/doc
/tag
All branches for proj1 are in /proj1/dev, with /proj1/dev/main being the
main branch. Tags for proj1 are copied from /proj1/dev into /proj1/tag.
The project web pages (/www) and project documentation (/proj1/doc) are
never branched. Technical documentation (i.e., our SVN's notes
directory) would go into /proj1/dev/main, and get branched as necessary.
> This is just because most
>people are already used to "branches" and "tags".
>Any opinions to such a proposal?
>
See above. You'd have to enforce a certain layout, and that would make
your GUI less than useful.
>I am not really sure whether I am too biased to CVS. I have made the
>expirience that it is very easy to explain new co-workers about
>branches and tags. I found it only hard to explain the sticky tags and
>the -A option that cvs use to implement moving withhin/across
>branches. So I think it would be good to inherit the branch notation.
>
It should be even easier to explain about directory copies. "If you want
to start an alternate line of development, just copy /proj1/dev/main
into /proj1/dev/some_descriptive_branch_name, and use `svn switch' to
move your working copy to that branch. Subversion will remember revision
history, and you'll be able to merge changes onto the mainline, etc. etc.)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Wed, Jul 31, 2002 at 07:03:06PM +0200, Branko ??ibej wrote:
> Nope, that's "svn switch"; quite similar, but entirely different. :-)
> Which is not to say you couldn't have the same UI for both update and
> switch, of course.
So you "svn update" to go back/forth along a branch and "svn switch"
to jump from one branch to another? Seems that I am beginning to
understand :) Looks good. It was always hard to explain new co-workers
the overload of the "cvs update" and its -A switch =8). What happens
when you give "svn update" a wrong URL (one directory too deep or some
such?)
I have read the handbook several times, but somehow managed to
misunderstand this very basic distinction. It seems to me that the
confusion came from the redundancy contained in the parameters of
"svn switch". Given the example in section 2.4.2 of the handbook,
something like "svn switch mooIRC-beta subsystem/renderer"
would make more sense to me. "http://foo.com/repos/mooIRC" can be
determined from mooIRC/subsystem/renderer/.svn/entries and
"subsystem/renderer" is already given on the command line.
> > | REVISION: |
> > |-------------|
> > | Latest | << corresponds to "HEAD"
> > | Branch... | << pops up a dialog where you enter a number
> >
>
> You mean "URL" here, don't you? Branches aren't numbered in Subversion
> (at least, not so it's visible to the user).
Hmmm, I find it very confusing to speak about URLs when you really
mean branches. Maybe I am too biased to cvs philosophy, but I think
most SCM systems have a concept which is similar to cvs-branches.
> Tags, branches, and directories are all the same thing in Subversion.
> What you're saying would make sense in CVS, but not in SVN. The two
> concepts are: "update", with an optional revision number or date; and
> "switch", with a tag or branch name, and -- again -- an optional
> revision or date.
But isn't "update" just a special case of "switch"? Can't you always
substitute an "update" through a "switch"? And then: should the user
really care which command is used internally? I think that on the
User-Interface it would make very much sense to speak about
"branches", "tags" and "revisions" and hide the "URLs" and
"directories" that are used internally. This is just because most
people are already used to "branches" and "tags".
Any opinions to such a proposal?
I am not really sure whether I am too biased to CVS. I have made the
expirience that it is very easy to explain new co-workers about
branches and tags. I found it only hard to explain the sticky tags and
the -A option that cvs use to implement moving withhin/across
branches. So I think it would be good to inherit the branch notation.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Josef Wolf wrote:
>Sounds good. But please remember that "svn update" is also used to go
>to the HEAD of a different branch.
>
Nope, that's "svn switch"; quite similar, but entirely different. :-)
Which is not to say you couldn't have the same UI for both update and
switch, of course.
> This is different from going to the
>_version_ which is on the HEAD of the branch, since the latter will
>prevent you from commits. (Could somebody please confirm what I am
>writing here? I just deduced from CVS which makes a distinction
>between branch-revisions and ordinary revisions.) If it is true what I
>wrote so far, then there should be a possibility to make a distinction
>between a specified revision and a name of a branch. So I would like
>to extend the picture:
>
> _______ __
> | || |
> | |\ || | << this is the "update" button, in case you can't tell
> --- \ ||__|
> --- / ||\/| << below is the drop-down menu from clicking on the arrow
> | |/ || | << "Latest" is the default
> |_______||__|__________
> | REVISION: |
> |-------------|
> | Latest | << corresponds to "HEAD"
> | Branch... | << pops up a dialog where you enter a number
>
You mean "URL" here, don't you? Branches aren't numbered in Subversion
(at least, not so it's visible to the user).
> | Previous | << corresponds to "PREV"
> | Revision... | << pops up a dialog where you enter a number
> |_____________|
>
>Also note the changed order. I think most of the times you want to
>update to HEAD of some branch. Updating to a specific revision is a
>pretty rare operation, mainly used when you need to reproduce a bug
>which can't be reproduced on HEAD. YMMV!
>
>Further, the dialog that pops up when you choose "Revision..." or
>"Branch..." should let you enter a TAG-name respectively a branch-name.
>
Tags, branches, and directories are all the same thing in Subversion.
What you're saying would make sense in CVS, but not in SVN. The two
concepts are: "update", with an optional revision number or date; and
"switch", with a tag or branch name, and -- again -- an optional
revision or date.
>It would be great if this dialog could let you do the browsing in the
>revisions tree.
>
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Eric Gillespie <ep...@progeny.com>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:
> mind. No, there is not yet a wxWindows control that I know of that
> permits a button like you are suggesting. Partly because I do not
> think that GTK has such a widget yet.
You don't need a specialize widget. You just need to be able to set
the spacing in the toolbar so that you can squeeze two buttons next to
each other. The first button's clicked signal handler runs the update
action, in the second button's handler you pop up a menu.
--
Eric Gillespie <*> epg@progeny.com
Software Developer
Progeny Linux Systems - http://progeny.com/
"When everyone has to reinvent the wheel, many people invent
square wheels."
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Josef Wolf <jw...@raven.inka.de> wrote:
> On Tue, Jul 30, 2002 at 03:14:38PM +0900, Peter Johnson wrote:
> >> _______ __
> >> | || |
> >> | |\ || | << this is the "update" button, in case you can't
> tell
> >> --- \ ||__|
> >> --- / ||\/| << below is the drop-down menu from clicking on
> the arrow
> >> | |/ || | << "Latest" is the default
> >> |_______||__|________
> >> | REVISION: |
> >> |-----------|
> >> | Latest | << corresponds to "HEAD"
> >> | Previous | << corresponds to "PREV"
> >> | Choose... | << pops up a dialog where you enter a
> number*
> >> |___________|
> [ ... ]
> > That would be cool.
>
> Sounds good. But please remember that "svn update" is also used to
> go
> to the HEAD of a different branch. This is different from going to
> the
> _version_ which is on the HEAD of the branch, since the latter will
> prevent you from commits. (Could somebody please confirm what I am
> writing here? I just deduced from CVS which makes a distinction
> between branch-revisions and ordinary revisions.) If it is true
> what I
> wrote so far, then there should be a possibility to make a
> distinction
> between a specified revision and a name of a branch. So I would
> like
> to extend the picture:
>
> _______ __
> | || |
> | |\ || | << this is the "update" button, in case you can't
> tell
> --- \ ||__|
> --- / ||\/| << below is the drop-down menu from clicking on the
> arrow
> | |/ || | << "Latest" is the default
> |_______||__|__________
> | REVISION: |
> |-------------|
> | Latest | << corresponds to "HEAD"
> | Branch... | << pops up a dialog where you enter a
> number
> | Previous | << corresponds to "PREV"
> | Revision... | << pops up a dialog where you enter a
> number
> |_____________|
>
> Also note the changed order. I think most of the times you want to
> update to HEAD of some branch. Updating to a specific revision is a
> pretty rare operation, mainly used when you need to reproduce a bug
> which can't be reproduced on HEAD. YMMV!
>
> Further, the dialog that pops up when you choose "Revision..." or
> "Branch..." should let you enter a TAG-name respectively a
> branch-name.
> It would be great if this dialog could let you do the browsing in
> the
> revisions tree.
Thanks to both of you for your suggestions. I will keep them in
mind. No, there is not yet a wxWindows control that I know of that
permits a button like you are suggesting. Partly because I do not
think that GTK has such a widget yet.
However, I do have a method that does almost exactly what you are
looking for and more. It is similiar to the way that Visual Source
Safe handles retreiving old copies from a repository. I will be
posting a full TODO list on the RapidSVN project page in the next few
days that will describe this. At that point we can discuss those
specs.
Cheers,
Brent
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Josef Wolf <jw...@raven.inka.de>.
On Tue, Jul 30, 2002 at 03:14:38PM +0900, Peter Johnson wrote:
>> _______ __
>> | || |
>> | |\ || | << this is the "update" button, in case you can't tell
>> --- \ ||__|
>> --- / ||\/| << below is the drop-down menu from clicking on the arrow
>> | |/ || | << "Latest" is the default
>> |_______||__|________
>> | REVISION: |
>> |-----------|
>> | Latest | << corresponds to "HEAD"
>> | Previous | << corresponds to "PREV"
>> | Choose... | << pops up a dialog where you enter a number*
>> |___________|
[ ... ]
> That would be cool.
Sounds good. But please remember that "svn update" is also used to go
to the HEAD of a different branch. This is different from going to the
_version_ which is on the HEAD of the branch, since the latter will
prevent you from commits. (Could somebody please confirm what I am
writing here? I just deduced from CVS which makes a distinction
between branch-revisions and ordinary revisions.) If it is true what I
wrote so far, then there should be a possibility to make a distinction
between a specified revision and a name of a branch. So I would like
to extend the picture:
_______ __
| || |
| |\ || | << this is the "update" button, in case you can't tell
--- \ ||__|
--- / ||\/| << below is the drop-down menu from clicking on the arrow
| |/ || | << "Latest" is the default
|_______||__|__________
| REVISION: |
|-------------|
| Latest | << corresponds to "HEAD"
| Branch... | << pops up a dialog where you enter a number
| Previous | << corresponds to "PREV"
| Revision... | << pops up a dialog where you enter a number
|_____________|
Also note the changed order. I think most of the times you want to
update to HEAD of some branch. Updating to a specific revision is a
pretty rare operation, mainly used when you need to reproduce a bug
which can't be reproduced on HEAD. YMMV!
Further, the dialog that pops up when you choose "Revision..." or
"Branch..." should let you enter a TAG-name respectively a branch-name.
It would be great if this dialog could let you do the browsing in the
revisions tree.
--
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Peter Johnson <pe...@nec.com.au>.
> -----Original Message-----
> From: Branko ?ibej [mailto:brane@xbc.nu]
> Sent: Tuesday, July 30, 2002 3:20 PM
> To: Peter Johnson
> Cc: dev@subversion.tigris.org
> Subject: Re: rapidsvn feedback
>
> Peter Johnson wrote:
>
> >>-----Original Message-----
> >>From: Branko ?ibej [mailto:brane@xbc.nu]
> >>Sent: Tuesday, July 30, 2002 2:24 PM
> >>To: Peter Johnson
> >>Cc: dev@subversion.tigris.org
> >>Subject: Re: rapidsvn feedback
> >>
> >>Peter Johnson wrote:
> >>
> >>
> >>
> >>>Thanks for clearing that up, but why is there a way of just getting
> >>>
> >>>
> >the
> >
> >
> >>>files without checking them out, i.e. leaving them read-only?
> >>>
> >>>
> >>>
> >>>
> >>Since you mentioned ClearCase, I think I finally understand your
> >>misconception. In ClearCase "check out" means "get the latest
version
> >>and lock it". Subversion does not lock files, it uses a different
> >>development cycle altogether, similar to (but not identical) to
using
> >>snapshot views and unreserved check-outs in ClearCase. In
Subversion,
> >>"check out" means "copy files from the server into a local
directory".
> >>
> >>
> >
> >I guess that also means there's no need for ClearCase config specs?
> >
>
> Yes. Subversion is not ClearCase, it doesn't have config specs.
>
> > All
> >developers have write access to what ever version they choose and
then
> >just merge it in. Or work on a suitable branch where the same would
> >apply before putting it on to the trunk.
> >
> >Would a "config spec" interface be useful in determining what
revision
> >to checkout?
> >
> No.
>
> > Or it this overkill?
> >
> Yes.
>
>
> Have you read the handbook? If yes, I'm surprised you're asking
> questions that are answered there. If not, then please do so. There is
> no way you can even start designing a user interface for Subversion
> without learning about the basics.
>
> I'm sorry if this sounds a bit harsh, but people have spent a lot of
> time writing documentation to answer precisely the questions you keep
> asking. Please read it, and play around with the command-line client
to
> get acquainted with Subversion's philosophy and usage model.
>
Yes I've read the handbook and tried a few test repositories, but
haven't learnt everything yet. That's why this forum is so cool ;-) No,
it doesn't sound harsh at all. I'm merely trying to map what I know
about ClearCase and SourceSafe to Subversion. Maybe that will help to
create a better GUI, may be it wont'.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Peter Johnson wrote:
>>-----Original Message-----
>>From: Branko ?ibej [mailto:brane@xbc.nu]
>>Sent: Tuesday, July 30, 2002 2:24 PM
>>To: Peter Johnson
>>Cc: dev@subversion.tigris.org
>>Subject: Re: rapidsvn feedback
>>
>>Peter Johnson wrote:
>>
>>
>>
>>>Thanks for clearing that up, but why is there a way of just getting
>>>
>>>
>the
>
>
>>>files without checking them out, i.e. leaving them read-only?
>>>
>>>
>>>
>>>
>>Since you mentioned ClearCase, I think I finally understand your
>>misconception. In ClearCase "check out" means "get the latest version
>>and lock it". Subversion does not lock files, it uses a different
>>development cycle altogether, similar to (but not identical) to using
>>snapshot views and unreserved check-outs in ClearCase. In Subversion,
>>"check out" means "copy files from the server into a local directory".
>>
>>
>
>I guess that also means there's no need for ClearCase config specs?
>
Yes. Subversion is not ClearCase, it doesn't have config specs.
> All
>developers have write access to what ever version they choose and then
>just merge it in. Or work on a suitable branch where the same would
>apply before putting it on to the trunk.
>
>Would a "config spec" interface be useful in determining what revision
>to checkout?
>
No.
> Or it this overkill?
>
Yes.
Have you read the handbook? If yes, I'm surprised you're asking
questions that are answered there. If not, then please do so. There is
no way you can even start designing a user interface for Subversion
without learning about the basics.
I'm sorry if this sounds a bit harsh, but people have spent a lot of
time writing documentation to answer precisely the questions you keep
asking. Please read it, and play around with the command-line client to
get acquainted with Subversion's philosophy and usage model.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Peter Johnson <pe...@nec.com.au>.
> -----Original Message-----
> From: Branko ?ibej [mailto:brane@xbc.nu]
> Sent: Tuesday, July 30, 2002 2:24 PM
> To: Peter Johnson
> Cc: dev@subversion.tigris.org
> Subject: Re: rapidsvn feedback
>
> Peter Johnson wrote:
>
> >Thanks for clearing that up, but why is there a way of just getting
the
> >files without checking them out, i.e. leaving them read-only?
> >
> >
>
> Since you mentioned ClearCase, I think I finally understand your
> misconception. In ClearCase "check out" means "get the latest version
> and lock it". Subversion does not lock files, it uses a different
> development cycle altogether, similar to (but not identical) to using
> snapshot views and unreserved check-outs in ClearCase. In Subversion,
> "check out" means "copy files from the server into a local directory".
I guess that also means there's no need for ClearCase config specs? All
developers have write access to what ever version they choose and then
just merge it in. Or work on a suitable branch where the same would
apply before putting it on to the trunk.
Would a "config spec" interface be useful in determining what revision
to checkout? Or it this overkill?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Peter Johnson wrote:
>Thanks for clearing that up, but why is there a way of just getting the
>files without checking them out, i.e. leaving them read-only?
>
>
Since you mentioned ClearCase, I think I finally understand your
misconception. In ClearCase "check out" means "get the latest version
and lock it". Subversion does not lock files, it uses a different
development cycle altogether, similar to (but not identical) to using
snapshot views and unreserved check-outs in ClearCase. In Subversion,
"check out" means "copy files from the server into a local directory".
Please read the Subversion Handbook.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Blair Zajac <bl...@orcaware.com>.
Peter Johnson wrote:
>
> Thanks for clearing that up, but why is there a way of just getting the
> files without checking them out, i.e. leaving them read-only?
Svn works with the model that all files are checked out in read-write
mode.
There is no locking of files or directories to prevent other developers
from making modifications to files.
Best,
Blair
--
Blair Zajac <bl...@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Peter Johnson <pe...@nec.com.au>.
> -----Original Message-----
> From: pdavis152@attbi.com [mailto:pdavis152@attbi.com] On Behalf Of
Peter
> Davis
> Sent: Tuesday, July 30, 2002 1:16 PM
> To: dev@subversion.tigris.org
> Subject: Re: rapidsvn feedback
>
> On Monday 29 July 2002 21:54, Peter Johnson wrote:
> > > This would be less than true. You can update to something other
than HEAD.
> >
> > In that case may be an interface is needed to select the revision or
> > branch?
>
> That's an extremely attractive idea. However, it is important to
avoid
> requiring more clicks than necessary. Just as a suggestion to Paul,
I'm
> envisioning a button like this in the toolbar:
>
> _________ __
> | || |
> | |\ || | << this is the "update" button, in case you can't
tell
> ----- \ ||__|
> ----- / ||\/| << below is the drop-down menu from clicking on
the arrow
> | |/ || | << "Latest" is the default
> |_________||__|________
> | REVISION: |
> |-----------|
> | Latest | << corresponds to "HEAD"
> | Previous | << corresponds to "PREV"
> | Choose... | << pops up a dialog where you enter a
number*
> |___________|
>
> *) It would be really uber-cool to have the dialog be able to browse
the
> revisions (in reverse-chronological order), and let you also see the
log
> messages.
That would be cool.
ClearCase does this with the tree view, which is a wicked interface to
the branches and labels on each version of a file.
> [Whoohoo! I love ASCII art!]
>
> Hopefully this is implementable in wxWindows (WRT the toolbar with the
arrow,
> ala Your-Generic-Internet-Browser's "Back" button).
>
>
> RapidSVN is already very cool. To be able to access the
advanced/edge-case
> uses of all the SVN commands in a non-obtrusive (as in, *not*
WinCVS-style)
> way would be even cooler. BTW I think selection of revisions and
ranges of
> revisions should be allowed for all the buttons.
>
> > > >Commit -> Check in
> > > >Revert -> Check out
> > >
> > > Revert does not mean the same as check out. In fact it means
something
> > > quite different.
> >
> > Please can you be more specific? I'm still learning Subversion.
> > Thanks.
>
> Commit does pretty much mean "check in", I'll give you that. But
"check out"
> is equivilant to, well, the "svn checkout" command, which retrieves a
copy of
> the code into a working directory. There needs to be/remain a
separate
> button for that. Revert means "remove/delete/forget all local
changes",
> which is very different.
>
Thanks for clearing that up, but why is there a way of just getting the
files without checking them out, i.e. leaving them read-only?
Cheers
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Peter Davis <pe...@pdavis.cx>.
On Monday 29 July 2002 21:54, Peter Johnson wrote:
> > This would be less than true. You can update to something other than HEAD.
>
> In that case may be an interface is needed to select the revision or
> branch?
That's an extremely attractive idea. However, it is important to avoid
requiring more clicks than necessary. Just as a suggestion to Paul, I'm
envisioning a button like this in the toolbar:
_________ __
| || |
| |\ || | << this is the "update" button, in case you can't tell
----- \ ||__|
----- / ||\/| << below is the drop-down menu from clicking on the arrow
| |/ || | << "Latest" is the default
|_________||__|________
| REVISION: |
|-----------|
| Latest | << corresponds to "HEAD"
| Previous | << corresponds to "PREV"
| Choose... | << pops up a dialog where you enter a number*
|___________|
*) It would be really uber-cool to have the dialog be able to browse the
revisions (in reverse-chronological order), and let you also see the log
messages.
[Whoohoo! I love ASCII art!]
Hopefully this is implementable in wxWindows (WRT the toolbar with the arrow,
ala Your-Generic-Internet-Browser's "Back" button).
RapidSVN is already very cool. To be able to access the advanced/edge-case
uses of all the SVN commands in a non-obtrusive (as in, *not* WinCVS-style)
way would be even cooler. BTW I think selection of revisions and ranges of
revisions should be allowed for all the buttons.
> > >Commit -> Check in
> > >Revert -> Check out
> >
> > Revert does not mean the same as check out. In fact it means something
> > quite different.
>
> Please can you be more specific? I'm still learning Subversion.
> Thanks.
Commit does pretty much mean "check in", I'll give you that. But "check out"
is equivilant to, well, the "svn checkout" command, which retrieves a copy of
the code into a working directory. There needs to be/remain a separate
button for that. Revert means "remove/delete/forget all local changes",
which is very different.
--
Peter Davis
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Ben Collins-Sussman <su...@collab.net>.
"Peter Johnson" <pe...@nec.com.au> writes:
> > -----Original Message-----
> > From: Branko ?ibej [mailto:brane@xbc.nu]
> > Sent: Tuesday, July 30, 2002 12:51 PM
> > To: Peter Johnson
> > Cc: dev@subversion.tigris.org
> > Subject: Re: rapidsvn feedback
> >
> > Peter Johnson wrote:
> >
> > >I'd like to see the UI terminology changed.
> > >For example, the following table may be used to translate the
> existing
> > >UI terminology into something more familiar.
> > >
> > >Update -> Get latest
> > >
> >
> > This would be less than true. You can update to something other than
> HEAD.
>
> In that case may be an interface is needed to select the revision or
> branch?
Yes. Every working copy represents some URL at some revision.
Teh 'svn update' makes your working copy identical to its current URL,
but in a different revision. 'svn switch' makes your working copy
represent any arbitrary (revision, URL) pair.
>
> > >Commit -> Check in
> > >Revert -> Check out
> > >
> >
> > Revert does not mean the same as check out. In fact it means something
> > quite different.
>
> Please can you be more specific? I'm still learning Subversion.
> Thanks.
'svn revert' undoes any local changes you've made to your working
copy. It does this by overwriting your working files with 'pristine'
copies that are stashed away in the .svn/ areas.
See the Handbook... in particular, the "Basic Work Cycle" section:
http://subversion.tigris.org/files/documents/15/576/svn-handbook.html#Basic%20Work%20Cycle
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Daniel Berlin <db...@dberlin.org>.
On Tue, 30 Jul 2002, Peter Johnson wrote:
> > -----Original Message-----
> > From: Branko ?ibej [mailto:brane@xbc.nu]
> > Sent: Tuesday, July 30, 2002 12:51 PM
> > To: Peter Johnson
> > Cc: dev@subversion.tigris.org
> > Subject: Re: rapidsvn feedback
> >
> > Peter Johnson wrote:
> >
> > >I'd like to see the UI terminology changed.
> > >For example, the following table may be used to translate the
> existing
> > >UI terminology into something more familiar.
> > >
> > >Update -> Get latest
> > >
> >
> > This would be less than true. You can update to something other than
> HEAD.
>
> In that case may be an interface is needed to select the revision or
> branch?
>
> > >Commit -> Check in
> > >Revert -> Check out
> > >
> >
> > Revert does not mean the same as check out. In fact it means something
> > quite different.
>
> Please can you be more specific? I'm still learning Subversion.
Revert means to remove any changes you've added to the working copy.
Checkout means check out from the repository (which, i'm guessing, would
merge if a copy already exists unless you force an overwrite, because this
is what I remember CVS doing. :P)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Peter Johnson <pe...@nec.com.au>.
> -----Original Message-----
> From: Branko ?ibej [mailto:brane@xbc.nu]
> Sent: Tuesday, July 30, 2002 12:51 PM
> To: Peter Johnson
> Cc: dev@subversion.tigris.org
> Subject: Re: rapidsvn feedback
>
> Peter Johnson wrote:
>
> >I'd like to see the UI terminology changed.
> >For example, the following table may be used to translate the
existing
> >UI terminology into something more familiar.
> >
> >Update -> Get latest
> >
>
> This would be less than true. You can update to something other than
HEAD.
In that case may be an interface is needed to select the revision or
branch?
> >Commit -> Check in
> >Revert -> Check out
> >
>
> Revert does not mean the same as check out. In fact it means something
> quite different.
Please can you be more specific? I'm still learning Subversion.
Thanks.
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by Branko Čibej <br...@xbc.nu>.
Peter Johnson wrote:
>I'd like to see the UI terminology changed.
>For example, the following table may be used to translate the existing
>UI terminology into something more familiar.
>
>Update -> Get latest
>
This would be less than true. You can update to something other than HEAD.
>Commit -> Check in
>Revert -> Check out
>
Revert does not mean the same as check out. In fact it means something
quite different.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: rapidsvn feedback
Posted by Peter Johnson <pe...@nec.com.au>.
> -----Original Message-----
> From: Brent R. Matzelle [mailto:bmatzelle@yahoo.com]
> Sent: Tuesday, July 30, 2002 11:59 AM
> To: dev@subversion.tigris.org
> Subject: Re: rapidsvn feedback
>
<snip>
> These are all good suggestions. As I said above, iteration of the
> code is a key here. Please keep the suggestions coming!
>
I'd like to see the UI terminology changed.
For example, the following table may be used to translate the existing
UI terminology into something more familiar.
Update -> Get latest
Commit -> Check in
Revert -> Check out
However, when I use "Update" I get the following error:
apr_error: #20014, src_err 0 : <Error string not specified yet>
REPORT request failed on /repos/svn/clients/rapidsvn/trunk
apr_error: #20014, src_err 0 : <Error string not specified yet>
The REPORT status was 400, but expected 200.
Regard
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: rapidsvn feedback
Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Ben Collins-Sussman <su...@collab.net> wrote:
> First, I think steps need to be taken to "lower the barrier" for
> other
> people to contribute. There are a few simple policies that
> Subversion
> itself has followed from the very beginning, and I think these
> policies have a made a *huge* difference in increasing the
> user-friendliness of the code. Certainly, nobody is going to tell
> you
> how to run your project. :-) But you should still mull these
> ideas
> over, give them some thought:
First, let me give you some history of the project. The original
code was developed by Paul Marculescu. He happened to do a very good
job on the project and he has made the most complete product to date
with virtually no guidance from the Subversion team.
I intend on making RapidSVN an example of good iterative design.
Paul's effort was to develop a usable tool as efficiently as
possible. I believe he succeeded. Now it will be RapidSVN team's
job to complete the work by iteratively making the interface better.
> * 80-column code formatting. Not everyone in the world uses tiny
> fonts in an editor that takes up the whole screen.
I didn't know that this was an issue any more. I will certainly look
into this.
> * Using spaces for all indentation, instead of tabs. We have
> support-files that give us this behavior in Emacs and vi. It
> keeps the code looking clean and neat, no matter how you're
> viewing it. Most modern editors will do the Right Thing and
> keep
> code aligned as you work, even when indentation is all spaces.
> At
> the moment, a lot of your code looks weirdly misaligned.
This is a pet peeve of mine. I will definitely get this switched to
spaces.
> * Choose a log message policy. I already see some vague messages
> in
> your log; it's not really clear what happened in every commit.
> I
> shouldn't have to force myself to run 'svn log -v' or 'svn diff
> -rN' to figure out what people did. The Subversion project
> uses a
> log policy documented in our HACKING file; or maybe you want to
> make up your own. Just avoid ambiguous log messages -- choose
> some policy!
I am not sure which one or ones your are referring to. I'll take a
look.
> * EOL style: some of your source files seem to have CRLF endings,
> and some just have LF endings. If you have a lot of
> cross-platform developers, you probably want to set
> 'svn:eol-style' to 'native' on everything. CVS does this by
> default, but SVN does not. If you don't set this property, I
> fear
> you're going to end up with a lot of flip-flopping of eol
> styles
> in the future.... which means you won't be able to see changes
> when you run 'svn diff'; the *entire* file will look changed.
That is a valid concern. Unix style it is then.
> * Commit policies. Choose some that you like, and stick with
> them.
> For example, a first good policy is to make sure that HEAD
> always
> compiles cleanly. This kind of discipline really pays off;
> when
> somebody checks out the latest rapidsvn code and it fails on a
> syntax error..., they get very frustrated. (Which is what I'm
> getting right now, by the way...) Continuing on this theme,
> another good policy is to make sure that HEAD always compiles
> against the latest Subversion API. People are making commits
> to
> the main Subversion code every day, and the API won't be frozen
> until 1.0. Two days ago, I couldn't compile rapidsvn because
> the
> interface to 'svn_client_status' had changed since Alpha, and
> apparently no rapidsvn developers had noticed -- they were
> still
> using week-old header files! I'm not saying that you need to
> stand by, nervously waiting for the svn API to change, ready to
> instantly patch rapidsvn; instead, if you're about to commit a
> change to rapidsvn, make sure that your working copy compiles
> against the latest svn libraries. At least that way we can
> backdate our svn libraries to the date of the last rapidsvn
> commit, and know it will work!
Saying that the Subversion client API is a moving target would be a
great understatement. Just yesterday RapidSVN was building fine.
Today yet another API change surfaced that prevents a clean compile.
I want to be up to the minute as well but without a ChangeLog of API
changes it is difficult to keep up to date. Maybe this process can
be improved now that clients other than svn are dependent on the API?
> Second, I have comments about the actual content/design of
> rapidsvn.
> These are purely personal opinions, just my first impressions:
>
> * It seems strange to me that you've got a big window pane that
> is
> essentially showing the output of 'svn st -v': the working
> revision, the last changed rev, and so on. But the *whole*
> point
> of 'svn status' is to show the "status" of a file: is it
> locally
> modified? Is it in a state of conflict? Is it scheduled for
> addition or deletion? Instead, I have to push a button (or
> right-menu-click) to run "status" on the individual item. I
> don't
> understand why the the status enum isn't being used and
> displayed
> right there in the main list; svn_client_status() is giving you
> everything you need already. (And every other svn GUI I've
> seen
> is doing this.)
>
> * I also don't understand the output-scroll area at the bottom of
> the screen. It looks (at first glance) like you're just
> capturing
> the output of the commandline-client as it runs! After playing
> with it a bit, I can tell that's not really true... but I still
> don't understand the motivation. Why are you trying to mimic
> the
> output of the commandline program? Why would a GUI user want
> to
> see little U's and G's flying by during an update? I think you
> should be making use of the *GUI* somehow. Make the updated
> items
> light up in different colors. Mark conflicted items as red.
> And
> so on. I'm just encouraging you to think "beyond the
> commandline
> box." :-)
>
> Anyway, looks like you guys are off to a good start. I hope this
> feedback was useful!
These are all good suggestions. As I said above, iteration of the
code is a key here. Please keep the suggestions coming!
Best regards,
Brent
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org