Julian Foad <julianfoad@btopenworld.com> wrote on 02/27/2006 08:59:35 PM:
> Paul Burba wrote:
> > [[[
> > OS400/EBCDIC Port:
>
> Were you meaning to put something like "Disable unsupported features."
after
> the colon?
Yes, I fixed that.
> > This is one of several patches to allow Subversion to run on IBM's
> > OS400 V5R4. It disables subcommands and CL options not currently
> > supported on OS400.
> >
> > * subversion/svn/main.c
> > (svn_cl__options): Disable --encoding, --editor-cmd, --diff-cmd,
> > --diff3-cmd, and --extensions options.
> > (svn_cl__cmd_table): Tweak svn ci help message. Disable svn
> > propedit.
> > ]]]
>
>
> > - { "commit", svn_cl__commit, {"ci"}, N_
> > - ("Send changes from your working copy to the repository.\n"
> > + { "commit", svn_cl__commit, {"ci"},
> > +#ifndef AS400
> > + N_("Send changes from your working copy to the repository.\n"
> > "usage: commit [PATH...]\n"
> > "\n"
> > " A log message must be provided, but it can be empty. If
> it is not\n"
> > " given by a --message or --file option, an editor will be
> started.\n"
> > " If any targets are (or contain) locked items, those will
be\n"
> > " unlocked after a successful commit.\n"),
> > +#else
> > + N_("Send changes from your working copy to the repository.\n"
> > + "usage: commit [PATH...]\n"
> > + "\n"
> > + " A log message must be provided, but it can be empty.\n"
> > + " OS400 does not support the starting of an editor,\n"
> > + " so --message or --file must be used. If any targets are\n"
> > + " (or contain) locked items, those will be unlocked after
a\n"
> > + " successful commit.\n"),
> > +#endif
>
> Heh! To begin with I thought it would be nice if you could put the
"#if"
> around just the part of the string that differs, but then I realised
> that would
> be trying to use a directive inside the invocation of a macro, so
impossible.
That's better than me, I actually tried to former before I realized it
wouldn't work.
> Please could you reindent the existing text strings to match the
newposition
> of the opening parenthesis?
Corrected that also.
> Does something suitable happen if the user doesn't provide "--
> message" or "--file"?
Ah, that is a good point, while my patch provides appropriate help for
commit on OS400...
svn ci --help
commit (ci): Send changes from your working copy to the repository.
usage: commit [PATH...]
A log message must be provided, but it can be empty.
OS400 does not support the starting of an editor,
so --message or --file must be used. If any targets are
(or contain) locked items, those will be unlocked after a
successful commit.
$
...the error messages received if you omit -m and -F is a bit misleading:
svn ci /home/burba/wcs/hooktest
svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting
the $SVN_EDITOR environment variable or using the --mes
sage (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is
set, and no 'editor-cmd' run-time configuration option was found
$
I modified svn_cl__get_log_message() in util.c to provide a better
response:
svn ci /home/burba/wcs/hooktest
svn: Commit failed (details follow):
svn: Use of an external editor to fetch log message is not supported on
OS400; consider using the --message (-m) or --file (-F) options
$
> Other than that, +1.
The slightly improved log and patch are below, let me know if it's ok.
Thanks,
Paul B.
[[[
OS400/EBCDIC Port: Disable unsupported features.
This is one of several patches to allow Subversion to run on IBM's
OS400 V5R4. It disables subcommands and CL options not currently
supported on OS400.
* subversion/svn/main.c
(svn_cl__options): Disable --encoding, --editor-cmd, --diff-cmd,
--diff3-cmd, and --extensions options.
(svn_cl__cmd_table): Tweak svn ci help message. Disable svn
propedit.
* subversion/svn/util.c
(svn_cl__get_log_message): Return error appropriate to OS400.
]]]
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 28 15:27:15 2006