Re: "svn patch" and the TAB character
From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 17 Dec 2019 01:55:40 +0000
Doug Robinson wrote on Mon, Dec 16, 2019 at 11:13:25 -0500:
You can't assume the string after the tab will be "(revision %ld)".
First of all, as I already pointed out, that string is translatable. Second of
Please propose an algorithm for parsing a filename out of a diff header line
--- I suppose that simply trying to repeatedly s/\s+\S+$// might work well enough? That is: 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 02:55:45 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.