<div dir="ltr">Mark,<div><br></div><div>I agree with this procedure. It sounds low-risk and easy. I will send a second response to this message as soon as the transition is complete.</div><div><br></div><div>-Richard Jones</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 2:46 PM, Mark M. Ito <span dir="ltr"><<a href="mailto:marki@jlab.org" target="_blank">marki@jlab.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Paul and Richard,<br>
<br>
Recall we talked about you two working on a common branch. The difficulty was that Richard has already checked out the trunk and has been making changes on to that "working copy". To do the work-on-a-branch thing, we need to put those changes onto a branch that does not exist at present. I am assuming that none of the modifications to the working have been checked back in. If they have been checked in that complicates matters and the following will not work in detail.<br>

<br>
Here is the procedure for switching Richard's changes onto a branch.<br>
<br>
1) Create the branch<br>
<br>
1a) Determine the revision where Richard first checked out from the trunk. Let us call that revision 10000.<br>
<br>
1b) Create the branch with an svn copy. call it sim-recon-rj-pm for this example. This is repository-to-repository copy, i. e., nothing changes on the local disk.<br>
<br>
   svn copy <a href="https://halldsvn.jlab.org/repos/trunk/sim-recon@10000" target="_blank">https://halldsvn.jlab.org/<u></u>repos/trunk/sim-recon@10000</a> <a href="https://halldsvn.jlab.org/repos/branches/sim-recon-rj-pm" target="_blank">https://halldsvn.jlab.org/<u></u>repos/branches/sim-recon-rj-pm</a><br>

<br>
Now we have a branch that is exactly the same as the trunk at the point before Richard made changes. In particular, it does not contain any changes made to the trunk after Richard did his checkout.<br>
<br>
2) "Switch" Richard's changes onto the branch<br>
<br>
2a) Backup the working copy, for obvious reasons.<br>
<br>
2b) From within the sim-recon directory of the working copy execute a switch:<br>
<br>
   svn switch <a href="https://halldsvn.jlab.org/repos/branches/sim-recon-rj-pm" target="_blank">https://halldsvn.jlab.org/<u></u>repos/branches/sim-recon-rj-pm</a><br>
<br>
Now the working copy thinks that it was originally checked out from the branch. So any check-ins will not go to the trunk, but onto the branch. Others, i. e., Paul, can check out the branch, get those changes and continue working.<br>

<br>
3) Merge back onto the trunk.<br>
<br>
This is for the future, when work on the branch is complete and we want to put all the changes back on the trunk. The rub is that we also want to preserve any changes made to the trunk since revision 10000 as well.<br>
<br>
3a) Check out an up-to-date version of the trunk<br>
<br>
   svn co <a href="https://halldsvn.jlab.org/repos/trunk/sim-recon" target="_blank">https://halldsvn.jlab.org/<u></u>repos/trunk/sim-recon</a><br>
<br>
3b) Do the merge<br>
<br>
   cd sim-recon<br>
   svn merge <a href="https://halldsvn.jlab.org/repos/branches/sim-recon-rj-pm" target="_blank">https://halldsvn.jlab.org/<u></u>repos/branches/sim-recon-rj-pm</a><br>
<br>
Now the current directory contains all of the changes made on the branch (because of the merge) and all changes made on the trunk since branching (since we checked this copy out from the up-to-date trunk). The changes made on the branch will be in the working copy, but none of them will have been checked in. If there are conflicts then life gets interesting.<br>

<br>
4) Check in the merged version. From the same directory (sim-recon).<br>
<br>
   svn checkin<br>
<br>
And you are all done!<br>
<br>
I tested this now on a junk directory of files that I keep around for times like these.<br>
<br>
All of this having being said, I am not fully convinced we want to go this way. What do you guys think?<span class="HOEnZb"><font color="#888888"><br>
<br>
   -- Mark<br>
<br>
-- <br>
Mark M. Ito, Jefferson Lab, <a href="mailto:marki@jlab.org" target="_blank">marki@jlab.org</a>, <a href="tel:%28757%29269-5295" value="+17572695295" target="_blank">(757)269-5295</a><br>
<br>
______________________________<u></u>_________________<br>
Halld-offline mailing list<br>
<a href="mailto:Halld-offline@jlab.org" target="_blank">Halld-offline@jlab.org</a><br>
<a href="https://mailman.jlab.org/mailman/listinfo/halld-offline" target="_blank">https://mailman.jlab.org/<u></u>mailman/listinfo/halld-offline</a><br>
</font></span></blockquote></div><br></div>