On Tue, Oct 07, 2014 at 03:10:44AM -0400, Daniel Dickman wrote: > Fritjof, have you let the gnu rcs project know about the segfault? > Maybe see how they choose to fix things and then follow their lead? >
No, I have not. I hope they follow the tech@ mailing list. :) > > On Mon, Oct 6, 2014 at 10:47 AM, Nicholas Marriott > <nicholas.marri...@gmail.com> wrote: > > > > I think that GNU RCS segfaulting for -u -l is enough justification to do > > what we like, so a message (and last flag wins) like -L/-U would be fine > > with me. > > > > But if we want to do what they probably "meant" to happen then better to > > match -l -u like Fritjof's diff. > > > > > > On Fri, Oct 03, 2014 at 12:55:35PM +0200, Otto Moerbeek wrote: > > > On Thu, Oct 02, 2014 at 12:56:10AM +0100, Nicholas Marriott wrote: > > > > > > > > > > > OTOH, check out what we do with rcs -L and -U... > > > > > > I kinda like that, because it tells you exactly what it is doing. > > > > > > -Otto > > > > > > > > > > > > > > > On Thu, Oct 02, 2014 at 12:54:13AM +0100, Nicholas Marriott wrote: > > > > > Matching GNU RCS seems preferable to me but I don't feel strongly > > > > > about > > > > > it. > > > > > > > > > > I wouldn't mention this in the man page, it hardly seems like > > > > > behaviour > > > > > anyone should (or will need to) rely on. > > > > > > > > > > > > > > > On Wed, Oct 01, 2014 at 07:41:52PM -0400, Daniel Dickman wrote: > > > > > > posix commands (like ls(1) for example) keep the last option when > > > > > > mutually exclusive options are specified. does it make sense to > > > > > > keep rcs consistent with that convention? also is a man page diff > > > > > > needed? > > > > > > > > > > > > > > > > > > > On Oct 1, 2014, at 7:17 PM, Nicholas Marriott > > > > > > > <nicholas.marri...@gmail.com> wrote: > > > > > > > > > > > > > > The existing behaviour isn't wildly useful, makes sense to me, ok > > > > > > > nicm > > > > > > > > > > > > > > > > > > > > >> On Wed, Oct 01, 2014 at 11:33:33PM +0200, Fritjof Bornebusch > > > > > > >> wrote: > > > > > > >> Hi tech, > > > > > > >> > > > > > > >> the OpenRCS rcs command produces the following output if -l and > > > > > > >> -u is > > > > > > >> used in the same command: > > > > > > >> > > > > > > >> $ rcs -l1.1 -u1.1 foo.txt > > > > > > >> RCS file: foo.txt,v > > > > > > >> 1.1 locked > > > > > > >> 1.1 unlocked > > > > > > >> > > > > > > >> $ rcs -u1.1 -l1.1 foo.txt > > > > > > >> RCS file: foo.txt,v > > > > > > >> 1.1 locked > > > > > > >> 1.1 unlocked > > > > > > >> > > > > > > >> I've looked at GnuRCS and it has another way to handle these > > > > > > >> parameters > > > > > > >> (it seems the other BSDs use GnuRCS, too). > > > > > > >> > > > > > > >> Debian 7.5: > > > > > > >> $ rcs -l1.1 -u1.1 foo.txt > > > > > > >> RCS file: foo.txt,v > > > > > > >> rcs: foo.txt,v: no lock set on revision 1.1 > > > > > > >> 1.1 locked > > > > > > >> > > > > > > >> $ rcs -u1.1 -l1.1 foo.txt > > > > > > >> Segmentation fault > > > > > > >> > > > > > > >> Well, I think the "Segmentation fault" isn't that important :), > > > > > > >> but GnuRCS > > > > > > >> does not lock and unlock a file by using the same command like > > > > > > >> OpenRCS. > > > > > > >> > > > > > > >> I think the different implementations of RCS should share the > > > > > > >> same > > > > > > >> behaviour: > > > > > > >> > > > > > > >> $ rcs -l1.1 -u1.1 foo.txt > > > > > > >> RCS file: foo.txt,v > > > > > > >> 1.1 locked > > > > > > >> done > > > > > > >> > > > > > > >> $ rcs -u1.1 -l1.1 foo.txt > > > > > > >> RCS file: foo.txt,v > > > > > > >> 1.1 unlocked > > > > > > >> done > > > > > > >> > > > > > > >> fritjof > > > > > > >> > > > > > > >> > > > > > > >> Index: rcsprog.c > > > > > > >> =================================================================== > > > > > > >> RCS file: /cvs/src/usr.bin/rcs/rcsprog.c,v > > > > > > >> retrieving revision 1.151 > > > > > > >> diff -u -p -r1.151 rcsprog.c > > > > > > >> --- rcsprog.c 12 Jul 2011 21:00:32 -0000 1.151 > > > > > > >> +++ rcsprog.c 3 Aug 2014 15:42:34 -0000 > > > > > > >> @@ -234,9 +234,10 @@ rcs_main(int argc, char **argv) > > > > > > >> lkmode = RCS_LOCK_STRICT; > > > > > > >> break; > > > > > > >> case 'l': > > > > > > >> - /* XXX - Check with -u flag. */ > > > > > > >> - lrev = rcs_optarg; > > > > > > >> - rcsflags |= RCSPROG_LFLAG; > > > > > > >> + if (!(rcsflags & RCSPROG_UFLAG)) { > > > > > > >> + lrev = rcs_optarg; > > > > > > >> + rcsflags |= RCSPROG_LFLAG; > > > > > > >> + } > > > > > > >> break; > > > > > > >> case 'm': > > > > > > >> if (logstr != NULL) > > > > > > >> @@ -272,9 +273,10 @@ rcs_main(int argc, char **argv) > > > > > > >> lkmode = RCS_LOCK_LOOSE; > > > > > > >> break; > > > > > > >> case 'u': > > > > > > >> - /* XXX - Check with -l flag. */ > > > > > > >> - urev = rcs_optarg; > > > > > > >> - rcsflags |= RCSPROG_UFLAG; > > > > > > >> + if (!(rcsflags & RCSPROG_LFLAG)) { > > > > > > >> + urev = rcs_optarg; > > > > > > >> + rcsflags |= RCSPROG_UFLAG; > > > > > > >> + } > > > > > > >> break; > > > > > > >> case 'V': > > > > > > >> printf("%s\n", rcs_version); > > > > > > > >