Re: "svn patch" and the TAB character

2019-12-18 Thread Doug Robinson
Brane, Stefan, Daniel, Nathan: Thank you for the discussion - it filled in history that I could not find. I understand the issues now. Cheers! Happy Holidays! Doug On Tue, Dec 17, 2019 at 9:42 AM Branko Čibej wrote: > On 17.12.2019 14:58, Stefan Sperling wrote: > > On Tue, Dec 17, 2019 at

Re: "svn patch" and the TAB character

2019-12-17 Thread Branko Čibej
On 17.12.2019 14:58, Stefan Sperling wrote: > On Tue, Dec 17, 2019 at 08:33:09AM -0500, Doug Robinson wrote: >>> And of course, both the >>> filename and the label (= the part after the tab character) may contain an >>> arbitrary number of spaces. >> The problem is parsing the line into proper

Re: "svn patch" and the TAB character

2019-12-17 Thread Stefan Sperling
On Tue, Dec 17, 2019 at 08:33:09AM -0500, Doug Robinson wrote: > > And of course, both the > > filename and the label (= the part after the tab character) may contain an > > arbitrary number of spaces. > > The problem is parsing the line into proper tokens when every character out > there can be

Re: "svn patch" and the TAB character

2019-12-17 Thread Doug Robinson
On Mon, Dec 16, 2019 at 8:55 PM Daniel Shahaf wrote: > Doug Robinson wrote on Mon, Dec 16, 2019 at 11:13:25 -0500: > > So the two file names, differing only by a TAB in the "right place" will > > currently have completely different behaviors: > > > > My File NameSPACE(Revision 12) > > My File

Re: "svn patch" and the TAB character

2019-12-16 Thread Daniel Shahaf
Daniel Shahaf wrote on Tue, 17 Dec 2019 01:55 +00:00: > I suppose that simply trying to repeatedly s/\s+\S+$// might work well > enough? That is: In English: remove all non-whitespaces at the end of the string, then remove all trailing whitespace. > data = line[len('--- '):].rstrip('\n') >

Re: "svn patch" and the TAB character

2019-12-16 Thread Daniel Shahaf
Doug Robinson wrote on Mon, Dec 16, 2019 at 11:13:25 -0500: > So the two file names, differing only by a TAB in the "right place" will > currently have completely different behaviors: > > My File NameSPACE(Revision 12) > My File NameTAB(Revision 12) > > I see no point in maintaining that the

Re: "svn patch" and the TAB character

2019-12-16 Thread Doug Robinson
On Sat, Dec 14, 2019 at 6:13 AM Stefan Sperling wrote: > 'svn patch' already behaves like regular patch, i.e. it assumes the whole > line > denotes a file name if no TAB can be found. > > The problem is that svn diff's revision number marker " (revision XY)" must > be separated by a TAB.

Re: "svn patch" and the TAB character

2019-12-14 Thread Nathan Hartman
On Fri, Dec 13, 2019 at 5:00 PM Doug Robinson wrote: > If I use "svn diff --patch compatible" to produce a patch file. Then edit > that patch file using an editor with settings that replace the TAB with a > "proper" number of SPACE characters, the "svn patch" command will declare: > > $ svn

Re: Translatable diff headers (was: Re: "svn patch" and the TAB character)

2019-12-14 Thread Stefan Sperling
On Sat, Dec 14, 2019 at 12:28:04PM +, Daniel Shahaf wrote: > Stefan Sperling wrote on Sat, 14 Dec 2019 11:13 +00:00: > > The problem is that svn diff's revision number marker " (revision XY)" must > > be separated by a TAB. > > In diff generation, the whole string is translated:

Translatable diff headers (was: Re: "svn patch" and the TAB character)

2019-12-14 Thread Daniel Shahaf
Stefan Sperling wrote on Sat, 14 Dec 2019 11:13 +00:00: > The problem is that svn diff's revision number marker " (revision XY)" must > be separated by a TAB. In diff generation, the whole string is translated: _("%s\t(revision %ld)"). It seems to me that if a translator changed the start of the

Re: "svn patch" and the TAB character

2019-12-14 Thread Stefan Sperling
On Sat, Dec 14, 2019 at 10:59:01AM +, Daniel Shahaf wrote: > Doug Robinson wrote on Fri, 13 Dec 2019 21:59 +00:00: > > If I [...] edit that patch file using an editor with settings that replace > > the TAB > > with a "proper" number of SPACE characters, > > Don't do that. If the context

Re: "svn patch" and the TAB character

2019-12-14 Thread Daniel Shahaf
Doug Robinson wrote on Fri, 13 Dec 2019 21:59 +00:00: > If I [...] edit that patch file using an editor with settings that replace > the TAB > with a "proper" number of SPACE characters, Don't do that. If the context lines start with tabs (ignoring the first column), they would be corrupted

"svn patch" and the TAB character

2019-12-13 Thread Doug Robinson
Folks: If I use "svn diff --patch compatible" to produce a patch file. Then edit that patch file using an editor with settings that replace the TAB with a "proper" number of SPACE characters, the "svn patch" command will declare: $ svn patch ../n.txt Skipped missing target: 'TheFile (revision