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 # across the file for 3 or 2 consecutive # charecters.
39 #
40 # This means all comments not to be dispalyed as part of these usae statements
41 # must be made with a single # charecter.
42 #
43 jim.wunderlich 1.1 # ============================================================================
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 ### Mnay of the rules will operate from any directory while others require
63 ### them to be executed at a specific directory. The commands that require a
64 jim.wunderlich 1.1 ### 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 ### The following should be excuted from above the $(MODULE) directory.
75 ### 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 ### The following can be executed from anyware within a working branch
83 ### source tree.
84 ### branch_commit, branch_diff
85 ###
86 ### These rules all depend on the user having already logged into cvs with
87 ### appropriate user permissions.
88 ###
89 ### These rules do not set or maintain cvs defaults. All cvs defaults should
90 ### come from the users's .cvsrc file. These rules set specific options that
91 ### are required for the operation to be performed.
92 jim.wunderlich 1.1 ###
|
93 jim.wunderlich 1.5 ### Branch Management Terminolgy:
94 ###
95 ### branch merge out - The act of merging changes from the trunk, that have occured
96 ### since the branch was either created or last merged out
97 ### into the branch.
98 ### branch merge in - The act of merging changes from the branch, that have occured
99 ### 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 ## bracnh_diff_unmerged_branch
119 ## branch_diff_unmerged_trunk
|
120 jim.wunderlich 1.3 ## branch_diff_to_trund
|
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 ## BUG number and functionality. For example PEPXXXConfigChanges or
131 ## BUGXXXXConfigChanges. The branch name should use Camel Notation and
132 ## should not contain underline (_) or dash (-) charecters.
133 ## Note that CVS further restircts this to not use any of the following
134 ## charecters enclosed within []: [$ , . : ; @].
|
135 jim.wunderlich 1.1 ##
136 ##
137 ## Branch and branch management tag naming convention
138 ##
|
139 jim.wunderlich 1.4 ## 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.4 ## (1) TASK_[BRANCH NAME]-root - tag on trunk representing the
|
157 jim.wunderlich 1.1 ## root of the branch.
158 ##
|
159 jim.wunderlich 1.4 ## (2) TASK_[BRANCH NAME]-branch - head of the branch
|
160 jim.wunderlich 1.1 ##
161 ##
|
162 jim.wunderlich 1.4 ## (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.4 ## (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.4 ## (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.4 ## (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.7 ## For Example if the branch name is PEPXXNewFunc then the following tags will
|
180 jim.wunderlich 1.1 ## be in use:
|
181 jim.wunderlich 1.7 ## TASK_PEPXXNewFunc-root
182 ## TASK_PEPXXNewFunc-branch
183 ## TASK_PEPXXNewFunc-merged_in_to_trunk
184 ## TASK_PEPXXNewFunc-merged_out_from_trunk
185 ## TASK_PEPXXNewFunc-merged_in_from_branch
186 ## TASK_PEPXXNewFunc-merged_out_to_branch
|
187 jim.wunderlich 1.1 ##
188 ##
189 ## Consider the following diagram:
190 ##
191 ## NOTE: The numbers in these diagrams refer to the branch maintainence
192 ## 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 jim.wunderlich 1.1 ## and more changes have been made on both the trunk and the branch.
209 ##
210 ##
211 ## ----Y--------------------------------------------------HEAD
212 ## / \
213 ## / \
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 jim.wunderlich 1.1 ## | _\/ _\/ _\/ /
230 ## | \ \ \ /
231 ## X----------------------------Z--U--------------------------BRANCH (2)
232 ##
233 ## X = 1
234 ## 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 jim.wunderlich 1.1 ## Y = 3
251 ## Z = 4
252 ## U = 6
253 ## V = 5
254 ##
255 ## ==========================================================================
256
257 # ===========================================================================
258 # Area to specifiy include files
259 # ===========================================================================
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 jim.wunderlich 1.1 # 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
281 ECHO ?= echo
282 ECHO_FULL_PATH = $(call pathsearch,$(ECHO))
283
284 GREP ?= grep
285 GREP_FULL_PATH = $(call pathsearch,$(GREP))
286
287
288 PATCH ?= patch
289 PATCH_FULL_PATH = $(call pathsearch,$(PATCH))
290
291
292 jim.wunderlich 1.1 # ===============================================================================
293 # Shell internal commands
294 # ===============================================================================
295 CD ?= cd
296
297
298 # ===============================================================================
299 # Area to set defaults
300 # ===============================================================================
301
302
303 ROOT ?= $(subst \,/,$(PEGASUS_ROOT))
304
305 FILE_PATH = $(ROOT)/mak
306
307 FILE_NAME = TaskMakefile
308
309
310 FILE = $(FILE_PATH)/$(FILE_NAME)
311
|
312 jim.wunderlich 1.6 ###################################
313 # BNAME_INVAID_CHAR
314 # BNAME and NEW_BNAME invalid charecters
315 DASH = -
316 UNDERLINE = _
|
317 jim.wunderlich 1.1
318 # ===============================================================================
319 # The remaining defaults will be set only if they are not already set.
320 # ===============================================================================
321
322 # MODULE_NAME ?= pegasus
323 MODULE_NAME ?= junk
324
325 ifeq ($(MODULE_NAME),pegasus)
326 BFILE ?= env_var.status
327 else
328 # must be junk module
329 BFILE ?= a.cpp
330 endif
331
332 #
333 # diff and rdiff support different options.
334 # diff supports more options than rdiff does.
335 #
336
337 DIFF_OPTIONS ?=
338 jim.wunderlich 1.1
339 RDIFF_OPTIONS ?=
340
|
341 jim.wunderlich 1.6 VALID_TAGS = $(shell $(CVS) rlog $(MODULE_NAME)/$(BFILE) | $(GREP) TASK)
|
342 jim.wunderlich 1.1
343 # ==================================================================================
344 # Rule definitions starts here
345 # ==================================================================================
346
347 .PHONY: FORCE
348
349 # =====================
350 # This rule must be the first in the file so if no make command is specified then
351 # the usage information will be displayed.
352 default: usage
353
354 # =====================
355 # assure that a minimum of commands exist.
356 #
357 # Without ECHO and CVS essentially nothing can be done.
|
358 jim.wunderlich 1.6 exists_minimum: exists_MAKE exists_CVS exists_ECHO exists_GREP
|
359 jim.wunderlich 1.1
360 # ======================
361 # assure that MAKE exists
362 #
363 exists_MAKE: FORCE
364 ifeq ($(MAKE_FULL_PATH),)
|
365 jim.wunderlich 1.4 $(error ERROR: MAKE command ($(MAKE)) not found in PATH $(PATH))
|
366 jim.wunderlich 1.1 endif
367
368
369 # ======================
370 # assure that CVS exists
371 #
372 exists_CVS: FORCE
373 ifeq ($(CVS_FULL_PATH),)
|
374 jim.wunderlich 1.4 $(error ERROR: CVS command ($(CVS)) not found in PATH $(PATH))
|
375 jim.wunderlich 1.1 endif
376
377
378 # ======================
379 # assure that PATCH exists
380 #
381 exists_PATCH: FORCE
382 ifeq ($(PATCH_FULL_PATH),)
|
383 jim.wunderlich 1.4 $(error ERROR: PATCH command ($(PATCH)) not found in PATH $(PATH))
|
384 jim.wunderlich 1.1 endif
385
386 # ======================
387 # assure that GREP exists
388 #
389 exists_GREP: FORCE
390 ifeq ($(GREP_FULL_PATH),)
|
391 jim.wunderlich 1.4 $(error ERROR: GREP command ($(GREP)) not found in PATH $(PATH))
|
392 jim.wunderlich 1.1 endif
393
394 # ======================
395 # assure that ECHO exists
396 #
397 exists_ECHO: FORCE
398 ifeq ($(ECHO_FULL_PATH),)
|
399 jim.wunderlich 1.4 $(error ERROR: ECHO command ($(ECHO)) not found in PATH $(PATH))
|
400 jim.wunderlich 1.1 endif
401
402
403
404 # ======================
|
405 jim.wunderlich 1.6 # assure that BNAME exists (is not null)
|
406 jim.wunderlich 1.1 #
407 exists_BNAME: FORCE
408 ifeq ($(BNAME),)
|
409 jim.wunderlich 1.6 $(error ERROR: BNAME not set, set it on the command line )
410 endif
411
412
413 valid_BNAME: exists_BNAME
414 ifneq ($(BNAME) ,$(subst $(DASH), X ,$(BNAME)))
415 @ $(error ERROR: BNAME contains invalid ($(DASH)) charecters)
416 endif
417 ifneq ($(BNAME) ,$(subst $(UNDERLINE), X ,$(BNAME)))
418 @ $(error ERROR: BNAME contains invalid ($(UNDERLINE)) charecters)
419 endif
420
421
422
423 valid_NEW_BNAME: exists_NEW_BNAME
424 ifneq ($(NEW_BNAME) ,$(subst $(DASH), X ,$(NEW_BNAME)))
425 @ $(error ERROR: NEW_BNAME contains invalid ($(DASH)) charecters)
426 endif
427 ifneq ($(NEW_BNAME) ,$(subst $(UNDERLINE), X ,$(NEW_BNAME)))
428 @ $(error ERROR: NEW_BNAME contains invalid ($(UNDERLINE)) charecters)
429 endif
430 jim.wunderlich 1.6
431
432 # ======================
433 # assure that BNAME exist in cvs
434 #
435 exists_cvs_BNAME: exists_BNAME
436 ifneq (TASK_$(BNAME)-branch, $(findstring TASK_$(BNAME)-branch, $(VALID_TAGS)))
437 @ $(error ERROR: BNAME, $(BNAME), does not exists in cvs module $(MODULE_NAME))
438 endif
439
440
441
442
443 # ======================
444 # assure that BNAME does not exist in cvs.
445 #
446 not_exists_cvs_BNAME: exists_BNAME
447 ifeq (TASK_$(BNAME)-branch, $(findstring TASK_$(BNAME)-branch, $(VALID_TAGS)))
448 @ $(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 # assure that NEW_BNAME exist in cvs
463 #
464 exists_cvs_NEW_BNAME: exists_NEW_BNAME
465 ifneq (TASK_$(NEW_BNAME)-branch, $(findstring TASK_$(NEW_BNAME)-branch, $(VALID_TAGS)))
466 @ $(error ERROR: NEW_BNAME, $(NEW_BNAME), does not exists in cvs module $(MODULE_NAME) )
|
467 jim.wunderlich 1.1 endif
468
|
469 jim.wunderlich 1.6
470
471
472 # ======================
473 # assure that NEW_BNAME does not exist in cvs.
474 #
475 not_exists_cvs_NEW_BNAME: exists_NEW_BNAME
476 ifeq (TASK_$(NEW_BNAME)-branch, $(findstring TASK_$(NEW_BNAME)-branch, $(VALID_TAGS)))
477 @ $(error ERROR: NEW_BNAME, $(NEW_BNAME), exists in cvs module $(MODULE_NAME) )
478 endif
|
479 jim.wunderlich 1.1
480
481
482 ## =====================
483 ##
484 ### Function: usage - displays usage information
485 ## Usage: usage
486 ##
487 usage: exists_GREP
488 @ $(GREP) "\#\#\#" $(FILE)
489
490 ## =====================
491 ##
492 ### Function: usage_all - displays usage information
493 ## Usage: usage_all
494 ##
495 usage_all: exists_GREP
496 @ $(GREP) "\#\#" $(FILE)
497
498 ## =====================
499 ##
500 jim.wunderlich 1.1 ### Function: defaults - displays default settings
501 ## Usage: defaults
502 ##
503 defaults: exists_minimum
504 @ $(ECHO) =======================================================================
505 @ $(ECHO)
506 @ $(ECHO) "CVS defaults should be set within the .cvsrc file."
507 @ $(ECHO)
508 @ $(ECHO) --------------------------
509 @ $(ECHO) "Default External Commands used within this Makefile"
510 @ $(ECHO)
511 @ $(ECHO) "CVS = $(CVS)"
512 @ $(ECHO) "CVS_FULL_PATH = $(CVS_FULL_PATH)"
513 @ $(ECHO)
514 @ $(ECHO) "PATCH = $(PATCH)"
515 @ $(ECHO) "PATCH_FULL_PATH = $(PATCH_FULL_PATH)"
516 @ $(ECHO)
517 @ $(ECHO) "GREP = $(GREP)"
518 @ $(ECHO) "GREP_FULL_PATH = $(GREP_FULL_PATH)"
519 @ $(ECHO)
520 @ $(ECHO) "ECHO = $(ECHO)"
521 jim.wunderlich 1.1 @ $(ECHO) "ECHO_FULL_PATH = $(ECHO_FULL_PATH)"
522 @ $(ECHO)
523 @ $(ECHO) --------------------------
524 @ $(ECHO) "Defaults used within this Makefile."
525 @ $(ECHO)
526 @ $(ECHO) "FILE_PATH = $(FILE_PATH)"
527 @ $(ECHO) "FILE_NAME = $(FILE_NAME)"
528 @ $(ECHO)
529 @ $(ECHO) --------------------------
530 @ $(ECHO) "Defaults used within this Makefile that can be overridden from the"
531 @ $(ECHO) " command line."
532 @ $(ECHO)
533 @ $(ECHO) "MODULE_NAME = $(MODULE_NAME)"
534 @ $(ECHO) "BFILE = $(BFILE)"
535 @ $(ECHO)
536 @ $(ECHO) "DIFF_OPTIONS = $(DIFF_OPTIONS)"
537 @ $(ECHO) "RDIFF_OPTIONS = $(RDIFF_OPTIONS)"
538 @ $(ECHO)
539 @ $(ECHO) "For example"
|
540 jim.wunderlich 1.6 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_checkout BNAME=PEPXFunc MODULE=module"
|
541 jim.wunderlich 1.1 @ $(ECHO)
542 @ $(ECHO) =======================================================================
543
544 ## =====================
545 ##
546 ### Function: branch_list - List branches and other symbolic links
547 ## Usage: branch_list [BFILE=(FILE NAME)]
548 ##
549 ## Note: A log is performed on a chosen file, such as the env_var.status
550 ## file since it has been in the trunk for a while, having most
551 ## symbolic variables assigned to it, and very few revisions.
552 ##
553 branch_list: exists_minimum
554 -$(CVS) rlog $(MODULE_NAME)/$(BFILE) | $(GREP) TASK
555
556
557 # =====================
558 ##
559 ### Function: branch_status - Show "branch" status
560 ## Usage: branch_status [BFILE=(FILE NAME)]
561 ##
562 jim.wunderlich 1.1 ## Note: Must be executed from the directory above $(MODULE_NAME),
563 ## the top of the trunk.
564 ##
565 ## Note: A log is performed on a chosen file, such as the env_var.status
566 ## file since it has been in the trunk for a while, having most
567 ## symbolic variables assigned to it, and very few revisions.
568 ##
569 branch_status: exists_minimum
570 $(CD) $(MODULE_NAME)
571 $(CVS) status $(MODULE_NAME)/$(BFILE)
572
573
574
575 ## =====================
576 ##
577 ### Function: branch_create - Creates branch and the tags to manage it.
578 ## Usage: branch_create BNAME=(BRANCH NAME)
579 ##
580 ##
581 ## Process:
582 ## Create "root" tag on main branch
583 jim.wunderlich 1.1 ## Create "branch" using the "root" tag
584 ## Create a "merged_in_to_trunk" tag for later use in the merge in.
585 ## Create a "merged_out_from_trunk" tag for later use in the merge out.
586 ## Create a "merged_in_from_branch" tag for later use in the merge in.
587 ## Create a "merged_out_to_branch" tag for later use in the merge out.
588 ##
589 ##
|
590 jim.wunderlich 1.6 branch_create: exists_minimum valid_BNAME not_exists_cvs_BNAME
|
591 jim.wunderlich 1.4 $(CVS) rtag -f TASK_$(BNAME)-root $(MODULE_NAME)
592 $(CVS) rtag -b -r TASK_$(BNAME)-root TASK_$(BNAME)-branch $(MODULE_NAME)
593 $(CVS) rtag -r TASK_$(BNAME)-root TASK_$(BNAME)-merged_in_to_trunk $(MODULE_NAME)
594 $(CVS) rtag -r TASK_$(BNAME)-root TASK_$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
595 $(CVS) rtag -r TASK_$(BNAME)-branch TASK_$(BNAME)-merged_in_from_branch $(MODULE_NAME)
596 $(CVS) rtag -r TASK_$(BNAME)-branch TASK_$(BNAME)-merged_out_to_branch $(MODULE_NAME)
|
597 jim.wunderlich 1.1
598
599 ## =====================
600 ##
601 ### Function: branch_rename - Renames existing branch and all the tags to manage it.
602 ## Usage: branch_rename BNAME=(OLD NAME) NEW_BNAME=(NEW NAME)
603 ##
604 ##
605 ## Process:
|
606 jim.wunderlich 1.4 ## Rename TASK_[BNAME]-root to TASK_[NEW_BNAME]-root
607 ## Rename TASK_[BNAME]-branch to TASK_[NEW_BNAME]-branch
608 ## Rename TASK_[BNAME]-merged_in_to_trunk
609 ## to TASK_[NEW_BNAME]-merged_in_to_trunk
610 ## Rename TASK_[BNAME]-merged_out_from_trunk
611 ## to TASK_[NEW_BNAME]-merged_out_from_trunk
612 ## Rename TASK_[BNAME]-merged_in_from_branch
613 ## to TASK_[NEW_BNAME]-merged_in_from_branch
614 ## Rename TASK_[BNAME]-merged_out_to_branch
615 ## to TASK_[NEW_BNAME]-merged_out_to_branch
616 ## Delete Branch TASK_[BNAME]
|
617 jim.wunderlich 1.1 ##
|
618 jim.wunderlich 1.6 branch_rename: exists_minimum exists_cvs_BNAME not_exists_cvs_NEW_BNAME valid_NEW_BNAME
|
619 jim.wunderlich 1.4 ifeq ($(BNAME),$(NEW_BNAME))
620 $(error ERROR: BNAME=NEW_BNAME=($(BNAME)), They must be different.)
621 endif
622 $(CVS) rtag -r TASK_$(BNAME)-root TASK_$(NEW_BNAME)-root $(MODULE_NAME)
623 $(CVS) rtag -b -r TASK_$(BNAME)-branch TASK_$(NEW_BNAME)-branch $(MODULE_NAME)
624 $(CVS) rtag -r TASK_$(BNAME)-merged_in_to_trunk TASK_$(NEW_BNAME)-merged_in_to_trunk $(MODULE_NAME)
625 $(CVS) rtag -r TASK_$(BNAME)-merged_out_from_trunk TASK_$(NEW_BNAME)-merged_out_from_trunk $(MODULE_NAME)
626 $(CVS) rtag -r TASK_$(BNAME)-merged_in_from_branch TASK_$(NEW_BNAME)-merged_in_from_branch $(MODULE_NAME)
627 $(CVS) rtag -r TASK_$(BNAME)-merged_out_to_branch TASK_$(NEW_BNAME)-merged_out_to_branch $(MODULE_NAME)
|
628 jim.wunderlich 1.1 $(MAKE) -f $(FILE) branch_delete BNAME=$(BNAME)
629
630
631 ## =====================
632 ##
633 ### Function: branch_delete - Delete the named branch and its management tags.
634 ## Usage: branch_delete BNAME=(BRANCH NAME)
635 ##
636 ## Process:
637 ## Delete "root" tag
638 ## Delete the "merged_in_to_trunk" tag.
639 ## Delete the "merged_out_from_trunk" tag.
640 ## Delete the "merged_in_from_branch" tag.
641 ## Delete the "merged_out_to_branch" tag.
642 ## Delete the "merging_in_to_trunk" tag.
643 ## Delete the "merging_out_from_trunk" tag.
644 ## Delete the "merging_in_from_branch" tag.
645 ## Delete the "merging_out_to_branch" tag.
646 ## Delete the branch
647 ##
648 ##
|
649 jim.wunderlich 1.6 branch_delete: exists_minimum exists_cvs_BNAME
|
650 jim.wunderlich 1.4 $(CVS) rtag -d TASK_$(BNAME)-root $(MODULE_NAME)
651 $(CVS) rtag -d TASK_$(BNAME)-merged_in_to_trunk $(MODULE_NAME)
652 $(CVS) rtag -d TASK_$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
653 $(CVS) rtag -d TASK_$(BNAME)-merged_in_from_branch $(MODULE_NAME)
654 $(CVS) rtag -d TASK_$(BNAME)-merged_out_to_branch $(MODULE_NAME)
655 $(CVS) rtag -d TASK_$(BNAME)-merging_in_to_trunk $(MODULE_NAME)
656 $(CVS) rtag -d TASK_$(BNAME)-merging_out_from_trunk $(MODULE_NAME)
657 $(CVS) rtag -d TASK_$(BNAME)-merging_in_from_branch $(MODULE_NAME)
658 $(CVS) rtag -d TASK_$(BNAME)-merging_out_to_branch $(MODULE_NAME)
659 $(CVS) rtag -B -d TASK_$(BNAME)-branch $(MODULE_NAME)
|
660 jim.wunderlich 1.1
661 ## =====================
662 ##
663 ### Function: branch_checkout - checks out the head of the branch trunk
664 ## Aliases: branch_co
665 ## Usage: branch_checkout BNAME=(BRANCH NAME)
666 ## Note: Must be executed from the directory where the top pegasus
667 ## directory shall be placed.
668 ##
|
669 jim.wunderlich 1.6 branch_co branch_checkout: exists_minimum exists_cvs_BNAME
|
670 jim.wunderlich 1.4 $(CVS) checkout -r TASK_$(BNAME)-branch $(MODULE_NAME)
|
671 jim.wunderlich 1.1
672
673 ## =====================
674 ##
675 ### Function: branch_commit - checks into the head of the branch trunk
676 ## Aliases: branch_ci
677 ## Usage: branch_ci BNAME=(BRANCH NAME)
678 ## Note: Must be executed from within a directory of a working trunk
679 ##
680 branch_ci branch_commit: exists_minimum
681 $(CVS) commit $(MODULE_NAME)
682
683
684 ## =====================
685 ##
686 ### Function: branch_diff - diffs current working tree to the head of the
687 ### branch tree
688 ## Usage: branch_diff [DIFF_OPTIONS=(OPTIONS)]
689 ## Note: Must be executed from within a directory of a working tree
690 ##
691 branch_diff: exists_minimum
692 jim.wunderlich 1.1 $(CVS) diff $(DIFF_OPTIONS) $(MODULE_NAME)
693
694 ## =====================
695 ##
696 ### Function: branch_diff_to_root - diffs branch to its root
697 ## Usage: branch_diff_to_root BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
698 ##
|
699 jim.wunderlich 1.6 branch_diff_to_root: exists_minimum exists_cvs_BNAME
|
700 jim.wunderlich 1.4 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK_$(BNAME)-root -r TASK_$(BNAME)-branch $(MODULE_NAME)
|
701 jim.wunderlich 1.1
702 ## =====================
703 ##
704 ### Function: branch_diff_to_trunk - diffs branch head to the head of the trunk
705 ## Usage: branch_diff_to_trunk BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
706 ##
|
707 jim.wunderlich 1.6 branch_diff_to_trunk: exists_minimum exists_cvs_BNAME
|
708 jim.wunderlich 1.4 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK_$(BNAME)-branch $(MODULE_NAME)
|
709 jim.wunderlich 1.1
710 ## =====================
711 ##
712 ### Function: branch_diff_unmerged_branch - shows all changes on the
713 ### branch since the last merge in.
714 ## Usage: branch_diff_unmerged_branch BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
715 ##
|
716 jim.wunderlich 1.6 branch_diff_unmerged_branch: exists_minimum exists_cvs_BNAME
|
717 jim.wunderlich 1.4 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK_$(BNAME)-merged_in_from_branch -r TASK_$(BNAME)-branch $(MODULE_NAME)
|
718 jim.wunderlich 1.1
719
720 ## =====================
721 ##
722 ### Function: branch_diff_unmerged_trunk - shows all changes on the
723 ### trunk since the last merge out
724 ## Usage: branch_diff_unmerged_trunk BNAME=(BRANCH NAME) [RDIFF_OPTIONS=(OPTIONS)]
725 ##
|
726 jim.wunderlich 1.6 branch_diff_unmerged_trunk: exists_minimum exists_cvs_BNAME
|
727 jim.wunderlich 1.4 $(CVS) rdiff $(RDIFF_OPTIONS) -r TASK_$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
|
728 jim.wunderlich 1.1
729
730 ## =====================
731 ##
732 ### Function: branch_merge_in - starts the two part process to merge
733 ### the changes in the branch into the trunk.
734 ## Usage: branch_merge_in BNAME=(BRANCH NAME)
735 ##
736 ## Note: Must be executed from the directory where the top pegasus
737 ## directory shall be placed when the checkout is performed
738 ## to instantiate the working copy of the trunk within which
|
739 jim.wunderlich 1.3 ## the merge will be performed.
740 ##
741 ## Note: You can start this process over prior to the commit by
742 ## removing the working copy of the tree and starting over with
743 ## the branch_merge_in command.
|
744 jim.wunderlich 1.1 ##
745 ## Process:
746 ##
747 ## branch_merge_in BNAME=(BRANCH NAME)
748 ## - Tag main trunk with the merging_in_to_trunk tag.
749 ## - Tag branch with the merging_in_from_branch tag.
750 ## - Checkout the trunk head into a working copy of the trunk.
751 ## NOTE: The merging_in tag is not used because that
752 ## would result in a sticky tag that will preclude the
753 ## subsequent commit of the merged files. The
754 ## merging_in tag is created because if any other commits
755 ## occur while the merge is in process they will be detected
756 ## and merged on the subsequent merge_in. It is safer to
757 ## do this than to risk the chance of missing a commit.
758 ## - Use update to merge in the branch changes since last the merge_in.
759 ## - Manually resolve any conflicts in the working copy of the trunk.
760 ##
761 ## branch_merge_in_commit BNAME=(BRANCH NAME)
|
762 jim.wunderlich 1.3 ## - Check in merged changes from the working copy of the trunk in.
763 ## - executes branch_merge_in_finish
764 ##
765 ## If you chose to do a manual checkin then execute branch_merge_in_finish
|
766 jim.wunderlich 1.1 ##
767 ## branch_merge_in_finish BNAME=(BRANCH NAME)
768 ## - Move the merged_in_to_trunk tag to the merging_in_to_trunk tag
769 ## - Move the merged_in_from_branch tag to
770 ## the merging_in_from_branch tag
|
771 jim.wunderlich 1.4 ## - Delete the TASK_$(BNAME)-merging_in_to_trunk tag
772 ## - Delete the TASK_$(BNAME)-merging_in_from_branch tag
|
773 jim.wunderlich 1.1 ##
774 ##
|
775 jim.wunderlich 1.6 branch_merge_in: exists_minimum exists_cvs_BNAME
|
776 jim.wunderlich 1.4 $(CVS) rtag -F TASK_$(BNAME)-merging_in_to_trunk $(MODULE_NAME)
777 $(CVS) rtag -F -r TASK_$(BNAME)-branch TASK_$(BNAME)-merging_in_from_branch $(MODULE_NAME)
|
778 jim.wunderlich 1.1 $(CVS) checkout -P $(MODULE_NAME)
779 $(CD) $(MODULE_NAME)
|
780 jim.wunderlich 1.4 $(CVS) update -P -d -j TASK_$(BNAME)-merged_in_from_branch -j TASK_$(BNAME)-merging_in_from_branch $(MODULE_NAME)
|
781 jim.wunderlich 1.1 @ $(ECHO)
782 @ $(ECHO) Differences from branch now merged into
783 @ $(ECHO) the local working copy of the trunk.
784 @ $(ECHO)
785 @ $(ECHO) Now manually:
786 @ $(ECHO) 1. Resolve any merge conflicts.
787 @ $(ECHO) 2. Review differences to assure commit integrity.
|
788 jim.wunderlich 1.4 @ $(ECHO) That is do not check in unintended white space changes,
|
789 jim.wunderlich 1.1 @ $(ECHO) test or debug code.
790 @ $(ECHO) 3. Check for aded files and directories and do a cvs add
791 @ $(ECHO) command for them.
792 @ $(ECHO)
793 @ $(ECHO) Then check in the files. Either manually or by using
794 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_in_ci BNAME=$(BNAME)"
795 @ $(ECHO) within the $(MODULE_NAME) directory.
796 @ $(ECHO)
797 @ $(ECHO) If you chose to do a manual commit then after the commit
798 @ $(ECHO) is complete then do a:
799 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_in_finish BNAME=$(BNAME)"
800 @ $(ECHO) within the $(MODULE_NAME) directory to reset the appropriate
801 @ $(ECHO) branch management tags.
802 @ $(ECHO)
|
803 jim.wunderlich 1.3 @ $(ECHO) You can start this process over prior to the commit by removing
804 @ $(ECHO) the working copy of the tree and then start over with
805 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_in BNAME=$(BNAME)"
806 @ $(ECHO)
|
807 jim.wunderlich 1.1 @ $(ECHO)
808
809
|
810 jim.wunderlich 1.6 branch_merge_in_ci branch_merge_in_commit: exists_minimum exists_cvs_BNAME
|
811 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
812 $(CVS) commit
813 @ $(ECHO)
814 @ $(ECHO) Check in of merged files from branch into trunk complete.
815 @ $(ECHO)
816 $(MAKE) -f $(FILE) branch_merge_in_finish BNAME=$(BNAME)
817
818
|
819 jim.wunderlich 1.6 branch_merge_in_finish: exists_minimum exists_cvs_BNAME
|
820 jim.wunderlich 1.4 $(CVS) rtag -F -r TASK_$(BNAME)-merging_in_to_trunk TASK_$(BNAME)-merged_in_to_trunk $(MODULE_NAME)
821 $(CVS) rtag -F -r TASK_$(BNAME)-merging_in_from_branch TASK_$(BNAME)-merged_in_from_branch $(MODULE_NAME)
822 $(CVS) rtag -d TASK_$(BNAME)-merging_in_to_trunk $(MODULE_NAME)
823 $(CVS) rtag -d TASK_$(BNAME)-merging_in_from_branch $(MODULE_NAME)
|
824 jim.wunderlich 1.1 @ $(ECHO)
825 @ $(ECHO) Branch Management tags have now been updated to reflect the new branch status.
826 @ $(ECHO)
827
828
829
830 ## =====================
831 ###
832 ### Function: branch_merge_out - starts the two part process to merge
833 ### the changes in the trunk into the branch.
834 ## Usage: branch_merge_out BNAME=(BRANCH NAME)
835 ##
836 ## Note: Must be executed from the directory where the top pegasus
837 ## directory shall be placed when the checkout is performed
838 ## to instantiate the working copy of the trunk within which
839 ## the merge will be performed
840 ##
|
841 jim.wunderlich 1.3 ## Note: You can start this process over prior to the commit by
842 ## removing the working copy of the tree and starting over with
843 ## the branch_merge_out command.
844 ##
|
845 jim.wunderlich 1.1 ## Process:
846 ##
847 ## branch_merge_out BNAME=(BRANCH NAME)
848 ## - Tag main trunk with the merging_out_from_trunk tag.
849 ## - Tag branch with the merging_out_to_branch tag.
850 ## - Checkout the trunk head into a working copy of the trunk.
851 ## NOTE: The merging_out tag is not used because that
852 ## would result in a Sticky tag that will preclude the
853 ## subsequent commit of the merged files. The
854 ## mergeing_out tag is created because if any other commits
855 ## occur while the merge is in process they will be detected
856 ## and merged on the subsequent merge_out. It is safer to
857 ## do this than to risk the chance of missing a commit.
858 ## - Use update to merge in the trunk changes since last the merge_out.
|
859 jim.wunderlich 1.3 ## - Manually resolve any conflicts in the working copy of the branch.
|
860 jim.wunderlich 1.1 ##
861 ## branch_merge_out_commit BNAME=(BRANCH NAME)
|
862 jim.wunderlich 1.3 ## - Check in merged changes from the working copy of the branch in.
863 ## - executes branch_merge_out_finish
864 ##
865 ## If you chose to do a manual checkin then execute branch_merge_out_finish
|
866 jim.wunderlich 1.1 ##
867 ## branch_merge_out_finish BNAME=(BRANCH NAME)
868 ## - Move the merged_out_from_trunk tag to the merging_out_from_trunk tag
869 ## - Move the merged_out_to_branch tag to
870 ## the merging_out_to_branch tag
|
871 jim.wunderlich 1.4 ## - Delete the TASK_$(BNAME)-merging_out_from_trunk tag
872 ## - Delete the TASK_$(BNAME)-merging_out_to_branch tag
|
873 jim.wunderlich 1.1 ##
874 ##
|
875 jim.wunderlich 1.6 branch_merge_out: exists_minimum exists_cvs_BNAME
|
876 jim.wunderlich 1.4 $(CVS) rtag -F TASK_$(BNAME)-merging_out_from_trunk $(MODULE_NAME)
877 $(CVS) rtag -F -r TASK_$(BNAME)-branch TASK_$(BNAME)-merging_out_to_branch $(MODULE_NAME)
878 $(CVS) checkout -P -r TASK_$(BNAME)-branch $(MODULE_NAME)
|
879 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
|
880 jim.wunderlich 1.4 $(CVS) update -d -j TASK_$(BNAME)-merged_out_from_trunk -j TASK_$(BNAME)-merging_out_from_trunk
|
881 jim.wunderlich 1.1 @ $(ECHO)
882 @ $(ECHO) Differences from trunk now merged into
883 @ $(ECHO) the local working copy of the branch.
884 @ $(ECHO)
885 @ $(ECHO) Now manually:
886 @ $(ECHO) 1. Resolve any merge conflicts.
887 @ $(ECHO) 2. Check for added files and directories and do a cvs add
888 @ $(ECHO) command for them.
889 @ $(ECHO)
890 @ $(ECHO) Then check in the files. Either manually or by using
891 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_out_ci BNAME=$(BNAME)"
892 @ $(ECHO) within the $(MODULE_NAME) directory.
893 @ $(ECHO)
894 @ $(ECHO) If you chose to do a manual commit then after the commit
895 @ $(ECHO) is complete do a:
896 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_out_finish BNAME=$(BNAME)"
897 @ $(ECHO) within the $(MODULE_NAME) directory to reset the appropriate
898 @ $(ECHO) branch management tags.
899 @ $(ECHO)
|
900 jim.wunderlich 1.3 @ $(ECHO) You can start this process over prior to the commit by removing
901 @ $(ECHO) the working copy of the tree and then start over with
902 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_merge_out BNAME=$(BNAME)"
903 @ $(ECHO)
|
904 jim.wunderlich 1.1 @ $(ECHO)
905
|
906 jim.wunderlich 1.6 branch_merge_out_ci branch_merge_out_commit: exists_minimum exists_cvs_BNAME
|
907 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
908 $(CVS) commit
909 @ $(ECHO)
910 @ $(ECHO) Check in of merged files from trunk into branch is complete.
911 @ $(ECHO)
912 $(MAKE) -f $(FILE) branch_merge_out_finish BNAME=$(BNAME)
913
|
914 jim.wunderlich 1.6 branch_merge_out_finish: exists_minimum exists_cvs_BNAME
|
915 jim.wunderlich 1.4 $(CVS) rtag -F -r TASK_$(BNAME)-merging_out_from_trunk TASK_$(BNAME)-merged_out_from_trunk $(MODULE_NAME)
916 $(CVS) rtag -F -r TASK_$(BNAME)-merging_out_to_branch TASK_$(BNAME)-merged_out_to_branch $(MODULE_NAME)
917 $(CVS) rtag -d TASK_$(BNAME)-merging_out_from_trunk $(MODULE_NAME)
918 $(CVS) rtag -d TASK_$(BNAME)-merging_out_to_branch $(MODULE_NAME)
|
919 jim.wunderlich 1.1 @ $(ECHO)
920 @ $(ECHO) Branch Management tags have now been updated to reflect the new branch status.
921 @ $(ECHO)
922
923
924
925
926 ## =====================
927 ###
928 ### Function: branch_migrate - starts the process to migrate the
929 ### branch to the HEAD of the trunk.
930 ###
931 ## Usage: branch_migrate BNAME=(BRANCH NAME)
932 ##
933 ## Note: Must be executed from the directory where the top pegasus
934 ## directory shall be placed when the checkout is performed
935 ## to instantiate the working copy of the trunk within which
|
936 jim.wunderlich 1.3 ## the merge will be performed.
937 ##
938 ## Note: You can start this process over prior to the commit by
939 ## removing the working copy of the tree and doing a
940 ## "branch_delete (BNAME)_new" and then starting over with
941 ## the branch_migrate command.
|
942 jim.wunderlich 1.1 ##
943 ## Process:
944 ##
945 ## branch_migrate BNAME=(BRANCH NAME)
946 ## - get diffs of unmerged_changes_branch into a local patch_diff file.
947 ## - create the new branch to migrate to.
948 ## - Checkout the new branch
949 ## - Apply the patch_diff file to the working trunk
950 ## - Manually resolve any merge conflicts in the working trunk.
951 ##
952 ## branch_migrate_commit BNAME=(BRANCH NAME)
953 ## - Commit the changes into the new branch
954 ##
955 ## EITHER
956 ## branch_migrate_finish BNAME=(BRANCH NAME)
957 ## - Remove the old branch.
958 ## - Rename all branch tags
959 ##
960 ## OR
961 ## branch_rename BNAME=(BRANCH_NAME)_new NEW_BNAME=(BRANCH NAME)_X
962 ##
963 jim.wunderlich 1.1 ##
|
964 jim.wunderlich 1.6 branch_migrate: exists_minimum exists_cvs_BNAME
|
965 jim.wunderlich 1.1 $(MAKE) -f $(FILE) branch_diff_unmerged_branch BNAME=$(BNAME) 1>branch_migrate_diffs
966 $(MAKE) -f $(FILE) branch_create BNAME=$(BNAME)_new
|
967 jim.wunderlich 1.4 $(CVS) checkout -P -r TASK_$(BNAME)_new-branch $(MODULE_NAME)
|
968 jim.wunderlich 1.1 $(PATCH) -b -p0 --global-reject-file=global-reject-patch-file < branch_migrate_diffs
969 @ $(ECHO)
970 @ $(ECHO)
971 @ $(ECHO) Differences from previous branch are now merged into
972 @ $(ECHO) the local working copy of the new branch.
973 @ $(ECHO)
974 @ $(ECHO) Now manually:
975 @ $(ECHO) 1. Resolve any merge conflicts.
976 @ $(ECHO) Check the global-patch-reject file in this directory.
977 @ $(ECHO) If it does not exist then there were no patch errors.
978 @ $(ECHO) 2. Check for added files and directories and do a cvs add
979 @ $(ECHO) command for them prior to the commit..
980 @ $(ECHO)
981 @ $(ECHO) Then check in the files. Either manually or by using
982 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate_ci BNAME=$(BNAME)"
983 @ $(ECHO) within the $(MODULE_NAME) directory.
984 @ $(ECHO)
|
985 jim.wunderlich 1.3 @ $(ECHO) After the commit is complete do either one of the following
986 @ $(ECHO) dependent on wheter you want the previous branch deleted or saved.
987 @ $(ECHO)
988 @ $(ECHO) This will delete the previous branch and move the branch management.
989 @ $(ECHO)
990 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate_finish BNAME=$(BNAME)"
|
991 jim.wunderlich 1.1 @ $(ECHO) within the $(MODULE_NAME) directory to reset the appropriate
992 @ $(ECHO) branch management tags.
993 @ $(ECHO)
|
994 jim.wunderlich 1.3 @ $(ECHO) This will rename the branch just migrated to keeping the old branch.
995 @ $(ECHO)
996 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_rename BNAME=$(BNAME)_new NEW_BNAME=$(BNAME)_(VER)"
997 @ $(ECHO)
998 @ $(ECHO) You can start this process over prior to the commit by removing
999 @ $(ECHO) the working copy of the tree and then deleting the new branch this
1000 @ $(ECHO) process created with
|
1001 jim.wunderlich 1.1 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_delete BNAME=$(BNAME)_new"
|
1002 jim.wunderlich 1.3 @ $(ECHO) and then start over with
1003 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate BNAME=$(BNAME)"
1004 @ $(ECHO)
|
1005 jim.wunderlich 1.1 @ $(ECHO)
1006
|
1007 jim.wunderlich 1.6 branch_migrate_ci branch_migrate_commit: exists_minimum exists_cvs_BNAME
|
1008 jim.wunderlich 1.1 $(CD) $(MODULE_NAME)
1009 $(CVS) commit
1010 @ $(ECHO)
1011 @ $(ECHO) Check in of merged files from previous branch into
1012 @ $(ECHO) new branch is complete.
1013 @ $(ECHO)
1014 $(CD) ..
1015 $(MAKE) -f $(FILE) branch_diff_to_root BNAME=$(BNAME) > diff_to_root_$(BNAME)
1016 $(MAKE) -f $(FILE) branch_diff_to_root BNAME=$(BNAME)_new > diff_to_root_$(BNAME)_new
1017 @ $(ECHO) Do a
1018 @ $(ECHO) " diff diff_to_root_$(BNAME) diff_to_root_$(BNAME)_new"
|
1019 jim.wunderlich 1.4 @ $(ECHO) to verify TASK_$(BNAME)_new has all the changes.
|
1020 jim.wunderlich 1.1 @ $(ECHO)
1021 @ $(ECHO) Then do a
1022 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_migrate_finish BNAME=$(BNAME)"
|
1023 jim.wunderlich 1.4 @ $(ECHO) which will remove TASK_$(BNAME), the old branch, and then rename TASK_$(BNAME)_new to TASK_$(BNAME)
|
1024 jim.wunderlich 1.1 @ $(ECHO) Alternatively you can keep the old branch around for a while and just
1025 @ $(ECHO) rename the new branch by doing a
1026 @ $(ECHO) " $(MAKE) -f $(FILE_NAME) branch_rename BNAME=$(BNAME)_new NEW_BNAME=($BNAME)_X"
1027 @ $(ECHO) where X is something you chose to identify the new branch.
1028
1029
|
1030 jim.wunderlich 1.6 branch_migrate_finish: exists_minimum exists_cvs_BNAME
|
1031 jim.wunderlich 1.1 $(MAKE) -f $(FILE) branch_delete BNAME=$(BNAME)
1032 $(MAKE) -f $(FILE) branch_rename BNAME=$(BNAME)_new NEW_BNAME=$(BNAME)
1033 @ $(ECHO)
1034 @ $(ECHO) Branch Management tags have now been updated to reflect the new branch status.
1035 @ $(ECHO)
1036
1037
1038
1039
|