From df71e40f18e7247a2b752b3547b3cb75aad5120f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Jan 2009 20:13:33 -0500 Subject: [PATCH] add support for heuristic url guessing --- README | 5 +++++ debian/control | 2 +- webcheckout | 13 +++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README b/README index b934894..c3ecae5 100644 --- a/README +++ b/README @@ -4,3 +4,8 @@ dependencies aside from basic perl. Just copy mr into your PATH somewhere, if it isn't already, and set up ~/.mrconfig + +---- + +webcheckout has more dependencies, specifically the LWP::Simple and +HTML::Parser CPAN modules, and optionally the URI module. diff --git a/debian/control b/debian/control index 75fc427..24a2e13 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Package: mr Architecture: all Section: utils Depends: -Suggests: subversion, git-core, cvs, bzr, mercurial, darcs +Suggests: subversion, git-core, cvs, bzr, mercurial, darcs, liburi-perl Recommends: libwww-perl, libhtml-parser-perl Description: a Multiple Repository management tool The mr(1) command can checkout, update, or perform other actions on diff --git a/webcheckout b/webcheckout index d94ad97..0c93eef 100755 --- a/webcheckout +++ b/webcheckout @@ -47,6 +47,14 @@ may still be noisy however.) =back +=head1 PREREQUISITES + +To use this program you will need lots of VCS programs installed, +obviously. It also depends on the perl LWP and HTML::Parser modules. + +If the perl URI module is installed, webcheckout can heuristically guess +what you mean by partial URLs, such as "kitenet.net/~joey"' + =head1 AUTHOR Copyright 2009 Joey Hess @@ -111,6 +119,11 @@ sub getopts { $url=shift @ARGV; $destdir=shift @ARGV; + eval q{use URI::Heuristic}; + if (! $@) { + $url=URI::Heuristic::uf_uristr($url); + } + if ($noact) { $quiet=0; } -- 2.39.2