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