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