[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "svn patch" and the TAB character

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 17 Dec 2019 02:16:43 +0000

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')
> need_confirmation = False
> while len(data) > 0:
> if exists(data):
> break
> else:
> data =~ s/\s+\S+$//;
> need_confirmation = True
> else:
> raise Exception("{!r} does not exist".format(line[4:]))
> if need_confirmation:
> prompt_for_confirmation(data)
>
Received on 2019-12-17 03:17:09 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.