>> I also looked into shelving the changes, but I can’t find a way to unshelve 
>> onto a different branch.
If you want to go the shelveset route, you can use tfpt.exe from the Team 
Foundation Power Tools. (http://msdn.microsoft.com/en-us/tfs2008/bb980963.aspx)

C:\>tfpt unshelve /?
tfpt unshelve - Unshelve into workspace with pending changes

Allows a shelveset to be unshelved into a workspace with pending changes.
Merges content between local and shelved changes. Allows migration of shelved
changes from one branch into another by rewriting server paths.

Allows changes from an already-unshelved shelveset to be undone, cleaning
up pending adds, and preserving other existing pending changes in the
workspace.

Usage: tfpt unshelve [shelvesetname[;username]] [/nobackup]
                     [/migrate /source:serverpath /target:serverpath]

       tfpt unshelve /undo shelvesetname[;username] [/batchsize:num]
                     [/recursive] [filespec...]

 shelvesetname          The name of the shelveset to unshelve
 /nobackup              Skip the creation of a backup shelveset
 /migrate               Rewrite the server paths of the shelved items
                        (for example to unshelve into another branch)
 /source:serverpath     Source location for path rewrite (supply with /migrate)
 /target:serverpath     Target location for path rewrite (supply with /migrate)
 /undo                  Undo pending changes from an unshelved shelveset
 /batchsize:num         Set the batch size for server calls (default 500)


From: [email protected] [mailto:[email protected]] On Behalf Of David Russell
Sent: Friday, January 02, 2009 8:26 AM
To: '[email protected]'
Subject: Re: Merging from one branch in to another


Hi. I see a few options:

- checkin, do the baseless merge (or merge the fixes to the trunk, then merge 
to SP2), then rollback the original checkin.
- label the SP1 branch or just write down the last changeset number for that 
branch before the checkin. Checkin, do the merge to SP2. You can get the 
labelled/changeset version if you later need the exact codebase for that version
- copy the code on harddrive, and add as a new temporary branch, then do 
baseless merge. Delete the temp branch.
- checkout all of SP2, manual merge on harddrive, with a threeway merge tool 
that supports tfs, like Beyond Compare 3.

Hopefully this doesn't happen too often, and one-off manual labour is no big 
deal.

Consider allowing fixes in trunk only in future - we found mistakes like this 
occur too often to rely on devs doing the right thing on release branches. 
There's nothing worse than seeing a bug reappear in a later version. ;)

Dave.


________________________________
From: [email protected]
To: [email protected]
Sent: Sat Jan 03 02:41:58 2009
Subject: Merging from one branch in to another
There’s a good chance I’m being completely obtuse here, in which case I 
apologize, but I’ve got a problem I can’t seem to find a solution for.

Basically, we’ve got a branch structure that for all intents and purposes looks 
like this:

Trunk
 |
 |-SP0
 |-SP1
 |-SP2

Now, one of our devs, has coded some stuff into SP1 that really should have 
been SP2 only, so I’d like to find a way of getting his changes checked into 
SP2 without touching SP1 at all.

I looked into baseless merges, but they require the changes to be checked in 
which defeats the object.

I also looked into shelving the changes, but I can’t find a way to unshelve 
onto a different branch.

Does anyone have any idea of how to do this?

Cheers,

Philip


Philip Stears | Lead Developer




[cid:[email protected]]



DriveWorks Ltd
[email protected]<mailto:[email protected]>
http://www.driveworks.co.uk/



• +44 (1925) 75 75 85 Office
• +44 (7818) 03 13 75 Cell





**********************************************************************************************

Important Note

This email (including any attachments) contains information which is 
confidential and may be subject to legal privilege.  If you are not the 
intended recipient you must not use, distribute or copy this email.  If you 
have received this email in error please notify the

sender immediately and delete this email. Any views expressed in this email are 
not necessarily the views of IRESS Market Technology Limited.



It is the duty of the recipient to virus scan and otherwise test the 
information provided before loading onto any computer system.

IRESS Market Technology Limited does not warrant that the information is free 
of a virus or any other defect or error.

**********************************************************************************************

________________________________
List address: [email protected]<mailto:[email protected]>
Subscribe: [email protected]<mailto:[email protected]>
Unsubscribe: [email protected]<mailto:[email protected]>
List FAQ: http://www.codify.com/lists/oztfs
Other lists you might want to join: http://www.codify.com/lists
________________________________
List address: [email protected]<mailto:[email protected]>
Subscribe: [email protected]<mailto:[email protected]>
Unsubscribe: [email protected]<mailto:[email protected]>
List FAQ: http://www.codify.com/lists/oztfs
Other lists you might want to join: http://www.codify.com/lists
--------------------------------------------------------------------------------
List address: [email protected]
Subscribe: [email protected]
Unsubscribe: [email protected]
List FAQ: http://www.codify.com/lists/oztfs
Other lists you might want to join: http://www.codify.com/lists

<<inline: image001.jpg>>

Reply via email to