diff -uNr prcs-1.3.2.old/doc/prcs.info prcs-1.3.2/doc/prcs.info
--- prcs-1.3.2.old/doc/prcs.info	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/doc/prcs.info	2003-09-19 10:38:42.883903840 +0200
@@ -1,4 +1,4 @@
-This is prcs.info, produced by makeinfo version 4.0 from prcs.texi.
+This is prcs.info, produced by makeinfo version 4.3 from prcs.texi.
 
    This file describes PRCS, the Project Revision Control System.
 
@@ -20,8 +20,8 @@
 
 Indirect:
 prcs.info-1: 762
-prcs.info-2: 49834
-prcs.info-3: 98849
+prcs.info-2: 50096
+prcs.info-3: 99757
 
 Tag Table:
 (Indirect)
@@ -45,40 +45,40 @@
 Node: Specifying Projects33568
 Node: Specifying Files and Directories35320
 Node: Options36046
-Node: checkout41976
-Node: populate44185
-Node: depopulate46024
-Node: checkin46754
-Node: diff49834
-Node: merge53293
-Node: rekey60098
-Node: info61074
-Node: changes62786
-Node: admin65046
-Node: config68601
-Node: package and unpackage69112
-Node: execute71039
-Node: delete77372
-Node: Repository78078
-Node: Descriptors79198
-Node: Descriptor entry syntax80316
-Node: Project-Version attribute81666
-Node: Project-Description attribute82273
-Node: Version-Log and New-Version-Log attributes82753
-Node: Checkin-Time and Checkin-Login attributes83605
-Node: Files attribute84217
-Node: Populate-Ignore attribute88036
-Node: Merge-Parents attribute89184
-Node: Parent-Version attribute91175
-Node: Project-Keywords attribute93167
-Node: Keywords94477
-Node: Recognized Keywords96291
-Node: Recursive Keyword Replacement98849
-Node: Formatted Keyword Instances100197
-Node: Keywords and File Identifiers101813
-Node: Subprojects103807
-Node: Importing Project Versions105648
-Node: Environment Variables111865
-Node: Copying115991
+Node: checkout42238
+Node: populate44447
+Node: depopulate46286
+Node: checkin47016
+Node: diff50096
+Node: merge53555
+Node: rekey61006
+Node: info61982
+Node: changes63694
+Node: admin65954
+Node: config69509
+Node: package and unpackage70020
+Node: execute71947
+Node: delete78280
+Node: Repository78986
+Node: Descriptors80106
+Node: Descriptor entry syntax81224
+Node: Project-Version attribute82574
+Node: Project-Description attribute83181
+Node: Version-Log and New-Version-Log attributes83661
+Node: Checkin-Time and Checkin-Login attributes84513
+Node: Files attribute85125
+Node: Populate-Ignore attribute88944
+Node: Merge-Parents attribute90092
+Node: Parent-Version attribute92083
+Node: Project-Keywords attribute94075
+Node: Keywords95385
+Node: Recognized Keywords97199
+Node: Recursive Keyword Replacement99757
+Node: Formatted Keyword Instances101105
+Node: Keywords and File Identifiers102721
+Node: Subprojects104715
+Node: Importing Project Versions106556
+Node: Environment Variables112773
+Node: Copying116899
 
 End Tag Table
diff -uNr prcs-1.3.2.old/doc/prcs.info-1 prcs-1.3.2/doc/prcs.info-1
--- prcs-1.3.2.old/doc/prcs.info-1	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/doc/prcs.info-1	2003-09-19 10:38:42.876904904 +0200
@@ -1,4 +1,4 @@
-This is prcs.info, produced by makeinfo version 4.0 from prcs.texi.
+This is prcs.info, produced by makeinfo version 4.3 from prcs.texi.
 
    This file describes PRCS, the Project Revision Control System.
 
@@ -935,6 +935,12 @@
      Used in `prcs execute' to indicate that the names of the files to
      be processed, or the options attached to them, must match PATTERN.
 
+ - Option: --merge-action=ITEM
+     Used in `prcs merge' to set the default merge action. This is a
+     string composed of characters chosen between `a', `d', `m', `r',
+     `n'. The default value is dependent on the merge discrepancy, see
+     *Note merge::.
+
  - Standard Option: -n
  - Long Form: --no-action
      Indicates that the command is to report what would happen in the
diff -uNr prcs-1.3.2.old/doc/prcs.info-2 prcs-1.3.2/doc/prcs.info-2
--- prcs-1.3.2.old/doc/prcs.info-2	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/doc/prcs.info-2	2003-09-19 10:38:42.877904752 +0200
@@ -1,4 +1,4 @@
-This is prcs.info, produced by makeinfo version 4.0 from prcs.texi.
+This is prcs.info, produced by makeinfo version 4.3 from prcs.texi.
 
    This file describes PRCS, the Project Revision Control System.
 
@@ -91,7 +91,7 @@
 ==========
 
  - Command: prcs merge [option ...] [project [file-or-dir ...]]
-     ADDITIONAL OPTIONS: `-r', `-u', `-s'
+     ADDITIONAL OPTIONS: `-r', `-u', `-s', `--merge-action'
 
      Find differences between working files and those of the selected
      version of PROJECT, and (unless `-n' is specified) try to modify
@@ -163,10 +163,11 @@
           prompting for which you want compared).
 
      The `-f' option causes default actions to each discrepancy (see
-     below).  Otherwise, PRCS will ask the user to specify one of the
-     possible actions.  All of the actions except `n' modify the
-     descriptor, either to remove the file from the Files list, or to
-     modify its internal file identifier to the one from PS.
+     below, unless overwritten by the user supplied `--merge-action'
+     option, see below).  Otherwise, PRCS will ask the user to specify
+     one of the possible actions.  All of the actions except `n' modify
+     the descriptor, either to remove the file from the Files list, or
+     to modify its internal file identifier to the one from PS.
 
      Like `prcs diff', `prcs merge' canonicalizes files to strip
      keyword values before comparing them for discrepancies (*note
@@ -199,6 +200,15 @@
         * PRCS takes no action in other cases, and does not prompt the
           user.
 
+     The default action can be overwritten by using the `--merge-action'
+     option. This option is a string composed of characters chosen
+     between `a', `d', `m', `r' or `n'. The string is examined
+     character by character, and the first one which is a possible merge
+     action is used as the default action. For example, using
+     `--merge-action=ra' will replace the working file with the file
+     from PS (`r' action), unless the working file does not exist and
+     in this case the file from PS will be added to PW (`a' action).
+
      When PRCS overwrites a working file that is a symbolic link, then
      (unless the `:symlink' option is specified for that file), it will
      overwrite the file that the link references, without changing the
diff -uNr prcs-1.3.2.old/doc/prcs.info-3 prcs-1.3.2/doc/prcs.info-3
--- prcs-1.3.2.old/doc/prcs.info-3	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/doc/prcs.info-3	2003-09-19 10:38:42.879904448 +0200
@@ -1,4 +1,4 @@
-This is prcs.info, produced by makeinfo version 4.0 from prcs.texi.
+This is prcs.info, produced by makeinfo version 4.3 from prcs.texi.
 
    This file describes PRCS, the Project Revision Control System.
 
@@ -446,7 +446,6 @@
 **************************
 
                          Version 2, June 1991
-
      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
      675 Mass Ave, Cambridge, MA 02139, USA
      
@@ -505,7 +504,6 @@
 modification follow.
 
     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
   0. This License applies to any program or other work which contains a
      notice placed by the copyright holder saying it may be distributed
      under the terms of this General Public License.  The "Program",
diff -uNr prcs-1.3.2.old/doc/prcs.texi prcs-1.3.2/doc/prcs.texi
--- prcs-1.3.2.old/doc/prcs.texi	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/doc/prcs.texi	2003-09-19 10:34:52.962857152 +0200
@@ -1096,6 +1096,13 @@
 processed, or the options attached to them, must match @var{pattern}.
 @end deffn
 
+@deffn {Option} {-@b{-}merge-action=@var{item}}
+Used in @code{prcs merge} to set the default merge action. This is
+a string composed of characters chosen between @samp{a}, @samp{d}, 
+@samp{m}, @samp{r}, @samp{n}. The default value is dependent on the
+merge discrepancy, see @xref{merge}.
+@end deffn
+
 @deffn {Standard Option} -n
 @deffnx {Long Form} {-@b{-}no-action}
 Indicates that the command is to report what would happen
@@ -1492,7 +1499,7 @@
 @deffn Command {prcs merge} [option @dots{}] [project [file-or-dir @dots{}]]
 
 @noindent
-ADDITIONAL OPTIONS: @samp{-r}, @samp{-u}, @samp{-s}
+ADDITIONAL OPTIONS: @samp{-r}, @samp{-u}, @samp{-s}, @samp{--merge-action}
 
 Find differences between working files and those of the selected
 version of @var{project}, and (unless @samp{-n} is specified) try to
@@ -1569,10 +1576,11 @@
 
 @noindent
 The @samp{-f} option causes default actions to each discrepancy (see
-below).  Otherwise, @sc{prcs} will ask the user to specify one of the
-possible actions.  All of the actions except @kbd{n} modify the
-descriptor, either to remove the file from the Files list, or to modify
-its internal file identifier to the one from @var{PS}.
+below, unless overwritten by the user supplied @samp{--merge-action}
+option, see below).  Otherwise, @sc{prcs} will ask the user to specify
+one of the possible actions.  All of the actions except @kbd{n} modify
+the descriptor, either to remove the file from the Files list, or to 
+modify its internal file identifier to the one from @var{PS}.
 
 Like @code{prcs diff}, @code{prcs merge} canonicalizes files to strip
 keyword values before comparing them for discrepancies (@pxref{diff}).
@@ -1613,6 +1621,16 @@
 @sc{Prcs} takes no action in other cases, and does not prompt the user.
 @end itemize
 
+The default action can be overwritten by using the @samp{--merge-action}
+option. This option is a string composed of characters chosen between
+@kbd{a}, @kbd{d}, @kbd{m}, @kbd{r} or @kbd{n}. The string is examined
+character by character, and the first one which is a possible merge
+action is used as the default action. For example, using
+@samp{--merge-action=ra} will replace the working file with the file
+from @var{PS} (@kbd{r} action), unless the working file does not exist
+and in this case the file from @var{PS} will be added to @var{PW} 
+(@kbd{a} action).
+
 When @sc{prcs} overwrites a working file that is a
 symbolic link, then (unless the @code{:symlink} option is specified for
 that file), it will overwrite the file that the link references, without
diff -uNr prcs-1.3.2.old/src/docs.cc.in prcs-1.3.2/src/docs.cc.in
--- prcs-1.3.2.old/src/docs.cc.in	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/src/docs.cc.in	2003-09-19 10:35:09.608326656 +0200
@@ -17,7 +17,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  * This file was automatically generated by Emacs and the source
- * file /home/jmacd/prcs1/doc/prcs.texi at Thu Nov  1 13:07:39 2001: DO NOT EDIT.
+ * file /home/tiniou/redhat/BUILD/prcs-1.3.2/doc/prcs.texi at Fri Sep 19 10:35:08 2003: DO NOT EDIT.
  */
 #include "prcs.h"
 #include "syscmd.h"
@@ -100,6 +100,12 @@
 "     to be processed, or the options attached to them, must match\n"
 "     PATTERN.\n"
 "\n"
+" - Option: --merge-action=ITEM\n"
+"     Used in `prcs merge' to set the default merge action. This is a\n"
+"     string composed of characters chosen between `a', `d', `m', `r',\n"
+"     `n'. The default value is dependent on the merge discrepancy,\n"
+"     see *Note merge::.\n"
+"\n"
 " - Standard Option: -n\n"
 " - Long Form: --no-action\n"
 "     Indicates that the command is to report what would happen in the\n"
@@ -432,7 +438,7 @@
 
 const char merge_help_string[] = 
 " - Command: prcs merge [option ...] [project [file-or-dir ...]]\n"
-"     ADDITIONAL OPTIONS: `-r', `-u', `-s'\n"
+"     ADDITIONAL OPTIONS: `-r', `-u', `-s', `--merge-action'\n"
 "\n"
 "     Find differences between working files and those of the selected\n"
 "     version of PROJECT, and (unless `-n' is specified) try to modify\n"
@@ -505,10 +511,12 @@
 "          prompting for which you want compared).\n"
 "\n"
 "     The `-f' option causes default actions to each discrepancy (see\n"
-"     below).  Otherwise, PRCS will ask the user to specify one of the\n"
-"     possible actions.  All of the actions except `n' modify the\n"
-"     descriptor, either to remove the file from the Files list, or to\n"
-"     modify its internal file identifier to the one from PS.\n"
+"     below, unless overwritten by the user supplied `--merge-action'\n"
+"     option, see below).  Otherwise, PRCS will ask the user to specify\n"
+"     one of the possible actions.  All of the actions except `n'\n"
+"     modify the descriptor, either to remove the file from the Files\n"
+"     list, or to modify its internal file identifier to the one from\n"
+"     PS.\n"
 "\n"
 "     Like `prcs diff', `prcs merge' canonicalizes files to strip\n"
 "     keyword values before comparing them for discrepancies (*note\n"
@@ -542,6 +550,16 @@
 "        * PRCS takes no action in other cases, and does not prompt\n"
 "          the user.\n"
 "\n"
+"     The default action can be overwritten by using the\n"
+"     `--merge-action' option. This option is a string composed of\n"
+"     characters chosen between `a', `d', `m', `r' or `n'. The string\n"
+"     is examined character by character, and the first one which is a\n"
+"     possible merge action is used as the default action. For\n"
+"     example, using `--merge-action=ra' will replace the working file\n"
+"     with the file from PS (`r' action), unless the working file does\n"
+"     not exist and in this case the file from PS will be added to PW\n"
+"     (`a' action).\n"
+"\n"
 "     When PRCS overwrites a working file that is a symbolic link,\n"
 "     then (unless the `:symlink' option is specified for that file),\n"
 "     it will overwrite the file that the link references, without\n"
diff -uNr prcs-1.3.2.old/src/include/docs.h prcs-1.3.2/src/include/docs.h
--- prcs-1.3.2.old/src/include/docs.h	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/src/include/docs.h	2003-09-19 10:35:10.477194568 +0200
@@ -17,7 +17,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  * This file was automatically generated by Emacs and the source
- * file /home/jmacd/prcs1/doc/prcs.texi at Thu Nov  1 13:07:39 2001: DO NOT EDIT.
+ * file /home/tiniou/redhat/BUILD/prcs-1.3.2/doc/prcs.texi at Fri Sep 19 10:35:08 2003: DO NOT EDIT.
  */
 
 struct EnvName { const char* var; const char* defval; };
diff -uNr prcs-1.3.2.old/src/include/prcs.h prcs-1.3.2/src/include/prcs.h
--- prcs-1.3.2.old/src/include/prcs.h	2003-09-19 10:42:47.074781184 +0200
+++ prcs-1.3.2/src/include/prcs.h	2003-09-19 10:41:23.488488232 +0200
@@ -101,6 +101,7 @@
 extern int option_preorder;                /* --pre */
 extern int option_pipe;                    /* --pipe */
 extern int option_skilled_merge;           /* -s */
+extern int option_merge_action;            /* --merge-action */
 extern int option_plain_format;            /* --plain-format */
 extern int option_sort;                    /* --sort */
 extern int option_nokeywords;              /* --no-keywords */
@@ -115,6 +116,7 @@
 extern const char *option_not_match_file_pattern;
 extern const char *option_sort_type;
 extern const char *option_version_log_string;
+extern const char *option_merge_action_item;
 
 extern const int prcs_version_number[3];
 
diff -uNr prcs-1.3.2.old/src/merge.cc prcs-1.3.2/src/merge.cc
--- prcs-1.3.2.old/src/merge.cc	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/src/merge.cc	2003-09-19 10:14:38.000000000 +0200
@@ -2001,6 +2003,45 @@
 	may_merge = false;
     }
 
+    if (option_merge_action) {
+        int done = 0;
+        for (int i = 0; !done && i < strlen(option_merge_action_item); ++i) {
+	    switch (option_merge_action_item[i]) {
+	    case 'a': 
+	        if (may_add) {
+	            action = (MergeAction)'a'; 
+		    done = 1;
+		}
+		break;
+	    case 'd':
+	        if (working) {
+		    action = (MergeAction)'d';
+		    done = 1;
+		}
+		break;
+	    case 'm':
+	        if (may_merge) {
+		    action = (MergeAction)'m';
+		    done = 1;
+		}
+		break;
+            case 'r':
+	        if (working && selected) {
+		    action = (MergeAction)'r';
+		    done = 1;
+		}
+		break;
+            case 'n':
+	        action = (MergeAction)'n';
+		done = 1;
+		break;
+	    }
+	}
+	if (!done)
+	    prcsinfo << "No '--merge-action' actions are possible, "
+		     << "using the default action" << dotendl;
+    }
+
     static bool bang_flags[14];
 
     if (!option_report_actions && !option_force_resolution && !bang_flags[mergedef->rule_no]) {
diff -uNr prcs-1.3.2.old/src/misc.cc prcs-1.3.2/src/misc.cc
--- prcs-1.3.2.old/src/misc.cc	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/src/misc.cc	2003-09-19 09:43:20.000000000 +0200
@@ -90,6 +90,7 @@
 #endif
 int option_jobs = 1;
 int option_skilled_merge = 0;
+int option_merge_action = 0;
 int option_plain_format = 0;
 int option_sort = 0;
 
@@ -97,6 +98,7 @@
 const char *option_not_match_file_pattern = NULL;
 const char *option_sort_type = NULL;
 const char *option_version_log_string = NULL;
+const char *option_merge_action_item = NULL;
 
 const char* temp_file_1 = NULL;
 const char* temp_file_2 = NULL;
diff -uNr prcs-1.3.2.old/src/prcs.cc prcs-1.3.2/src/prcs.cc
--- prcs-1.3.2.old/src/prcs.cc	2003-09-19 09:41:57.000000000 +0200
+++ prcs-1.3.2/src/prcs.cc	2003-09-19 09:44:03.000000000 +0200
@@ -155,12 +155,14 @@
 #define SORT_CHAR        '\306'
 #define NOKEYW_CHAR      '\307'
 #define VLOG_CHAR        '\310'
+#define MERGE_CHAR       '\311'
 
 #define EXECUTE_STR      "\300\301\302\303\304"
 #define PLAINFORMAT_STR  "\305"
 #define SORT_STR         "\306"
 #define NOKEYW_STR       "\307"
 #define VLOG_STR         "\310"
+#define MERGE_STR        "\311"
 
 static CommandOptionPair const command_options[] = {
     { 'i', "--immediate", &option_immediate_uncompression },
@@ -172,6 +174,7 @@
     { 'P', "--exclude-project-file", &option_exclude_project_file },
     { 'u', "--unlink", &option_unlink },
     { 's', "--skilled-merge", &option_skilled_merge },
+    { MERGE_CHAR, "--merge-action", &option_merge_action },
     { NOKEYW_CHAR, "--no-keywords", &option_nokeywords },
     { VLOG_CHAR, "--version-log", &option_version_log },
     { SORT_CHAR, "--sort", &option_sort },
@@ -213,6 +216,7 @@
   {"revision",                required_argument, 0, 'r'},
   {"unlink",                  no_argument, 0, 'u'},
   {"skilled-merge",           no_argument, 0, 's'},
+  {"merge-action",            required_argument, 0, MERGE_CHAR},
   {"no-keywords",             no_argument, 0, NOKEYW_CHAR},
   {"version-log",             required_argument, 0, VLOG_CHAR},
   {"sort",                    required_argument, 0, SORT_CHAR},
@@ -226,7 +230,7 @@
 /* It looks like a bug in the optstring that EXECUTE_STR members don't
  * have ':' characters, but GNU getopt doesn't seem to mind. */
 static const char prcs_optstring[] = "+vhHLlnqfR:r:NkidzpPruj:s"
-                                     EXECUTE_STR PLAINFORMAT_STR NOKEYW_STR VLOG_STR ":" SORT_STR ":"
+                                     EXECUTE_STR PLAINFORMAT_STR NOKEYW_STR VLOG_STR ":" SORT_STR ":" MERGE_STR ":"
 #ifdef PRCS_DEVEL
 "Dt:"
 #endif
@@ -248,7 +252,7 @@
 
     {"merge", "", "@", "@", NoFlags,
      merge_command, merge_help_string,
-     OneRevisionArg, InsureProjectName, "us", ReallyDiffArgs, -1 },
+     OneRevisionArg, InsureProjectName, "us" MERGE_STR, ReallyDiffArgs, -1 },
 
     {"delete", "", "", "@", NoDefault,
      delete_command, delete_help_string,
@@ -890,6 +894,7 @@
 	case 't': option_tune = atoi (optarg); break;
 #endif
 	case 's': option_skilled_merge = 1; break;
+	case MERGE_CHAR: option_merge_action = 1; option_merge_action_item = optarg; break;
 	case 'r':
 	    option_version_present = 1;
 
