Mercurial > hg
view tests/test-hybridencode.py @ 15164:7bddec632821
patchbomb: make it easy for the user to decline sending an intro message.
- prompt(): respect interactive mode; clarify logic a bit
- rename introneeded() to introwanted() and give it only one caller
- add 'numbered' arg to makepatch() so it does not need to call
introwanted()
- factor makeintro() out of getpatchmsgs(), so it's easier to skip the
intro message based on the user's behaviour
Unexpected but perfectly reasonable side effect: in non-interactive
mode, we don't show unanswerable "Cc" or "From" prompts anymore, so
remove those from the test expectations.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Tue, 27 Sep 2011 22:38:47 -0400 |
parents | 4c50552fc9bc |
children | 81b115385bc7 |
line wrap: on
line source
from mercurial import store auxencode = lambda f: store._auxencode(f, True) hybridencode = lambda f: store._hybridencode(f, auxencode) enc = hybridencode # used for 'dotencode' repo format def show(s): print "A = '%s'" % s print "B = '%s'" % enc(s) print show('data/aux.bla/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c.i') show('data/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/' 'TENTH/ELEVENTH/LOREMIPSUM.TXT.i') show('data/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/' 'wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules' '.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider.i') show('data/AUX.THE-QUICK-BROWN-FOX-JU:MPS-OVER-THE-LAZY-DOG-THE-QUICK-' 'BROWN-FOX-JUMPS-OVER-THE-LAZY-DOG.TXT.i') show('data/Project Planning/Resources/AnotherLongDirectoryName/' 'Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt') show('data/Project.Planning/Resources/AnotherLongDirectoryName/' 'Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt') show('data/foo.../foo / /a./_. /__/.x../ bla/.FOO/something.i')