Re: A less invasive rcs
John Yates <[email protected]> Mon, 15 Feb 2021 06:19:27 -0500
| Newsgroups | gmane.comp.gnu.rcs |
|---|---|
| Message-ID | <CAJnXXojkBCS-__saeQ4cD8xDQu7DJof-k9dpjRL54Z2vfxD6eQ@mail.gmail.com> |
--0000000000005c892605bb5e29b3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Hugh, I can empathize with your memory of a bad experience. My motivation for this project is a bad experience with git in which unsaved (not yet added) files got lost via a hard reset. As an emacs user I want a mechanism that will preserve my changes on every save. Furthermore, I want those changes saved outside of my project tree. (At work that project tree gets wiped out and recreated by our crazy Perforce integration.) A related project is to add a vc-timemachine capability, modeled on git-timemachine. This is why I want my changes saved in rcs instead of as a collection of date- time suffixed files (*=C3=A1 la* today's backup-each-save.el). I would like to better understand your suggestion for how to handle nested trees. Over the years git has had many runs at the problem of nested projects and all have been quite complex. My hope is that rcs's file-centric simplicity will save us. /john On Mon, Feb 15, 2021 at 5:55 AM Hugh Sasse <[email protected]> wrote: > I like the simplicity and clarity of RCS in comparison with git. (The > other features of git are often appropriate.) I see the benefits of havi= ng > a separate tree and note the idea of having a top marker. However, I had= a > horrible experience when I created a git repository which I hadn't > remembered was in a directory already in one. When I went to the top, th= e > enclosing git functionality just failed on me, and I can't remember the > failure message now (it's about ten years). I thought I was going to los= e > my research. This was too close to a deadline to be fun. > > I think the design of the interface for when things get nested, even > accidentally, will need to be thought through very carefully. My > expectations of "It should just work" were that the current state of the > enclosed repository should be saved when the outer one was saved. [I had > added all.] After all, it is just a collection of files within the > structure that happen to contain a .git directory, etc. > > There may be a whole load of expectations from people, all very different= , > but my feeling was "A version control system may not injure a user's file= s, > or, through inaction, allow them to come to harm" :-)! It took me too lo= ng > to work out what had happened, and didn't do me much good, never mind my > files! The computer has access to all this information, so it should be > able to remind the overburdened user that there is an enclosed repository= , > not the other way round. > > I suspect the "Human Factors" of this may be more difficult than I imagin= e. > > Thank you, > Hugh > ------------------------------ > *From:* help-rcs <[email protected]> on behalf of > John Yates <[email protected]> > *Sent:* 14 February 2021 02:38 > *To:* [email protected] <[email protected]> > *Subject:* A less invasive rcs > > > This message was sent from outside of DMU. Please do not click links or o= pen attachments unless you recognise the source of this email and know the = content is safe. > > I am brainstorming some extensions to rcs that would > > - Avoid both ,v files and RCS directories in working trees > - Allow the ,v files to be stored in a fully separate tree > > Today, we have two places for a working file's ,v file: > > - In the working file's working directory > - In an RCS subdirectory added to that working directory > > I propose a third location, a mirror of that working directory > located by searching upward, through parent directories, for > a "dominating" .rcs directory. If such a directory is found, it > contains a parallel directory structure: > > .../project > =E2=94=9C=E2=94=80=E2=94=80 src > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 foo.c > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 bar.c > =E2=94=9C=E2=94=80=E2=94=80 inc > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 foo.h > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 bar.h > =E2=94=9C=E2=94=80=E2=94=80 doc > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 foo.md > =E2=94=94=E2=94=80=E2=94=80 .rcs > =E2=94=9C=E2=94=80=E2=94=80 src > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 foo.c,v > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 bar.c,v > =E2=94=9C=E2=94=80=E2=94=80 inc > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 foo.h,v > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 bar.h,v > =E2=94=94=E2=94=80=E2=94=80 doc > =E2=94=94=E2=94=80=E2=94=80 foo.md,v > > How to search for a ,v file: > > - Look in working file's directory > - If the working directory contains an RCS sub-directory, > then look there > - If a "dominating" .rcs directory exists, look in the > corresponding directory > > Where to create a new ,v file: > > - If a "dominating" .rcs directory exists, ensure existence > of a corresponding directory and create it there > - If a RCS sub-directory exists, create it there > - Create it in the working file's working directory > > To provide a means of stopping the upward search for a .rcs > marker I propose a very simple .rcsstop marker. > > At this point I take some inspiration from git for a separate > directory convention. This means allowing the "dominating" > .rcs marker to be a file, similar to .git. If it is a file then it is > a "file system agnostic" symbolic link to an out of tree .rcs > directory. The contents of this file is > > rcsdir: <path> > > > Does this seem too crazy? Any implementation suggestions? > Where is the relevant search logic implemented in the rcs > source? > > /john > > --=20 John Yates 505 Tremont St, #803 Boston, MA 02116 --0000000000005c892605bb5e29b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he= lvetica,sans-serif">Hi Hugh,</div><div class=3D"gmail_default" style=3D"fon= t-family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_default"= style=3D"font-family:arial,helvetica,sans-serif">I can empathize with your= memory of a bad experience.=C2=A0</div><div class=3D"gmail_default" style= =3D"font-family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_d= efault" style=3D"font-family:arial,helvetica,sans-serif">My motivation for = this project is a bad experience with git</div><div class=3D"gmail_default"= style=3D"font-family:arial,helvetica,sans-serif">in which unsaved (not yet= added) files got lost via a hard</div><div class=3D"gmail_default" style= =3D"font-family:arial,helvetica,sans-serif">reset.=C2=A0 As an emacs user I= want a mechanism that will</div><div class=3D"gmail_default" style=3D"font= -family:arial,helvetica,sans-serif">preserve my changes on every save.=C2= =A0 Furthermore, I want</div><div class=3D"gmail_default" style=3D"font-fam= ily:arial,helvetica,sans-serif">those changes saved outside of my project t= ree.=C2=A0 (At work</div><div class=3D"gmail_default" style=3D"font-family:= arial,helvetica,sans-serif">that project tree gets wiped out and recreated = by our crazy</div><div class=3D"gmail_default" style=3D"font-family:arial,h= elvetica,sans-serif">Perforce integration.)</div><div class=3D"gmail_defaul= t" style=3D"font-family:arial,helvetica,sans-serif"><br></div><div class=3D= "gmail_default" style=3D"font-family:arial,helvetica,sans-serif">A related = project is to add a vc-timemachine capability,</div><div class=3D"gmail_def= ault" style=3D"font-family:arial,helvetica,sans-serif">modeled on git-timem= achine.=C2=A0 This is why I want my</div><div class=3D"gmail_default" style= =3D"font-family:arial,helvetica,sans-serif">changes saved in rcs instead of= as a collection of date-</div><div class=3D"gmail_default" style=3D"font-f= amily:arial,helvetica,sans-serif">time suffixed files (<i>=C3=A1 la</i>=C2= =A0today's backup-each-save.el).</div><div class=3D"gmail_default" styl= e=3D"font-family:arial,helvetica,sans-serif"><br></div><div class=3D"gmail_= default" style=3D"font-family:arial,helvetica,sans-serif">I would like to b= etter understand your suggestion for how</div><div class=3D"gmail_default" = style=3D"font-family:arial,helvetica,sans-serif">to handle nested trees.=C2= =A0 Over the years git has had many</div><div class=3D"gmail_default" style= =3D"font-family:arial,helvetica,sans-serif">runs at the problem of nested p= rojects and all have been</div><div class=3D"gmail_default" style=3D"font-f= amily:arial,helvetica,sans-serif">quite complex.=C2=A0 My hope is that rcs&= #39;s file-centric=C2=A0simplicity</div><div class=3D"gmail_default" style= =3D"font-family:arial,helvetica,sans-serif">will save us.</div><div class= =3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif"><br></d= iv><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-s= erif">/john</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">On Mon, Feb 15, 2021 at 5:55 AM Hugh Sasse <<a href=3D"= mailto:[email protected]">[email protected]</a>> wrote:<br></div><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"> <div dir=3D"ltr"> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> I like the simplicity and clarity of RCS in comparison with git.=C2=A0 (The= other features of git are often appropriate.)=C2=A0 I see the benefits of = having a separate tree and note the idea of having a top marker.=C2=A0 Howe= ver, I had a horrible experience when I created a git repository which I hadn't remembered was in a directory already = in one.=C2=A0 When I went to the top, the enclosing git functionality just = failed on me, and I can't remember the failure message now (it's ab= out ten years).=C2=A0 I thought I was going to lose my research.=C2=A0 This was too close to a deadline to be fun.</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> I think the design of the interface for when things get nested, even accide= ntally, will need to be thought through very carefully.=C2=A0 =C2=A0My expe= ctations of "It should just work" were that the current state of = the enclosed repository should be saved when the outer one was saved.=C2=A0 [I had added all.]=C2=A0 After all, it is just a coll= ection of files within the structure that happen to contain a .git director= y, etc.=C2=A0=C2=A0</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> There may be a whole load of expectations from people, all very different, = but my feeling was "A version control system may not injure a user'= ;s files, or, through inaction, allow them to come to harm" :-)!=C2=A0= It took me too long to work out what had happened, and didn't do me much good, never mind my files!=C2=A0 The computer ha= s access to all this information, so it should be able to remind the overbu= rdened user that there is an enclosed repository, not the other way round.<= /div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> I suspect the "Human Factors" of this may be more difficult than = I imagine.</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> <br> </div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> Thank you,</div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt= ;color:rgb(0,0,0)"> Hugh</div> <div id=3D"gmail-m_-4825369188004097900appendonsend"></div> <hr style=3D"display:inline-block;width:98%"> <div id=3D"gmail-m_-4825369188004097900divRplyFwdMsg" dir=3D"ltr"><font fac= e=3D"Calibri, sans-serif" style=3D"font-size:11pt" color=3D"#000000"><b>Fro= m:</b> help-rcs <help-rcs-bounces+hgs=3D<a href=3D"mailto:dmu.ac.uk@gnu.= org" target=3D"_blank">[email protected]</a>> on behalf of John Yates &l= t;<a href=3D"mailto:[email protected]" target=3D"_blank">john@yates-she= ets.org</a>><br> <b>Sent:</b> 14 February 2021 02:38<br> <b>To:</b> <a href=3D"mailto:[email protected]" target=3D"_blank">help-rcs@g= nu.org</a> <<a href=3D"mailto:[email protected]" target=3D"_blank">help-r= [email protected]</a>><br> <b>Subject:</b> A less invasive rcs</font> <div>=C2=A0</div> </div> <div> <table> <tbody> <tr> <td bgcolor=3D"#ffffff"><font color=3D"#000000"> <pre>This message was sent from outside of DMU. Please do not click links o= r open attachments unless you recognise the source of this email and know t= he content is safe.</pre> </font></td> </tr> </tbody> </table> <div dir=3D"ltr"> <div style=3D"font-family:arial,helvetica,sans-serif">I am brainstorming so= me extensions to rcs that would</div> <div> <ul style=3D"font-family:arial,helvetica,sans-serif"> <li>Avoid both ,v files and RCS directories in working trees</li><li>Allow = the ,v files to be stored in a fully separate tree</li></ul> <div style=3D"font-family:arial,helvetica,sans-serif">Today, we have two pl= aces for a working file's ,v file:</div> <div style=3D"font-family:arial,helvetica,sans-serif"> <ul> <li>In the working file's working directory</li><li>In an RCS subdirect= ory added to that working directory</li></ul> <div>I propose a=C2=A0third location, a=C2=A0mirror of that working directo= ry<br> located by searching upward, through parent directories, for<br> a "dominating" .rcs directory.=C2=A0 If such a directory is found= , it<br> contains a parallel directory structure:</div> </div> <div style=3D"font-family:arial,helvetica,sans-serif"><br> </div> <div><font face=3D"monospace">=C2=A0 =C2=A0 .../project<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 src<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 fo= o.c<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 ba= r.c<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 inc<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 fo= o.h<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 ba= r.h<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 doc<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 fo= o.md<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 .rcs<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 src<b= r> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=9C=E2=94= =80=E2=94=80 foo.c,v<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94= =80=E2=94=80 bar.c,v<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 inc<b= r> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=9C=E2=94= =80=E2=94=80 foo.h,v<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94= =80=E2=94=80 bar.h,v<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 doc<b= r> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=94=E2=94=80= =E2=94=80 foo.md,v<br> </font></div> <div style=3D"font-family:arial,helvetica,sans-serif"><br> </div> <div style=3D"font-family:arial,helvetica,sans-serif">How to search for a ,= v file:</div> <div style=3D"font-family:arial,helvetica,sans-serif"> <ul> <li>Look in working file's directory</li><li>If the working directory c= ontains an RCS sub-directory,<br> then look there</li><li>If a "dominating" .rcs directory exists, = look in the<br> corresponding directory</li></ul> <div>Where to create a new ,v file:</div> <div> <ul> <li>If a "dominating" .rcs directory exists, ensure existence<br> of a corresponding directory and create it there</li><li>If a RCS sub-direc= tory exists, create it there</li><li>Create it in the working file's wo= rking directory</li></ul> </div> </div> <div style=3D"font-family:arial,helvetica,sans-serif"> <div> <div>To provide a means of stopping the upward search for a .rcs<br> marker I propose a very simple .rcsstop marker.</div> </div> <div><br> </div> <div></div> </div> <div style=3D"font-family:arial,helvetica,sans-serif">At this point I take = some inspiration from git for a separate</div> <div style=3D"font-family:arial,helvetica,sans-serif">directory convention.= =C2=A0 This means allowing the "dominating"</div> <div style=3D"font-family:arial,helvetica,sans-serif">.rcs marker to be a f= ile,=C2=A0similar to .git.=C2=A0 If it is a file then it is</div> <div style=3D"font-family:arial,helvetica,sans-serif">a "file system a= gnostic" symbolic link to an out of tree .rcs</div> <div style=3D"font-family:arial,helvetica,sans-serif">directory.=C2=A0 The = contents of this file is</div> <div style=3D"font-family:arial,helvetica,sans-serif"><br> </div> <div style=3D"font-family:arial,helvetica,sans-serif">=C2=A0 =C2=A0 rcsdir:= <path></div> </div> <div><br> </div> <div style=3D"font-family:arial,helvetica,sans-serif"><br> </div> <div style=3D"font-family:arial,helvetica,sans-serif">Does this seem too cr= azy?=C2=A0 Any implementation suggestions?</div> <div style=3D"font-family:arial,helvetica,sans-serif">Where is the relevant= search logic implemented in the rcs</div> <div style=3D"font-family:arial,helvetica,sans-serif">source?</div> <div style=3D"font-family:arial,helvetica,sans-serif"><br> </div> <div style=3D"font-family:arial,helvetica,sans-serif">/john</div> <div style=3D"font-family:arial,helvetica,sans-serif"><br> </div> </div> </div> </div> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div>John= Yates<br></div><div>505 Tremont St, #803</div><div>Boston, MA 02116</div><= /div></div></div></div> --0000000000005c892605bb5e29b3--