Hi Dan, (Note after I finished writing out merge instructions I realized there were 2 pieces of information I didn't know. 1) can you merge into a closed branch? 2) how do you push only changes to branches that exist on the destination?
Hopefully someone else can answer those questions and the rest of what I wrote will still be helpful) What I tend to do is get all the changes that I haven't made from the source repository, merge them into my branch and verify that all is well, and then merge my changes back into the default branch, and then push my changes back to the source repository. You can skip the step of merging changes into your branch if you want. Here's how I'd do it: First pull from the "source Repository" so you have the latest changes in your clone. Next make sure that you don't have any uncommitted changes, if you do, commit them into your branch. Then in the TortoiseHg Repository Explorer, right-click on the latest changeset in the "default" branch, and select "Merge with...". This should bring up a dialog telling you the "Merge target" revision on the top, which should be the changeset you right-clicked on, and the "Current revision (local)" on the bottom. Verify the the revisions it is going to merge are actually the ones you want to merge (I've messed this up a couple of times by not refreshing the Repository explorer 1st). Click the Merge button. This will merge the changes from the default branch into your named branch. If there are conflicts you should be informed and get a chance to fix them (the tool used will depend on how you've set up tortoiseHg). When the Merge is successful, you will be told and the dialog box will have a Commit button. Click the Commit button, enter a comment about the merge and commit it. I would verify that everything still works at this point. If so, the merge back to default will be easy. First you will need to make the default tip your working copy (at least this is the only way I know to do it). >From the Repository explorer, right-click on the head of the default branch and select "Update..." When that is finished, right-click on the head of your branch (which is probably the merged changeset) and select "Merge with...". The rest is similar to the 1st merge. Hope this helps, Mike On Fri, Aug 13, 2010 at 2:58 PM, Dan Guzman <[email protected]> wrote: > I'm new to mercurial and Source Control in general, but I have looked > through the guides on both Mercurial and TortoiseHG pages. > > I've been working on my clone for a couple of months now, sometimes just > playing around. I added a branch awhile back, but have only been > working in the branch. Now I want to Sync to the source Repository on > the network for some else to start their coding. When I try to push my > changes back, I get an error: > > pushing to n:\CD\MyPrint\MyPrintRepository\MyPrint Website > searching for changes > (use 'hg push --new-branch' to create new remote branches) > abort: push creates new remote branches: Back to Original! > [command returned code 1 Fri Aug 13 10:47:56 2010] > > OK, thanks for the message, I don't want a branch on the source repo. > I'm at a stopping point in my code, so how do I merge back the branch > into a single stream, then push changes? I can't find any coverage of > branching in the documentation. > > I added a final commit using the close branch option, but I still get > the same error message. What am I missing? > > Dan > > -- > Dan Guzman > Developer - Analyst - DBA > Random Lengths Publishing, Inc. > (541) 686-9925 > [email protected] > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Tortoisehg-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss >
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ Tortoisehg-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

