Re: svn commit: r1346864 - /tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
Konstantin, On 6/6/12 2:45 PM, Konstantin Kolinko wrote: > # Merging: > > 1. Run "update" before merge. Of course :) > 2. Invoke merge from the root of the project, so that svn:merge-info > on the project root directory is updated. I think this is what I failed to do with the EchoServlet: since there was only a single file changed, I did the merge on that file only. > If you need to revert after a merge (e.g. to rerun it), you should > revert the root of the project, so that svn:mergeinfo property change > on it is reverted. Good to know. > # Committing after a merge: > > 1. Start commit from the root of the project. > > This is so that svn:mergeinfo property change on that directory is > committed as well. Gotcha. I checked, and using '--depth empty' will allow me to specify exactly which files to commit (including '.' at the project root) without svn performing any kind of recursion. So, I can work on multiple things at once as long as I only do a single merge at a time. > Command line has --depth argument to many svn > commands, but I do not know how well the GUI works in your case. I used the CLI with --depth first to ensure it did what I wanted. I'll see what Eclipse can do for me, now. > When > in doubt, it is better to prioritize the actual changes over mergeinfo > management. ;) > This "start from root" recommendation is needed after a merge only and > only to commit mergeinfo update. Thanks. > 2. I usually review the diff before committing. Always. > TortoiseSVN has "Show changes as unified diff" command. > Command-line has "svn diff" command. > Eclipse probably has something like that. It does: you can compare the working copy (or a selection of files) against HEAD. Eclipse also helpfully gives you a quick-diff along with the list of files that have changed in the "commit message" dialog so you can record the commit message and browse the changes simultaneously. Thanks a lot, -chris signature.asc Description: OpenPGP digital signature
Re: svn commit: r1346864 - /tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
2012/6/6 Christopher Schultz : > Konstantin, > > On 6/6/12 8:52 AM, kkoli...@apache.org wrote: >> Author: kkolinko >> Date: Wed Jun 6 12:52:20 2012 >> New Revision: 1346864 >> >> URL: http://svn.apache.org/viewvc?rev=1346864&view=rev >> Log: >> Remove svn:merge-info property on EchoMessage.java, that was added in >> r1346684 >> >> Note: Merges should be started from project root - tc7.0.x/trunk, and >> project root has >> to be included in subsequent commit. That way svn:merge-info will be present >> only on the project root directory. > > Sorry about that. I use Eclipse: what is the best way to do and commit a > proper merge? Should I be committing not only the changed files but also > the project-root as a directory? If I do that, I think Eclipse (or even > svn) would force me to commit every change all at once -- i.e. I can't > work on multiple patches at the same time. > > I'm sure that's not true, so I'm certainly open to some education. > I am using TortoiseSVN and svn command line client (both version 1.7). I do not know Eclipse SVN GUI, but the recommendations below are generic ones. I would recommend the following: # Merging: 1. Run "update" before merge. Check for uncommitted changes. Both should make the merge run faster and be more smooth. 2. Invoke merge from the root of the project, so that svn:merge-info on the project root directory is updated. Otherwise svn:mergeinfo will be set on the node where you started the merge from. # Reverting after a merge: If you need to revert after a merge (e.g. to rerun it), you should revert the root of the project, so that svn:mergeinfo property change on it is reverted. # Committing after a merge: 1. Start commit from the root of the project. This is so that svn:mergeinfo property change on that directory is committed as well. (I revert all local changes from 6.0.x or 7.0.x branch before merging a backport there, so I do not have the need to exclude some files from commit.) The internal API, I think, allows to distinguish recursive commits and non-recursive ones. Command line has --depth argument to many svn commands, but I do not know how well the GUI works in your case. When in doubt, it is better to prioritize the actual changes over mergeinfo management. This "start from root" recommendation is needed after a merge only and only to commit mergeinfo update. E.g. - it is not needed on trunk where most development takes place, - it is not needed if you ported the change manually (though you can run a "record-only" merge if you want to mark original revision as merged) "svn merge --record-only" - If you ported only a part of the original change, do not commit mergeinfo update, because it will prevent from rerunning the merge. Revert property change on the root directory (after committing the rest). 2. I usually review the diff before committing. TortoiseSVN has "Show changes as unified diff" command. Command-line has "svn diff" command. Eclipse probably has something like that. I hope this will be useful. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1346864 - /tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
Konstantin, On 6/6/12 8:52 AM, kkoli...@apache.org wrote: > Author: kkolinko > Date: Wed Jun 6 12:52:20 2012 > New Revision: 1346864 > > URL: http://svn.apache.org/viewvc?rev=1346864&view=rev > Log: > Remove svn:merge-info property on EchoMessage.java, that was added in r1346684 > > Note: Merges should be started from project root - tc7.0.x/trunk, and project > root has > to be included in subsequent commit. That way svn:merge-info will be present > only on the project root directory. Sorry about that. I use Eclipse: what is the best way to do and commit a proper merge? Should I be committing not only the changed files but also the project-root as a directory? If I do that, I think Eclipse (or even svn) would force me to commit every change all at once -- i.e. I can't work on multiple patches at the same time. I'm sure that's not true, so I'm certainly open to some education. Thanks, -chris signature.asc Description: OpenPGP digital signature
svn commit: r1346864 - /tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
Author: kkolinko Date: Wed Jun 6 12:52:20 2012 New Revision: 1346864 URL: http://svn.apache.org/viewvc?rev=1346864&view=rev Log: Remove svn:merge-info property on EchoMessage.java, that was added in r1346684 Note: Merges should be started from project root - tc7.0.x/trunk, and project root has to be included in subsequent commit. That way svn:merge-info will be present only on the project root directory. Modified: tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java (props changed) Propchange: tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java ('svn:mergeinfo' removed) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org