1 martin 1.11 #//%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.12 #//
|
3 martin 1.11 #// Licensed to The Open Group (TOG) under one or more contributor license
4 #// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 #// this work for additional information regarding copyright ownership.
6 #// Each contributor licenses this file to you under the OpenPegasus Open
7 #// Source License; you may not use this file except in compliance with the
8 #// License.
|
9 martin 1.12 #//
|
10 martin 1.11 #// Permission is hereby granted, free of charge, to any person obtaining a
11 #// copy of this software and associated documentation files (the "Software"),
12 #// to deal in the Software without restriction, including without limitation
13 #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 #// and/or sell copies of the Software, and to permit persons to whom the
15 #// Software is furnished to do so, subject to the following conditions:
|
16 martin 1.12 #//
|
17 martin 1.11 #// The above copyright notice and this permission notice shall be included
18 #// in all copies or substantial portions of the Software.
|
19 martin 1.12 #//
|
20 martin 1.11 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.12 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.11 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.12 #//
|
28 martin 1.11 #//////////////////////////////////////////////////////////////////////////
|
29 jim.wunderlich 1.1
30 # ============================================================================
31 # File Specific coding convention
32 # ====================================
33 #
34 # There are to levels of usage statements supported within this Makefile.
|
35 kumpf 1.13 # They are usage and usage_all. These are both implemented by doing a search
|
36 jim.wunderlich 1.8 # across the file for 3 or 2 consecutive # characters.
|
37 jim.wunderlich 1.1 #
|
38 kumpf 1.13 # This means all comments not to be displayed as part of these usage statements
|
39 jim.wunderlich 1.8 # must be made with a single # character.
|
40 jim.wunderlich 1.1 #
41 # ============================================================================
42
43 ### =========================================================================
44 ###
|
45 kumpf 1.13 ### Makefile for managing a Pegasus source task branch
|
46 jim.wunderlich 1.1 ###
47 ### Refer to OpenPegasus PEP108 and PEP 248 for more information about
48 ### OpenPegasus use of task branches and processes within OpenPegasus
49 ###
|
50 kumpf 1.13 ### NOTE:
51 ### This is a Preliminary version for testing.
|
52 jim.wunderlich 1.1 ### The Module is set to junk rather than pegasus
53 ### This has not been tested on Windows
54 ###
55 ## Author: Jim Wunderlich (Jim_Wunderlich@prodigy.net)
56 ##
57 ### ========================================================================
58 ###
59 ### General Guidelines:
|
60 jim.wunderlich 1.8 ### Many of the rules will operate from any directory while others require
|
61 jim.wunderlich 1.1 ### them to be executed at a specific directory. The commands that require a
|
62 kumpf 1.13 ### a specific location will return an error if they are not executed at the
|
63 jim.wunderlich 1.1 ### appropriate directory. Here are specifics:
|
64 kumpf 1.13 ###
|
65 jim.wunderlich 1.1 ### The following are directory position independent.
66 ### branch_create, branch_delete, branch_rename
67 ### branch_lists, usage usage_all
|
68 jim.wunderlich 1.2 ### defaults, branch_diff_to_root, branch_diff_to_trunk
|
69 jim.wunderlich 1.1 ### branch_diff_unmerged_branch,
70 ### branch_diff_unmerged_trunk
|
71 kumpf 1.13 ###
|
72 jim.wunderlich 1.8 ### The following should be executed from above the $(MODULE) directory.
|
73 kumpf 1.13 ### Note that some of these commands instantiate the working copy of the
74 ### branch source tree(They have a * before and after them ).
75 ### * branch_checkout *, branch_status
|
76 jim.wunderlich 1.1 ### * branch_merge_in *, branch_merge_in_commit, branch_merge_in_finish
77 ### * branch_merge_out *, branch_merge_out_commit, branch_merge_out_finish
78 ### * branch_migrate *, branch_migrate_commit, branch_migrate_finish
79 ###
|
80 jim.wunderlich 1.8 ### The following can be executed from anywhere within a working branch
|
81 jim.wunderlich 1.1 ### source tree.
82 ### branch_commit, branch_diff
83 ###
|
84 kumpf 1.13 ### These rules all depend on the user having already logged into CVS with
|
85 jim.wunderlich 1.1 ### appropriate user permissions.
86 ###
|
87 kumpf 1.13 ### These rules do not set or maintain CVS defaults. All CVS defaults should
|
88 jim.wunderlich 1.8 ### come from the user's .cvsrc file. These rules set specific options that
|
89 jim.wunderlich 1.1 ### are required for the operation to be performed.
90 ###
|
91 jim.wunderlich 1.8 ### Branch Management Terminology:
|
92 jim.wunderlich 1.5 ###
|
93 jim.wunderlich 1.8 ### branch merge out - The act of merging changes from the trunk, that have occurred
|
94 jim.wunderlich 1.5 ### since the branch was either created or last merged out
95 ### into the branch.
|
96 jim.wunderlich 1.8 ### branch merge in - The act of merging changes from the branch, that have occurred
|
97 kumpf 1.13 ### since the branch was either created or last merged in,
|
98 jim.wunderlich 1.5 ### into the trunk.
99 ### branch migration - The act of migrating all the changes on the branch, that have
|
100 kumpf 1.13 ### not been merged into the trunk, to another branch rooted at
|
101 jim.wunderlich 1.5 ### the current head of the trunk.
|
102 jim.wunderlich 1.1 ###
103 ## Functions:
104 ## usage
105 ## usage_all
106 ## defaults
107 ##
108 ## branch_list
109 ## branch_status
110 ## branch_create
111 ## branch_rename
112 ## branch_delete
|
113 jim.wunderlich 1.2 ## branch_checkout
114 ## branch_commit
|
115 jim.wunderlich 1.1 ## branch_diff_to_root
|
116 jim.wunderlich 1.8 ## branch_diff_unmerged_branch
|
117 jim.wunderlich 1.1 ## branch_diff_unmerged_trunk
|
118 jim.wunderlich 1.8 ## branch_diff_to_trunk
|
119 jim.wunderlich 1.1 ## branch_merge_in
120 ## branch_merge_out
121 ## branch_migrate
|
122 kumpf 1.13 ##
|
123 jim.wunderlich 1.1 ## ==========================================================================
124 ##
125 ## Tags created/maintained to manage the task branch by the rules within this Makefile
126 ##
|
127 kumpf 1.13 ## The [BRANCH NAME] is expected to be the combination of a PEP number or
128 ## BUG number and functionality. For example PEPXXX_ConfigChanges or
129 ## BUGXXXX_ConfigChanges. The branch name should use Camel Notation and
|
130 jim.wunderlich 1.8 ## should not contain dash (-) characters.
131 ## Note that CVS further restricts this to not use any of the following
132 ## characters enclosed within []: [$ , . : ; @].
|
133 jim.wunderlich 1.1 ##
134 ##
135 ## Branch and branch management tag naming convention
136 ##
|
137 jim.wunderlich 1.8 ## TASK-[BRANCH_NAME]-[ACTION]_[DIRECTION]_[LOCATION]
|
138 jim.wunderlich 1.1 ##
139 ## Where:
140 ## TASK - is constant to associate all tags to a TASK branch
141 ## BRANCH_NAME - is the name of the branch as described above.
142 ## ACTION - is the action or purpose of the tag. It is one of the following:
143 ## root, branch, merged_in, merged_out, merging_in or merging_out.
|
144 jim.wunderlich 1.5 ## DIRECTION - is the direction of the ACTION relative to the LOCATION, either
145 ## to or from.
|
146 jim.wunderlich 1.1 ## LOCATION - is the associated location of the tag. It is either on the trunk
147 ## or branch.
|
148 kumpf 1.13 ## Note that the ACTION root does not have a DIRECTION or LOCATION
|
149 jim.wunderlich 1.1 ## as it is always on the trunk. This also means that task branches
|
150 kumpf 1.13 ## do not support sub branches.
|
151 jim.wunderlich 1.1 ## Note that the ACTION branch does not have a DIRECTION or LOCATION
152 ## as it is the branch.
153 ##
|
154 kumpf 1.13 ## (1) TASK-[BRANCH NAME]-root - tag on trunk representing the
|
155 jim.wunderlich 1.1 ## root of the branch.
156 ##
|
157 jim.wunderlich 1.8 ## (2) TASK-[BRANCH NAME]-branch - head of the branch
|
158 kumpf 1.13 ##
|
159 jim.wunderlich 1.1 ##
|
160 jim.wunderlich 1.8 ## (3) TASK-[BRANCH NAME]-merged_out_from_trunk - The tag on the trunk which
|
161 jim.wunderlich 1.1 ## marks the place where the last merge out operation occurred.
|
162 kumpf 1.13 ## It could also be said that changes on the trunk up
|
163 jim.wunderlich 1.1 ## to this label are contained on the branch.
164 ##
|
165 jim.wunderlich 1.8 ## (4) TASK-[BRANCH NAME]-merged_out_to_branch - The tag on the branch which
|
166 jim.wunderlich 1.1 ## marks the place where the last merge out operation occurred.
167 ##
|
168 jim.wunderlich 1.8 ## (5) TASK-[BRANCH NAME]-merged_in_to_trunk - The tag on the trunk which
|
169 jim.wunderlich 1.1 ## marks the place where the last merge in operation occurred.
170 ##
|
171 jim.wunderlich 1.8 ## (6) TASK-[BRANCH NAME]-merged_in_from_branch - The tag on the branch which
|
172 jim.wunderlich 1.1 ## marks the place where the last merge in operation occurred.
|
173 kumpf 1.13 ## It could also be said that changes on the branch up to
|
174 jim.wunderlich 1.1 ## this label have been merged into the trunk.
175 ##
176 ##
|
177 jim.wunderlich 1.8 ## For Example if the branch name is PEPXX_NewFunc then the following tags
178 ## will be in use:
179 ## TASK-PEPXX_NewFunc-root
180 ## TASK-PEPXX_NewFunc-branch
181 ## TASK-PEPXX_NewFunc-merged_in_to_trunk
182 ## TASK-PEPXX_NewFunc-merged_out_from_trunk
183 ## TASK-PEPXX_NewFunc-merged_in_from_branch
184 ## TASK-PEPXX_NewFunc-merged_out_to_branch
|
185 jim.wunderlich 1.1 ##
186 ##
187 ## Consider the following diagram:
188 ##
|
189 kumpf 1.13 ## NOTE: The numbers in these diagrams refer to the branch maintenance
|
190 jim.wunderlich 1.1 ## symbols above.
191 ##
192 ## After task branch has been created, and changes have been made on both
193 ## the trunk and the branch.
194 ##
195 ## ------------------------------------------------------HEAD
196 ## /
197 ## /
198 ## |
199 ## |
200 ## X--------------------------------------------------------BRANCH (2)
201 ##
202 ## X = 1 = 3 = 4 = 5 = 6
203 ##
204 ##
|
205 kumpf 1.13 ## After task branch has been merged out once
|
206 jim.wunderlich 1.1 ## and more changes have been made on both the trunk and the branch.
207 ##
208 ##
209 ## ----Y--------------------------------------------------HEAD
210 ## / \
211 ## / \
|
212 kumpf 1.13 ## | _\/
|
213 jim.wunderlich 1.1 ## | \
214 ## X-----------Z---------------------------------------------BRANCH (2)
215 ##
|
216 kumpf 1.13 ## X = 1 = 5 = 6
|
217 jim.wunderlich 1.1 ## Y = 3
218 ## Z = 4
219 ##
220 ##
|
221 kumpf 1.13 ## After task branch has been merged out several times, merged in once
|
222 jim.wunderlich 1.1 ## and more changes have been made on both the trunk and the branch.
223 ##
224 ## ---------------------Y------------V---------------------HEAD
225 ## / \ \ \ _/
226 ## / \ \ \ /|
227 ## | _\/ _\/ _\/ /
|
228 kumpf 1.13 ## | \ \ \ /
|
229 jim.wunderlich 1.1 ## X----------------------------Z--U--------------------------BRANCH (2)
230 ##
231 ## X = 1
232 ## Y = 3
233 ## Z = 4
234 ## U = 6
235 ## V = 5
236 ##
|
237 kumpf 1.13 ## After branch has been merged out several times, merged in several times
|
238 jim.wunderlich 1.1 ## and more changes have been made on both the trunk and the branch.
239 ##
240 ## -------------------------------------Y-----------V-------HEAD
241 ## / \ \ \ _/ \ _/
242 ## / \ \ \ /| \ /|
243 ## | _\/ _\/ _\/ / _\/ /
244 ## | \ \ \ / \ /
245 ## X--------------------------------------------Z-U-----------BRANCH (2)
246 ##
247 ## X = 1
248 ## Y = 3
249 ## Z = 4
250 ## U = 6
251 ## V = 5
252 ##
253 ## ==========================================================================
254
255 # ===========================================================================
|
256 jim.wunderlich 1.8 # Area to specify include files
|
257 jim.wunderlich 1.1 # ===========================================================================
258
259
260
261 # ===========================================================================
262 # Area to define commands that are platform dependent.
263 #
264 # If these are already set, by a file previously included, then they will not be
265 # set here. In either case it will be verified that the command is on the search
266 # path.
267 #
268 # ===========================================================================
269 # pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$subst :, ,$(PATH))))
270
271 pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
272
273 MAKE ?= make
274 MAKE_FULL_PATH = $(call pathsearch, $(MAKE))
275
276 CVS ?= cvs
277 CVS_FULL_PATH = $(call pathsearch,$(CVS))
278 jim.wunderlich 1.1
279 ECHO ?= echo
280 ECHO_FULL_PATH = $(call pathsearch,$(ECHO))
281
|
282 jim.wunderlich 1.8 PATCH ?= patch
283 PATCH_FULL_PATH = $(call pathsearch,$(PATCH))
284
285
|
286 a.dunfey 1.10 ifeq ($(OS_TYPE),windows)
|
287 kumpf 1.13 ## windows
|
288 jim.wunderlich 1.8
289 GREP ?= find
290 USAGE_SRCH="###"
291 USAGE_ALL_SRCH="##"
292
|
293 kumpf 1.13 else
|
294 jim.wunderlich 1.8 ## not windows, assume Unix
295
|
296 jim.wunderlich 1.1 GREP ?= grep
|
297 jim.wunderlich 1.8 USAGE_SRCH="\#\#\#"
298 USAGE_ALL_SRCH="\#\#"
299 endif
300
|
301 jim.wunderlich 1.1 GREP_FULL_PATH = $(call pathsearch,$(GREP))
302
303
304
305
306 # ===============================================================================
307 # Shell internal commands
308 # ===============================================================================
309 CD ?= cd
310
311
312 # ===============================================================================
|
313 kumpf 1.13 # Area to set defaults
|
314 jim.wunderlich 1.1 # ===============================================================================
315
316
317 ROOT ?= $(subst \,/,$(PEGASUS_ROOT))
318
319 FILE_PATH = $(ROOT)/mak
320
321 FILE_NAME = TaskMakefile
322
323
324 FILE = $(FILE_PATH)/$(FILE_NAME)
325
|
326 jim.wunderlich 1.6 ###################################
|
327 jim.wunderlich 1.8 # BNAME_INVALID_CHAR
|
328 kumpf 1.13 # BNAME and NEW_BNAME invalid characters
|
329 jim.wunderlich 1.6 DASH = -
|
330 jim.wunderlich 1.1
331 # ===============================================================================
332 # The remaining defaults will be set only if they are not already set.
333 # ===============================================================================
334
|
335 jim.wunderlich 1.9 MODULE_NAME ?= pegasus
336 ## MODULE_NAME ?= junk ## good for testing
|
337 jim.wunderlich 1.1
338 ifeq ($(MODULE_NAME),pegasus)
|
339 jim.wunderlich 1.9 BFILE ?= Makefile
|
340 jim.wunderlich 1.1 else
341 # must be junk module
342 BFILE ?= a.cpp
343 endif
344
345 #
|
346 kumpf 1.13 # diff and rdiff support different options.
347 # diff supports more options than rdiff does.
|
348 jim.wunderlich 1.1 #
349
|
350 kumpf 1.13 DIFF_OPTIONS ?=
|
351 jim.wunderlich 1.1
|
352 kumpf 1.13 RDIFF_OPTIONS ?=
|
353 jim.wunderlich 1.1
|
354 jim.wunderlich 1.6 VALID_TAGS = $(shell $(CVS) rlog $(MODULE_NAME)/$(BFILE) | $(GREP) TASK)
|
355 jim.wunderlich 1.1
356 # ==================================================================================
357 # Rule definitions starts here
358 # ==================================================================================
359
360 .PHONY: FORCE
361
362 # =====================
|
363 kumpf 1.13 # This rule must be the first in the file so if no make command is specified then
|
364 jim.wunderlich 1.1 # the usage information will be displayed.
365 default: usage
366
367 # =====================
|
368 kumpf 1.13 # assure that a minimum of commands exist.
|
369 jim.wunderlich 1.1 #
370 # Without ECHO and CVS essentially nothing can be done.
|
371 jim.wunderlich 1.6 exists_minimum: exists_MAKE exists_CVS exists_ECHO exists_GREP
|
372 jim.wunderlich 1.1
373 # ======================
374 # assure that MAKE exists
375 #
376 exists_MAKE: FORCE
377 ifeq ($(MAKE_FULL_PATH),)
|
378 jim.wunderlich 1.4 $(error ERROR: MAKE command ($(MAKE)) not found in PATH $(PATH))
|
379 jim.wunderlich 1.1 endif
380
381
382 # ======================
383 # assure that CVS exists
384 #
385 exists_CVS: FORCE
386 ifeq ($(CVS_FULL_PATH),)
|
387 jim.wunderlich 1.4 $(error ERROR: CVS command ($(CVS)) not found in PATH $(PATH))
|
388 jim.wunderlich 1.1 endif
389
390
391 # ======================
392 # assure that PATCH exists
393 #
394 exists_PATCH: FORCE
395 ifeq ($(PATCH_FULL_PATH),)
|
396 jim.wunderlich 1.4 $(error ERROR: PATCH command ($(PATCH)) not found in PATH $(PATH))
|
397 jim.wunderlich 1.1 endif
398
399 # ======================
400 # assure that GREP exists
401 #
402 exists_GREP: FORCE
403 ifeq ($(GREP_FULL_PATH),)
|
404 jim.wunderlich 1.4 $(error ERROR: GREP command ($(GREP)) not found in PATH $(PATH))
|
405 jim.wunderlich 1.1 endif
406
407 # ======================
408 # assure that ECHO exists
409 #
|
410 kumpf 1.13 exists_ECHO: FORCE
|
411 jim.wunderlich 1.1 ifeq ($(ECHO_FULL_PATH),)
|
412 jim.wunderlich 1.4 $(error ERROR: ECHO command ($(ECHO)) not found in PATH $(PATH))
|
413 jim.wunderlich 1.1 endif
414
415
416
417 # ======================
|
418 jim.wunderlich 1.6 # assure that BNAME exists (is not null)
|
419 jim.wunderlich 1.1 #
420 exists_BNAME: FORCE
421 ifeq ($(BNAME),)
|
422 jim.wunderlich 1.6 $(error ERROR: BNAME not set, set it on the command line )
423 endif
424
|
425 jim.wunderlich 1.8 # ======================
426 # assure that BNAME does not contain invalid characters
427 #
|
428 jim.wunderlich 1.6 valid_BNAME: exists_BNAME
429 ifneq ($(BNAME) ,$(subst $(DASH), X ,$(BNAME)))
|
430 jim.wunderlich 1.8 @ $(error ERROR: BNAME contains invalid ($(DASH)) characters)
|
431 jim.wunderlich 1.6 endif
432
433
434 # ======================
435 # assure that BNAME exist in cvs
436 #
437 exists_cvs_BNAME: exists_BNAME
|
438 jim.wunderlich 1.8 ifneq (TASK-$(BNAME)-branch, $(findstring TASK-$(BNAME)-branch, $(VALID_TAGS)))
|
439 jim.wunderlich 1.6 @ $(error ERROR: BNAME, $(BNAME), does not exists in cvs module $(MODULE_NAME))
440 endif
441
442
443 # ======================
444 # assure that BNAME does not exist in cvs.
445 #
446 not_exists_cvs_BNAME: exists_BNAME
|
447 jim.wunderlich 1.8 ifeq (TASK-$(BNAME)-branch, $(findstring TASK-$(BNAME)-branch, $(VALID_TAGS)))
|
448 jim.wunderlich 1.6 @ $(error ERROR: BNAME, $(BNAME), exists in cvs module $(MODULE_NAME))
|
449 jim.wunderlich 1.1 endif
450
|
451 jim.wunderlich 1.6
|
452 jim.wunderlich 1.1 # ======================
|
453 jim.wunderlich 1.6 # assure that NEW_BNAME exists (is not null)
|
454 jim.wunderlich 1.1 #
455 exists_NEW_BNAME: FORCE
456 ifeq ($(NEW_BNAME),)
|
457 jim.wunderlich 1.6 @ $(error ERROR: NEW_BNAME not set, set is on the command line.)
458 endif
459
460
461 # ======================
|
462 jim.wunderlich 1.8 # assure that NEW_BNAME does not contain invalid characters
463 #
464 valid_NEW_BNAME: exists_NEW_BNAME
465 ifneq ($(NEW_BNAME) ,$(subst $(DASH), X ,$(NEW_BNAME)))
466 @ $(error ERROR: NEW_BNAME contains invalid ($(DASH)) characters)
467 endif
468
469
470 # ======================
|
471 jim.wunderlich 1.6 # assure that NEW_BNAME exist in cvs
472 #
473 exists_cvs_NEW_BNAME: exists_NEW_BNAME
|
474 jim.wunderlich 1.8 ifneq (TASK-$(NEW_BNAME)-branch, $(findstring TASK-$(NEW_BNAME)-branch, $(VALID_TAGS)))
|
475 jim.wunderlich 1.6 @ $(error ERROR: NEW_BNAME, $(NEW_BNAME), does not exists in cvs module $(MODULE_NAME) )
|
476 jim.wunderlich 1.1 endif
477
|
478 jim.wunderlich 1.6
479 # ======================
480 # assure that NEW_BNAME does not exist in cvs.
481 #
482 not_exists_cvs_NEW_BNAME: exists_NEW_BNAME
|
483 jim.wunderlich 1.8 ifeq (TASK-$(NEW_BNAME)-branch, $(findstring TASK-$(NEW_BNAME)-branch, $(VALID_TAGS)))
|
484 jim.wunderlich 1.6 @ $(error ERROR: NEW_BNAME, $(NEW_BNAME), exists in cvs module $(MODULE_NAME) )
485 endif
|
486 jim.wunderlich 1.1
487
488 ## =====================
489 ##
490 ### Function: usage - displays usage information
491 ## Usage: usage
492 ##
493 usage: exists_GREP
|
494 jim.wunderlich 1.8 @ $(GREP) "$(USAGE_SRCH)" $(FILE)
|
495 jim.wunderlich 1.1
496 ## =====================
497 ##
498 ### Function: usage_all - displays usage information
499 ## Usage: usage_all
500 ##
501 usage_all: exists_GREP
|
502 jim.wunderlich 1.8 @ $(GREP) "$(USAGE_ALL_SRCH)" $(FILE)
|
503 jim.wunderlich 1.1
504 ## =====================
505 ##
506 ### Function: defaults - displays default settings
507 ## Usage: defaults
508 ##
509 defaults: exists_minimum
510 @ $(ECHO) =======================================================================
|
511 kumpf 1.13 @ $(ECHO)
|
512 jim.wunderlich 1.1 @ $(ECHO) "CVS defaults should be set within the .cvsrc file."
513 @ $(ECHO)
514 @ $(ECHO) --------------------------
515 @ $(ECHO) "Default External Commands used within this Makefile"
516 @ $(ECHO)
517 @ $(ECHO) "CVS = $(CVS)"
518 @ $(ECHO) "CVS_FULL_PATH = $(CVS_FULL_PATH)"
519 @ $(ECHO)
520 @ $(ECHO) "PATCH = $(PATCH)"
521 @ $(ECHO) "PATCH_FULL_PATH = $(PATCH_FULL_PATH)"
522 @ $(ECHO)
523 @ $(ECHO) "GREP = $(GREP)"
524 @ $(ECHO) "GREP_FULL_PATH = $(GREP_FULL_PATH)"
525 @ $(ECHO)
526 @ $(ECHO) "ECHO = $(ECHO)"
527 @ $(ECHO) "ECHO_FULL_PATH = $(ECHO_FULL_PATH)"
528 @ $(ECHO)
529 @ $(ECHO) --------------------------
530 @ $(ECHO) "Defaults used within this Makefile."
531 @ $(ECHO)
532 @ $(ECHO) "FILE_PATH = $(FILE_PATH)"
533 jim.wunderlich 1.1 @ $(ECHO) "FILE_NAME = $(FILE_NAME)"
534 @ $(ECHO)
535 @ $(ECHO) --------------------------
536 @ $(ECHO) "Defaults used within this Makefile that can be overridden from the"
537 @ $(ECHO) " command line."
|
538 kumpf 1.13 @ $(ECHO)
|
539 jim.wunderlich 1.1 @ $(ECHO) "MODULE_NAME = $(MODULE_NAME)"
540 @ $(ECHO) "BFILE = $(BFILE)"
541 @ $(ECHO)
542 @ $(ECHO) "DIFF_OPTIONS = $(DIFF_OPTIONS)"
543 @ $(ECHO) "RDIFF_OPTIONS = $(RDIFF_OPTIONS)"
544 @ $(ECHO)
545 @ $(ECHO) "For example"
|
546 jim.wunderlich 1.8 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_checkout BNAME=PEPX_Func MODULE=module"
|
547 jim.wunderlich 1.1 @ $(ECHO)
548 @ $(ECHO) =======================================================================
549
550 ## =====================
551 ##
552 ### Function: branch_list - List branches and other symbolic links
553 ## Usage: branch_list [BFILE=(FILE NAME)]
554 ##
555 ## Note: A log is performed on a chosen file, such as the env_var.status
|
556 kumpf 1.13 ## file since it has been in the trunk for a while, having most
557 ## symbolic variables assigned to it, and very few revisions.
|
558 jim.wunderlich 1.1 ##
559 branch_list: exists_minimum
560 -$(CVS) rlog $(MODULE_NAME)/$(BFILE) | $(GREP) TASK
561
562
563 # =====================
564 ##
565 ### Function: branch_status - Show "branch" status
566 ## Usage: branch_status [BFILE=(FILE NAME)]
567 ##
|
568 kumpf 1.13 ## Note: Must be executed from the directory above $(MODULE_NAME),
569 ## the top of the trunk.
|
570 jim.wunderlich 1.1 ##
571 ## Note: A log is performed on a chosen file, such as the env_var.status
|
572 kumpf 1.13 ## file since it has been in the trunk for a while, having most
573 ## symbolic variables assigned to it, and very few revisions.
|
574 jim.wunderlich 1.1 ##
575 branch_status: exists_minimum
576 $(CD) $(MODULE_NAME)
577 $(CVS) status $(MODULE_NAME)/$(BFILE)
578
579
580
581 ## =====================
582 ##
583 ### Function: branch_create - Creates branch and the tags to manage it.
584 ## Usage: branch_create BNAME=(BRANCH NAME)
585 ##
586 ##
587 ## Process:
588 ## Create "root" tag on main branch
|
589 kumpf 1.13 ## Create "branch" using the "root" tag
590 ## Create a "merged_in_to_trunk" tag for later use in the merge in.
591 ## Create a "merged_out_from_trunk" tag for later use in the merge out.
|
592 jim.wunderlich 1.1 ## Create a "merged_in_from_branch" tag for later use in the merge in.
593 ## Create a "merged_out_to_branch" tag for later use in the merge out.
594 ##
595 ##
|
596 jim.wunderlich 1.6 branch_create: exists_minimum valid_BNAME not_exists_cvs_BNAME
|
597 jim.wunderlich 1.8 $(CVS) rtag -f TASK-$(BNAME)-root $(MODULE_NAME)
598 $(CVS) rtag -b -r TASK-$(BNAME)-root TASK-$(BNAME)-branch $(MODULE_NAME)
599 $(CVS) rtag -r TASK-$(BNAME)-root TASK-$(BNAME)-merged_in_to_trunk $(MODULE_NAME)
600 $(CVS) rtag -r TASK-$(BNAME)-root TASK-$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
601 $(CVS) rtag -r TASK-$(BNAME)-branch TASK-$(BNAME)-merged_in_from_branch $(MODULE_NAME)
602 $(CVS) rtag -r TASK-$(BNAME)-branch TASK-$(BNAME)-merged_out_to_branch $(MODULE_NAME)
|
603 jim.wunderlich 1.1
604
605 ## =====================
606 ##
607 ### Function: branch_rename - Renames existing branch and all the tags to manage it.
608 ## Usage: branch_rename BNAME=(OLD NAME) NEW_BNAME=(NEW NAME)
609 ##
610 ##
611 ## Process:
|
612 jim.wunderlich 1.8 ## Rename TASK-[BNAME]-root to TASK-[NEW_BNAME]-root
613 ## Rename TASK-[BNAME]-branch to TASK-[NEW_BNAME]-branch
614 ## Rename TASK-[BNAME]-merged_in_to_trunk
615 ## to TASK-[NEW_BNAME]-merged_in_to_trunk
616 ## Rename TASK-[BNAME]-merged_out_from_trunk
617 ## to TASK-[NEW_BNAME]-merged_out_from_trunk
618 ## Rename TASK-[BNAME]-merged_in_from_branch
619 ## to TASK-[NEW_BNAME]-merged_in_from_branch
620 ## Rename TASK-[BNAME]-merged_out_to_branch
621 ## to TASK-[NEW_BNAME]-merged_out_to_branch
622 ## Delete Branch TASK-[BNAME]
|
623 kumpf 1.13 ##
|
624 jim.wunderlich 1.6 branch_rename: exists_minimum exists_cvs_BNAME not_exists_cvs_NEW_BNAME valid_NEW_BNAME
|
625 jim.wunderlich 1.4 ifeq ($(BNAME),$(NEW_BNAME))
626 $(error ERROR: BNAME=NEW_BNAME=($(BNAME)), They must be different.)
627 endif
|
628 jim.wunderlich 1.8 $(CVS) rtag -r TASK-$(BNAME)-root TASK-$(NEW_BNAME)-root $(MODULE_NAME)
629 $(CVS) rtag -b -r TASK-$(BNAME)-branch TASK-$(NEW_BNAME)-branch $(MODULE_NAME)
630 $(CVS) rtag -r TASK-$(BNAME)-merged_in_to_trunk TASK-$(NEW_BNAME)-merged_in_to_trunk $(MODULE_NAME)
631 $(CVS) rtag -r TASK-$(BNAME)-merged_out_from_trunk TASK-$(NEW_BNAME)-merged_out_from_trunk $(MODULE_NAME)
632 $(CVS) rtag -r TASK-$(BNAME)-merged_in_from_branch TASK-$(NEW_BNAME)-merged_in_from_branch $(MODULE_NAME)
633 $(CVS) rtag -r TASK-$(BNAME)-merged_out_to_branch TASK-$(NEW_BNAME)-merged_out_to_branch $(MODULE_NAME)
|
634 jim.wunderlich 1.1 $(MAKE) -f $(FILE) branch_delete BNAME=$(BNAME)
635
636
637 ## =====================
638 ##
639 ### Function: branch_delete - Delete the named branch and its management tags.
640 ## Usage: branch_delete BNAME=(BRANCH NAME)
641 ##
642 ## Process:
643 ## Delete "root" tag
|
644 kumpf 1.13 ## Delete the "merged_in_to_trunk" tag.
645 ## Delete the "merged_out_from_trunk" tag.
|
646 jim.wunderlich 1.1 ## Delete the "merged_in_from_branch" tag.
647 ## Delete the "merged_out_to_branch" tag.
|
648 kumpf 1.13 ## Delete the "merging_in_to_trunk" tag.
649 ## Delete the "merging_out_from_trunk" tag.
|
650 jim.wunderlich 1.1 ## Delete the "merging_in_from_branch" tag.
651 ## Delete the "merging_out_to_branch" tag.
652 ## Delete the branch
|
653 kumpf 1.13 ##
|
654 jim.wunderlich 1.1 ##
|
655 jim.wunderlich 1.6 branch_delete: exists_minimum exists_cvs_BNAME
|
656 jim.wunderlich 1.8 $(CVS) rtag -d TASK-$(BNAME)-root $(MODULE_NAME)
657 $(CVS) rtag -d TASK-$(BNAME)-merged_in_to_trunk $(MODULE_NAME)
658 $(CVS) rtag -d TASK-$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
659 $(CVS) rtag -d TASK-$(BNAME)-merged_in_from_branch $(MODULE_NAME)
660 $(CVS) rtag -d TASK-$(BNAME)-merged_out_to_branch $(MODULE_NAME)
661 $(CVS) rtag -d TASK-$(BNAME)-merging_in_to_trunk $(MODULE_NAME)
662 $(CVS) rtag -d TASK-$(BNAME)-merging_out_from_trunk $(MODULE_NAME)
|
663 kumpf 1.13 $(CVS) rtag -d TASK-$(BNAME)-merging_in_from_branch $(MODULE_NAME)
664 $(CVS) rtag -d TASK-$(BNAME)-merging_out_to_branch $(MODULE_NAME)
|
665 jim.wunderlich 1.8 $(CVS) rtag -B -d TASK-$(BNAME)-branch $(MODULE_NAME)
|
666 jim.wunderlich 1.1
667 ## =====================
668 ##
669 ### Function: branch_checkout - checks out the head of the branch trunk
670 ## Aliases: branch_co
671 ## Usage: branch_checkout BNAME=(BRANCH NAME)
|
672 kumpf 1.13 ## Note: Must be executed from the directory where the top pegasus
673 ## directory shall be placed.
|
674 jim.wunderlich 1.1 ##
|
675 jim.wunderlich 1.6 branch_co branch_checkout: exists_minimum exists_cvs_BNAME
|
676 jim.wunderlich 1.8 $(CVS) checkout -r TASK-$(BNAME)-branch $(MODULE_NAME)
|
677 jim.wunderlich 1.1
678
679 ## =====================
680 ##
681 ### Function: branch_commit - checks into the head of the branch trunk
682 ## Aliases: branch_ci
|
683 kumpf 1.13 ## Usage: branch_ci BNAME=(BRANCH NAME)
684 ## Note: Must be executed from within a directory of a working trunk
|
685 jim.wunderlich 1.1 ##
686 branch_ci branch_commit: exists_minimum
687 $(CVS) commit $(MODULE_NAME)
688
689
690 ## =====================
691 ##
692 ### Function: branch_diff - diffs current working tree to the head of the
693 ### branch tree
694 ## Usage: branch_diff [DIFF_OPTIONS=(OPTIONS)]
|
695 kumpf 1.13 ## Note: Must be executed from within a directory of a working tree
|
696 jim.wunderlich 1.1 ##
697 branch_diff: exists_minimum
|
698 kumpf 1.13 $(CVS) diff $(DIFF_OPTIONS) $(MODULE_NAME)
|
699 jim.wunderlich 1.1
700 ## =====================
701 ##
702 ### Function: branch_diff_to_root - diffs branch to its root
703 ## Usage: branch_diff_to_root BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
704 ##
|
705 jim.wunderlich 1.6 branch_diff_to_root: exists_minimum exists_cvs_BNAME
|
706 jim.wunderlich 1.8 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK-$(BNAME)-root -r TASK-$(BNAME)-branch $(MODULE_NAME)
|
707 jim.wunderlich 1.1
708 ## =====================
709 ##
710 ### Function: branch_diff_to_trunk - diffs branch head to the head of the trunk
711 ## Usage: branch_diff_to_trunk BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
712 ##
|
713 jim.wunderlich 1.6 branch_diff_to_trunk: exists_minimum exists_cvs_BNAME
|
714 jim.wunderlich 1.8 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK-$(BNAME)-branch $(MODULE_NAME)
|
715 jim.wunderlich 1.1
716 ## =====================
717 ##
|
718 kumpf 1.13 ### Function: branch_diff_unmerged_branch - shows all changes on the
|
719 jim.wunderlich 1.1 ### branch since the last merge in.
720 ## Usage: branch_diff_unmerged_branch BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
721 ##
|
722 jim.wunderlich 1.6 branch_diff_unmerged_branch: exists_minimum exists_cvs_BNAME
|
723 jim.wunderlich 1.8 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK-$(BNAME)-merged_in_from_branch -r TASK-$(BNAME)-branch $(MODULE_NAME)
|
724 jim.wunderlich 1.1
725
726 ## =====================
727 ##
|
728 kumpf 1.13 ### Function: branch_diff_unmerged_trunk - shows all changes on the
|
729 jim.wunderlich 1.1 ### trunk since the last merge out
730 ## Usage: branch_diff_unmerged_trunk BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
731 ##
|
732 jim.wunderlich 1.6 branch_diff_unmerged_trunk: exists_minimum exists_cvs_BNAME
|
733 jim.wunderlich 1.8 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK-$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
|
734 jim.wunderlich 1.1
735
736 ## =====================
737 ##
|
738 kumpf 1.13 ### Function: branch_merge_in - starts the two part process to merge
739 ### the changes in the branch into the trunk.
|
740 jim.wunderlich 1.1 ## Usage: branch_merge_in BNAME=(BRANCH NAME)
741 ##
|
742 kumpf 1.13 ## Note: Must be executed from the directory where the top pegasus
743 ## directory shall be placed when the checkout is performed
744 ## to instantiate the working copy of the trunk within which
|
745 jim.wunderlich 1.3 ## the merge will be performed.
746 ##
|
747 kumpf 1.13 ## Note: You can start this process over prior to the commit by
|
748 jim.wunderlich 1.3 ## removing the working copy of the tree and starting over with
749 ## the branch_merge_in command.
|
750 jim.wunderlich 1.1 ##
751 ## Process:
752 ##
|
753 kumpf 1.13 ## branch_merge_in BNAME=(BRANCH NAME)
|
754 jim.wunderlich 1.1 ## - Tag main trunk with the merging_in_to_trunk tag.
755 ## - Tag branch with the merging_in_from_branch tag.
756 ## - Checkout the trunk head into a working copy of the trunk.
|
757 kumpf 1.13 ## NOTE: The merging_in tag is not used because that
758 ## would result in a sticky tag that will preclude the
759 ## subsequent commit of the merged files. The
|
760 jim.wunderlich 1.1 ## merging_in tag is created because if any other commits
|
761 kumpf 1.13 ## occur while the merge is in process they will be detected
762 ## and merged on the subsequent merge_in. It is safer to
|
763 jim.wunderlich 1.1 ## do this than to risk the chance of missing a commit.
764 ## - Use update to merge in the branch changes since last the merge_in.
765 ## - Manually resolve any conflicts in the working copy of the trunk.
766 ##
767 ## branch_merge_in_commit BNAME=(BRANCH NAME)
|
768 jim.wunderlich 1.3 ## - Check in merged changes from the working copy of the trunk in.
|
769 kumpf 1.13 ## - executes branch_merge_in_finish
|
770 jim.wunderlich 1.3 ##
771 ## If you chose to do a manual checkin then execute branch_merge_in_finish
|
772 kumpf 1.13 ##
|
773 jim.wunderlich 1.1 ## branch_merge_in_finish BNAME=(BRANCH NAME)
774 ## - Move the merged_in_to_trunk tag to the merging_in_to_trunk tag
|
775 kumpf 1.13 ## - Move the merged_in_from_branch tag to
|
776 jim.wunderlich 1.1 ## the merging_in_from_branch tag
|
777 jim.wunderlich 1.8 ## - Delete the TASK-$(BNAME)-merging_in_to_trunk tag
778 ## - Delete the TASK-$(BNAME)-merging_in_from_branch tag
|
779 kumpf 1.13 ##
|
780 jim.wunderlich 1.1 ##
|
781 jim.wunderlich 1.6 branch_merge_in: exists_minimum exists_cvs_BNAME
|
782 jim.wunderlich 1.8 $(CVS) rtag -F TASK-$(BNAME)-merging_in_to_trunk $(MODULE_NAME)
783 $(CVS) rtag -F -r TASK-$(BNAME)-branch TASK-$(BNAME)-merging_in_from_branch $(MODULE_NAME)
|
784 jim.wunderlich 1.1 $(CVS) checkout -P $(MODULE_NAME)
785 $(CD) $(MODULE_NAME)
|
786 jim.wunderlich 1.8 $(CVS) update -P -d -j TASK-$(BNAME)-merged_in_from_branch -j TASK-$(BNAME)-merging_in_from_branch $(MODULE_NAME)
|
787 jim.wunderlich 1.1 @ $(ECHO)
|
788 kumpf 1.13 @ $(ECHO) Differences from branch now merged into
|
789 jim.wunderlich 1.1 @ $(ECHO) the local working copy of the trunk.
790 @ $(ECHO)
791 @ $(ECHO) Now manually:
792 @ $(ECHO) 1. Resolve any merge conflicts.
|
793 kumpf 1.13 @ $(ECHO) 2. Review differences to assure commit integrity.
|
794 jim.wunderlich 1.4 @ $(ECHO) That is do not check in unintended white space changes,
|
795 jim.wunderlich 1.1 @ $(ECHO) test or debug code.
|
796 kumpf 1.13 @ $(ECHO) 3. Check for added files and directories and do a cvs add
|
797 jim.wunderlich 1.8 @ $(ECHO) command for them.
|
798 kumpf 1.13 @ $(ECHO) 4 Check for removed files and directories and do a
|
799 jim.wunderlich 1.8 @ $(ECHO) cvs remove command for them.
|
800 jim.wunderlich 1.1 @ $(ECHO)
|
801 kumpf 1.13 @ $(ECHO) Then check in the files. Either manually or by using
|
802 jim.wunderlich 1.1 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_in_ci BNAME=$(BNAME)"
803 @ $(ECHO) within the $(MODULE_NAME) directory.
804 @ $(ECHO)
|
805 kumpf 1.13 @ $(ECHO) If you chose to do a manual commit then after the commit
|
806 jim.wunderlich 1.1 @ $(ECHO) is complete then do a:
807 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_in_finish BNAME=$(BNAME)"
808 @ $(ECHO) within the $(MODULE_NAME) directory to reset the appropriate
809 @ $(ECHO) branch management tags.
810 @ $(ECHO)
|
811 jim.wunderlich 1.3 @ $(ECHO) You can start this process over prior to the commit by removing
812 @ $(ECHO) the working copy of the tree and then start over with
|
813 kumpf 1.13 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_in BNAME=$(BNAME)"
|
814 jim.wunderlich 1.3 @ $(ECHO)
|
815 jim.wunderlich 1.1 @ $(ECHO)
816
817
|
818 jim.wunderlich 1.6 branch_merge_in_ci branch_merge_in_commit: exists_minimum exists_cvs_BNAME
|
819 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
820 $(CVS) commit
|
821 kumpf 1.13 @ $(ECHO)
|
822 jim.wunderlich 1.1 @ $(ECHO) Check in of merged files from branch into trunk complete.
823 @ $(ECHO)
824 $(MAKE) -f $(FILE) branch_merge_in_finish BNAME=$(BNAME)
825
826
|
827 jim.wunderlich 1.6 branch_merge_in_finish: exists_minimum exists_cvs_BNAME
|
828 jim.wunderlich 1.8 $(CVS) rtag -F -r TASK-$(BNAME)-merging_in_to_trunk TASK-$(BNAME)-merged_in_to_trunk $(MODULE_NAME)
829 $(CVS) rtag -F -r TASK-$(BNAME)-merging_in_from_branch TASK-$(BNAME)-merged_in_from_branch $(MODULE_NAME)
830 $(CVS) rtag -d TASK-$(BNAME)-merging_in_to_trunk $(MODULE_NAME)
831 $(CVS) rtag -d TASK-$(BNAME)-merging_in_from_branch $(MODULE_NAME)
|
832 kumpf 1.13 @ $(ECHO)
|
833 jim.wunderlich 1.1 @ $(ECHO) Branch Management tags have now been updated to reflect the new branch status.
834 @ $(ECHO)
835
836
837
838 ## =====================
839 ###
|
840 kumpf 1.13 ### Function: branch_merge_out - starts the two part process to merge
841 ### the changes in the trunk into the branch.
|
842 jim.wunderlich 1.1 ## Usage: branch_merge_out BNAME=(BRANCH NAME)
843 ##
|
844 kumpf 1.13 ## Note: Must be executed from the directory where the top pegasus
845 ## directory shall be placed when the checkout is performed
846 ## to instantiate the working copy of the trunk within which
847 ## the merge will be performed
|
848 jim.wunderlich 1.1 ##
|
849 kumpf 1.13 ## Note: You can start this process over prior to the commit by
|
850 jim.wunderlich 1.3 ## removing the working copy of the tree and starting over with
851 ## the branch_merge_out command.
852 ##
|
853 jim.wunderlich 1.1 ## Process:
854 ##
855 ## branch_merge_out BNAME=(BRANCH NAME)
856 ## - Tag main trunk with the merging_out_from_trunk tag.
857 ## - Tag branch with the merging_out_to_branch tag.
858 ## - Checkout the trunk head into a working copy of the trunk.
|
859 kumpf 1.13 ## NOTE: The merging_out tag is not used because that
860 ## would result in a Sticky tag that will preclude the
861 ## subsequent commit of the merged files. The
|
862 jim.wunderlich 1.8 ## merging_out tag is created because if any other commits
|
863 kumpf 1.13 ## occur while the merge is in process they will be detected
864 ## and merged on the subsequent merge_out. It is safer to
|
865 jim.wunderlich 1.1 ## do this than to risk the chance of missing a commit.
866 ## - Use update to merge in the trunk changes since last the merge_out.
|
867 jim.wunderlich 1.3 ## - Manually resolve any conflicts in the working copy of the branch.
|
868 jim.wunderlich 1.1 ##
|
869 kumpf 1.13 ## branch_merge_out_commit BNAME=(BRANCH NAME)
|
870 jim.wunderlich 1.3 ## - Check in merged changes from the working copy of the branch in.
|
871 kumpf 1.13 ## - executes branch_merge_out_finish
|
872 jim.wunderlich 1.3 ##
873 ## If you chose to do a manual checkin then execute branch_merge_out_finish
|
874 jim.wunderlich 1.1 ##
875 ## branch_merge_out_finish BNAME=(BRANCH NAME)
876 ## - Move the merged_out_from_trunk tag to the merging_out_from_trunk tag
877 ## - Move the merged_out_to_branch tag to
878 ## the merging_out_to_branch tag
|
879 jim.wunderlich 1.8 ## - Delete the TASK-$(BNAME)-merging_out_from_trunk tag
880 ## - Delete the TASK-$(BNAME)-merging_out_to_branch tag
|
881 jim.wunderlich 1.1 ##
882 ##
|
883 jim.wunderlich 1.6 branch_merge_out: exists_minimum exists_cvs_BNAME
|
884 jim.wunderlich 1.8 $(CVS) rtag -F TASK-$(BNAME)-merging_out_from_trunk $(MODULE_NAME)
885 $(CVS) rtag -F -r TASK-$(BNAME)-branch TASK-$(BNAME)-merging_out_to_branch $(MODULE_NAME)
886 $(CVS) checkout -P -r TASK-$(BNAME)-branch $(MODULE_NAME)
|
887 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
|
888 jim.wunderlich 1.8 $(CVS) update -P -d -j TASK-$(BNAME)-merged_out_from_trunk -j TASK-$(BNAME)-merging_out_from_trunk
|
889 jim.wunderlich 1.1 @ $(ECHO)
|
890 kumpf 1.13 @ $(ECHO) Differences from trunk now merged into
|
891 jim.wunderlich 1.1 @ $(ECHO) the local working copy of the branch.
892 @ $(ECHO)
893 @ $(ECHO) Now manually:
894 @ $(ECHO) 1. Resolve any merge conflicts.
|
895 kumpf 1.13 @ $(ECHO) 2. Check for added files and directories and do a cvs add
896 @ $(ECHO) command for them.
897 @ $(ECHO) 3 Check for removed files and directories and do a
|
898 jim.wunderlich 1.8 @ $(ECHO) cvs remove command for them.
|
899 jim.wunderlich 1.1 @ $(ECHO)
900 @ $(ECHO) Then check in the files. Either manually or by using
901 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_out_ci BNAME=$(BNAME)"
902 @ $(ECHO) within the $(MODULE_NAME) directory.
903 @ $(ECHO)
|
904 kumpf 1.13 @ $(ECHO) If you chose to do a manual commit then after the commit
|
905 jim.wunderlich 1.1 @ $(ECHO) is complete do a:
906 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_out_finish BNAME=$(BNAME)"
907 @ $(ECHO) within the $(MODULE_NAME) directory to reset the appropriate
908 @ $(ECHO) branch management tags.
909 @ $(ECHO)
|
910 jim.wunderlich 1.3 @ $(ECHO) You can start this process over prior to the commit by removing
911 @ $(ECHO) the working copy of the tree and then start over with
|
912 kumpf 1.13 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_out BNAME=$(BNAME)"
|
913 jim.wunderlich 1.3 @ $(ECHO)
|
914 jim.wunderlich 1.1 @ $(ECHO)
915
|
916 jim.wunderlich 1.6 branch_merge_out_ci branch_merge_out_commit: exists_minimum exists_cvs_BNAME
|
917 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
918 $(CVS) commit
|
919 kumpf 1.13 @ $(ECHO)
|
920 jim.wunderlich 1.1 @ $(ECHO) Check in of merged files from trunk into branch is complete.
921 @ $(ECHO)
922 $(MAKE) -f $(FILE) branch_merge_out_finish BNAME=$(BNAME)
923
|
924 jim.wunderlich 1.6 branch_merge_out_finish: exists_minimum exists_cvs_BNAME
|
925 jim.wunderlich 1.8 $(CVS) rtag -F -r TASK-$(BNAME)-merging_out_from_trunk TASK-$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
926 $(CVS) rtag -F -r TASK-$(BNAME)-merging_out_to_branch TASK-$(BNAME)-merged_out_to_branch $(MODULE_NAME)
927 $(CVS) rtag -d TASK-$(BNAME)-merging_out_from_trunk $(MODULE_NAME)
928 $(CVS) rtag -d TASK-$(BNAME)-merging_out_to_branch $(MODULE_NAME)
|
929 kumpf 1.13 @ $(ECHO)
|
930 jim.wunderlich 1.1 @ $(ECHO) Branch Management tags have now been updated to reflect the new branch status.
931 @ $(ECHO)
932
933
934
935
936 ## =====================
937 ###
|
938 kumpf 1.13 ### Function: branch_migrate - starts the process to migrate the
939 ### branch to the HEAD of the trunk.
940 ###
|
941 jim.wunderlich 1.1 ## Usage: branch_migrate BNAME=(BRANCH NAME)
|
942 kumpf 1.13 ##
943 ## Note: Must be executed from the directory where the top pegasus
944 ## directory shall be placed when the checkout is performed
945 ## to instantiate the working copy of the trunk within which
|
946 jim.wunderlich 1.3 ## the merge will be performed.
947 ##
|
948 kumpf 1.13 ## Note: You can start this process over prior to the commit by
949 ## removing the working copy of the tree and doing a
|
950 jim.wunderlich 1.3 ## "branch_delete (BNAME)_new" and then starting over with
951 ## the branch_migrate command.
|
952 jim.wunderlich 1.1 ##
953 ## Process:
954 ##
955 ## branch_migrate BNAME=(BRANCH NAME)
956 ## - get diffs of unmerged_changes_branch into a local patch_diff file.
957 ## - create the new branch to migrate to.
958 ## - Checkout the new branch
959 ## - Apply the patch_diff file to the working trunk
960 ## - Manually resolve any merge conflicts in the working trunk.
961 ##
962 ## branch_migrate_commit BNAME=(BRANCH NAME)
963 ## - Commit the changes into the new branch
964 ##
965 ## EITHER
966 ## branch_migrate_finish BNAME=(BRANCH NAME)
967 ## - Remove the old branch.
968 ## - Rename all branch tags
969 ##
970 ## OR
971 ## branch_rename BNAME=(BRANCH_NAME)_new NEW_BNAME=(BRANCH NAME)_X
972 ##
973 jim.wunderlich 1.1 ##
|
974 jim.wunderlich 1.6 branch_migrate: exists_minimum exists_cvs_BNAME
|
975 jim.wunderlich 1.1 $(MAKE) -f $(FILE) branch_diff_unmerged_branch BNAME=$(BNAME) 1>branch_migrate_diffs
976 $(MAKE) -f $(FILE) branch_create BNAME=$(BNAME)_new
|
977 jim.wunderlich 1.8 $(CVS) checkout -P -r TASK-$(BNAME)_new-branch $(MODULE_NAME)
|
978 jim.wunderlich 1.1 $(PATCH) -b -p0 --global-reject-file=global-reject-patch-file < branch_migrate_diffs
979 @ $(ECHO)
980 @ $(ECHO)
|
981 kumpf 1.13 @ $(ECHO) Differences from previous branch are now merged into
|
982 jim.wunderlich 1.1 @ $(ECHO) the local working copy of the new branch.
983 @ $(ECHO)
984 @ $(ECHO) Now manually:
|
985 kumpf 1.13 @ $(ECHO) 1. Resolve any merge conflicts.
|
986 jim.wunderlich 1.1 @ $(ECHO) Check the global-patch-reject file in this directory.
987 @ $(ECHO) If it does not exist then there were no patch errors.
|
988 kumpf 1.13 @ $(ECHO) 2. Check for added files and directories and do a cvs add
989 @ $(ECHO) command for them prior to the commit..
|
990 jim.wunderlich 1.1 @ $(ECHO)
|
991 kumpf 1.13 @ $(ECHO) Then check in the files. Either manually or by using
|
992 jim.wunderlich 1.1 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate_ci BNAME=$(BNAME)"
993 @ $(ECHO) within the $(MODULE_NAME) directory.
994 @ $(ECHO)
|
995 jim.wunderlich 1.3 @ $(ECHO) After the commit is complete do either one of the following
|
996 jim.wunderlich 1.8 @ $(ECHO) dependent on whether you want the previous branch deleted or saved.
|
997 jim.wunderlich 1.3 @ $(ECHO)
998 @ $(ECHO) This will delete the previous branch and move the branch management.
999 @ $(ECHO)
1000 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate_finish BNAME=$(BNAME)"
|
1001 jim.wunderlich 1.1 @ $(ECHO) within the $(MODULE_NAME) directory to reset the appropriate
1002 @ $(ECHO) branch management tags.
1003 @ $(ECHO)
|
1004 jim.wunderlich 1.3 @ $(ECHO) This will rename the branch just migrated to keeping the old branch.
1005 @ $(ECHO)
|
1006 kumpf 1.13 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_rename BNAME=$(BNAME)_new NEW_BNAME=$(BNAME)_(VER)"
1007 @ $(ECHO)
|
1008 jim.wunderlich 1.3 @ $(ECHO) You can start this process over prior to the commit by removing
1009 @ $(ECHO) the working copy of the tree and then deleting the new branch this
1010 @ $(ECHO) process created with
|
1011 jim.wunderlich 1.1 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_delete BNAME=$(BNAME)_new"
|
1012 jim.wunderlich 1.3 @ $(ECHO) and then start over with
|
1013 kumpf 1.13 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate BNAME=$(BNAME)"
1014 @ $(ECHO)
|
1015 jim.wunderlich 1.1 @ $(ECHO)
1016
|
1017 jim.wunderlich 1.6 branch_migrate_ci branch_migrate_commit: exists_minimum exists_cvs_BNAME
|
1018 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
1019 $(CVS) commit
|
1020 kumpf 1.13 @ $(ECHO)
1021 @ $(ECHO) Check in of merged files from previous branch into
|
1022 jim.wunderlich 1.1 @ $(ECHO) new branch is complete.
1023 @ $(ECHO)
1024 $(CD) ..
1025 $(MAKE) -f $(FILE) branch_diff_to_root BNAME=$(BNAME) > diff_to_root_$(BNAME)
1026 $(MAKE) -f $(FILE) branch_diff_to_root BNAME=$(BNAME)_new > diff_to_root_$(BNAME)_new
|
1027 kumpf 1.13 @ $(ECHO) Do a
|
1028 jim.wunderlich 1.1 @ $(ECHO) " diff diff_to_root_$(BNAME) diff_to_root_$(BNAME)_new"
|
1029 jim.wunderlich 1.8 @ $(ECHO) to verify TASK-$(BNAME)_new has all the changes.
|
1030 jim.wunderlich 1.1 @ $(ECHO)
1031 @ $(ECHO) Then do a
1032 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate_finish BNAME=$(BNAME)"
|
1033 jim.wunderlich 1.8 @ $(ECHO) which will remove TASK-$(BNAME), the old branch, and then rename TASK-$(BNAME)_new to TASK-$(BNAME)
|
1034 kumpf 1.13 @ $(ECHO) Alternatively you can keep the old branch around for a while and just
1035 @ $(ECHO) rename the new branch by doing a
|
1036 jim.wunderlich 1.1 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_rename BNAME=$(BNAME)_new NEW_BNAME=($BNAME)_X"
1037 @ $(ECHO) where X is something you chose to identify the new branch.
1038
1039
|
1040 jim.wunderlich 1.6 branch_migrate_finish: exists_minimum exists_cvs_BNAME
|
1041 jim.wunderlich 1.1 $(MAKE) -f $(FILE) branch_delete BNAME=$(BNAME)
1042 $(MAKE) -f $(FILE) branch_rename BNAME=$(BNAME)_new NEW_BNAME=$(BNAME)
|
1043 kumpf 1.13 @ $(ECHO)
|
1044 jim.wunderlich 1.1 @ $(ECHO) Branch Management tags have now been updated to reflect the new branch status.
1045 @ $(ECHO)
1046
1047
1048
1049
|