On 06.10.2009 16:59, Steve Borho wrote: > > > On Tue, Oct 6, 2009 at 9:53 AM, Adrian Buehlmann <adr...@cadifra.com > <mailto:adr...@cadifra.com>> wrote: > > On 06.10.2009 16:19, Yuki KODAMA wrote: > > On Tue, Oct 6, 2009 at 22:58, Adrian Buehlmann <adr...@cadifra.com > <mailto:adr...@cadifra.com>> wrote: > >> On 06.10.2009 15:48, Yuki KODAMA wrote: > >>> On Tue, Oct 6, 2009 at 22:28, Adrian Buehlmann > <adr...@cadifra.com <mailto:adr...@cadifra.com>> wrote: > >>>> On 06.10.2009 15:07, Yuki KODAMA wrote: > >>>>> I don't mind either delimiters spaces or commas. > >>>>> As you said, it's just for consistency. > >>>> I already agreed to switching to using comma as delimiter. > >>>> > >>>> I don't think I argued for something different in this thread? > >>> Ah, sorry, I misread. > >>> You said that we should support escaping feature. > >>> > >> Really? Oh, well then, sorry for nitpicking. > >> > >> Please ignore my comments to this patch. > >> > > > > ugh, it's my miss.... s/that/whether/ > > You didn't say that. Sorry. > > You began discussion whether or not we support the escaping feature. > > > > I really don't mind if you would like to support escaping. > > Maybe we want full quoted string support using ".." or '..' > > optionX = "a branch with spaces", 'and,some, funny branch with > comma', some-normal-branch > optionY = "example 1 tag", "and,some, other funny tag", simpletag > optionZ = "tag containing\"double quote", 'another " funny tag' > > > I expect the escaped version is easier to implement, but I'll take either. > > > implemented as a central function as suggested by Henrik. > > > +1 >
Maybe we can somehow use shlex ( http://docs.python.org/library/shlex.html ) ? $ python Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> shlex.split("simple-tag, 'tag with space', 'tag,with,comma'") ['simple-tag,', 'tag with space,', 'tag,with,comma'] >>> shlex.split("simple-tag 'tag with space' 'tag,with,comma'") ['simple-tag', 'tag with space', 'tag,with,comma'] But: >>> shlex.split("simple-tag,'tag with space','tag,with,comma'") ['simple-tag,tag with space,tag,with,comma'] would be probably nice to use the POSIX mode, though http://docs.python.org/library/shlex.html#parsing-rules ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop