MCWorkingCopy.st
changeset 917 e92da349ec56
parent 881 d78a5da73018
child 1156 b6ca954ebfc9
equal deleted inserted replaced
916:2d95d9b3fbe9 917:e92da349ec56
    54 
    54 
    55 updateInstVars
    55 updateInstVars
    56 	self allInstances do: [:ea | ea updateInstVars]
    56 	self allInstances do: [:ea | ea updateInstVars]
    57 ! !
    57 ! !
    58 
    58 
       
    59 
    59 !MCWorkingCopy methodsFor:'accessing'!
    60 !MCWorkingCopy methodsFor:'accessing'!
    60 
    61 
    61 ancestors
    62 ancestors
    62 	^ ancestry ancestors
    63 	^ ancestry ancestors
    63 !
    64 !
   112 	ancestry addAncestor: aVersion info.
   113 	ancestry addAncestor: aVersion info.
   113 	self changed.
   114 	self changed.
   114 !
   115 !
   115 
   116 
   116 backportChangesTo: aVersionInfo
   117 backportChangesTo: aVersionInfo
   117 	| baseVersion fullPatch currentVersionInfo currentVersion newSnapshot newAncestry |
   118         | baseVersion fullPatch currentVersionInfo currentVersion newSnapshot newAncestry |
   118 	currentVersionInfo := self currentVersionInfo.
   119         currentVersionInfo := self currentVersionInfo.
   119 	baseVersion := self repositoryGroup versionWithInfo: aVersionInfo.
   120         baseVersion := self repositoryGroup versionWithInfo: aVersionInfo.
   120 	currentVersion := self repositoryGroup versionWithInfo: currentVersionInfo.
   121         currentVersion := self repositoryGroup versionWithInfo: currentVersionInfo.
   121 	fullPatch := currentVersion snapshot patchRelativeToBase: baseVersion snapshot.
   122         fullPatch := currentVersion snapshot patchRelativeToBase: baseVersion snapshot.
   122 	(MCChangeSelectionRequest new
   123         (MCChangeSelectionRequest new
   123 		patch: fullPatch;
   124                 patch: fullPatch;
   124 		label: 'Changes to Backport';
   125                 label: 'Changes to Backport';
   125 		signal ) ifNotNilDo:
   126                 raiseSignal "signal" ) ifNotNilDo:
   126 		[:partialPatch |
   127                 [:partialPatch |
   127 		newSnapshot := MCPatcher apply: partialPatch to: baseVersion snapshot.
   128                 newSnapshot := MCPatcher apply: partialPatch to: baseVersion snapshot.
   128 		newAncestry := MCWorkingAncestry new
   129                 newAncestry := MCWorkingAncestry new
   129 							addAncestor: aVersionInfo;
   130                                                         addAncestor: aVersionInfo;
   130 							addStepChild: currentVersionInfo;
   131                                                         addStepChild: currentVersionInfo;
   131 							yourself.
   132                                                         yourself.
   132 		MCPackageLoader updatePackage: package withSnapshot: newSnapshot.
   133                 MCPackageLoader updatePackage: package withSnapshot: newSnapshot.
   133 		ancestry := newAncestry.
   134                 ancestry := newAncestry.
   134 		self modified: false; modified: true]
   135                 self modified: false; modified: true]
   135 !
   136 !
   136 
   137 
   137 changesRelativeToRepository: aRepository
   138 changesRelativeToRepository: aRepository
   138 	| ancestorVersion ancestorSnapshot |
   139 	| ancestorVersion ancestorSnapshot |
   139 	ancestorVersion _ aRepository closestAncestorVersionFor: ancestry ifNone: [].
   140 	ancestorVersion _ aRepository closestAncestorVersionFor: ancestry ifNone: [].
   313 ! !
   314 ! !
   314 
   315 
   315 !MCWorkingCopy class methodsFor:'documentation'!
   316 !MCWorkingCopy class methodsFor:'documentation'!
   316 
   317 
   317 version
   318 version
   318     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingCopy.st,v 1.6 2013-06-06 19:15:53 vrany Exp $'
   319     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingCopy.st,v 1.7 2014-02-25 13:39:03 cg Exp $'
   319 !
   320 !
   320 
   321 
   321 version_CVS
   322 version_CVS
   322     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingCopy.st,v 1.6 2013-06-06 19:15:53 vrany Exp $'
   323     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCWorkingCopy.st,v 1.7 2014-02-25 13:39:03 cg Exp $'
   323 ! !
   324 ! !
   324 
   325 
   325 
   326 
   326 MCWorkingCopy initialize!
   327 MCWorkingCopy initialize!