[PATCH] test-convert: issue1585: Hide svn/bzr lib availability

Matt Mackall mpm at selenic.com
Mon Apr 6 22:41:18 CDT 2009


On Mon, 2009-04-06 at 09:35 +0100, Frank Kingswood wrote:

> Supporting client specifications is quite important, but detection is 
> not too bad - firstly the client spec may not contain any slashes and 
> then we need a call to p4 ("p4 client -o %s"%arg) to see if there is 
> anything there.
> How fast is the call to checktool? Presumably a non-issue; just a walk 
> through $PATH.

There are two issues:

- stable test output regardless of presence of irrelevant tools
- detection of repo types -without- access to relevant tools so that we
can say "this looks like p4, but you don't have p4 installed".

Ideally repo guessing would actually be -quiet- and only tell you
anything if either:

- we failed to detect a repository type or
- we detected a type and failed to find the tool

To do this right, we might need some other error types:

NoRepo : this is not a repo of type X (we have this)
NoTool : this -is- a repo of type X but we're missing the tool
PossibleRepo: this might be a repo of type X, but we can't tell without
the tool

So we quietly go through our possible sources and keep track of all the
PossibleRepo exceptions in case we don't find a positive match. 

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list