[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using uscan with VCS hosting sites

[no answers for this yet on ‘debian-mentors’, so trying here]

Howdy all,

I have an upstream for a package who has started using a VCS hosting
site for publishing the code. It's possible they will continue to make
tarball releases, but in case they don't at some point in the future,
I'd like to use this as an opportunity to learn the capabilities of

The package in question is ‘python-coverage’, and already has a
‘debian/watch’ file:

# Current version from Ned Batchelder's site
http://nedbatchelder.com/code/modules/coverage.html \

The author is now publishing their source code for this package at
<URL:http://bitbucket.org/ned/coveragepy/>, a project hosting site using
Mercurial for VCS. That service makes available URLs for tags in VCS
repositories, but the tags are not in the URLs themselves, only in the
text of the ‘A’ elements:

<li class="icon-tags">
    tags &raquo;
        <li><a href="/ned/coveragepy/src/b24b35f0448b/">tip</a></li>
        <li><a href="/ned/coveragepy/src/79dd373074de/">coverage-3.0b2</a></li>
        <li><a href="/ned/coveragepy/src/4105a4de000e/">coverage-3.0b1</a></li>

The page at the URL for a specific tag (e.g. that for ‘coverage-3.0b2’,
<URL:http://bitbucket.org/ned/coveragepy/src/79dd373074de/>) has URLs
for “get source”, including tarball:

<li><a class="link-download">get source »</a>
        <li><a rel="nofollow" href="/ned/coveragepy/get/79dd373074de.zip" class="zip">zip</a></li>
        <li><a rel="nofollow" href="/ned/coveragepy/get/79dd373074de.gz" class="compressed">gz</a></li>
        <li><a rel="nofollow" href="/ned/coveragepy/get/79dd373074de.bz2" class="compressed">bz2</a></li>

So, how do I go from “the URL for the project source is
<URL:http://bitbucket.org/ned/coveragepy/>”, to a ‘debian/watch’ file
that will enable ‘uscan’ to discover the current version is
‘coverage-3.0b2’, and its original source tarball is downloadable from

 \        “If it ain't bust don't fix it is a very sound principle and |
  `\      remains so despite the fact that I have slavishly ignored it |
_o__)                                     all my life.” —Douglas Adams |
Ben Finney

Reply to: