diff -Nru mercurial-1.9.1/debian/changelog mercurial-1.9.1/debian/changelog --- mercurial-1.9.1/debian/changelog 2011-08-03 09:01:23.000000000 +0200 +++ mercurial-1.9.1/debian/changelog 2011-10-17 23:24:41.000000000 +0200 @@ -1,3 +1,10 @@ +mercurial (1.9.1-1ubuntu0.1) oneiric-proposed; urgency=low + + * Apply upstream patch to bundlerepo, to check the bundlename argument + before unlinking it. (LP: #831313) + + -- Stefano Rivera Mon, 17 Oct 2011 23:22:42 +0200 + mercurial (1.9.1-1) unstable; urgency=low * Convert to dh_python2 diff -Nru mercurial-1.9.1/debian/patches/backport_upstream__none-bundlerepo mercurial-1.9.1/debian/patches/backport_upstream__none-bundlerepo --- mercurial-1.9.1/debian/patches/backport_upstream__none-bundlerepo 1970-01-01 02:00:00.000000000 +0200 +++ mercurial-1.9.1/debian/patches/backport_upstream__none-bundlerepo 2011-10-17 23:23:14.000000000 +0200 @@ -0,0 +1,22 @@ +Description: bundlerepo: add argument check before unlink + The default argument value of None, for bundlename, would cause an exception. + Callers currently pass an empty string, thus dodging this problem. + Upstream commit: 106f89299da61291b31dc054de721c98a04a1380 +Origin: upstream, http://selenic.com/hg/rev/106f89299da61291b31dc054de721c98a04a1380 +Author: Sune Foldager +Bug-Ubuntu: https://bugs.launchpad.net/bug/831313 +Acked-by: Stefano Rivera +Last-Update: 2011-10-17 + +--- a/mercurial/bundlerepo.py ++++ b/mercurial/bundlerepo.py +@@ -315,7 +315,8 @@ + common, incoming, rheads = tmp + if not incoming: + try: +- os.unlink(bundlename) ++ if bundlename: ++ os.unlink(bundlename) + except OSError: + pass + return other, [], other.close diff -Nru mercurial-1.9.1/debian/patches/series mercurial-1.9.1/debian/patches/series --- mercurial-1.9.1/debian/patches/series 2011-07-30 20:17:47.000000000 +0200 +++ mercurial-1.9.1/debian/patches/series 2011-10-17 23:20:16.000000000 +0200 @@ -6,3 +6,4 @@ proposed_upstream__correct-zeroconf-doc deb_specific__install-mo-fhs.patch deb_specific__disable_libdir_replacement.patch +backport_upstream__none-bundlerepo