[PATCH] Fix subversion convert not detecting empty changesets.

Francis Barber fedora at barber-family.id.au
Sat Apr 25 09:53:43 CDT 2009


Greetings All.

For some reason, subversion sometimes creates completely empty commits. 
The convert extension does try to make allowance for this by checking
the modified paths.  However, in this case I've found that paths is
sometimes an empty list instead of None.

I can't think of a good unit test for this because I don't know how make
subversion create an empty commit.

Regards,
Frank.

# HG changeset patch
# User Francis Barber <fedora at barber-family.id.au>
# Date 1240666067 -28800
# Node ID c26b19893bbdceff3a477cb7f5007ad155e17bc7
# Parent  4f13ed6ee5448cf5de72446f2b6a418e33f691da
Fix subversion convert not detecting empty changesets.

Need to check for the empty as list as well as None.

diff -r 4f13ed6ee544 -r c26b19893bbd hgext/convert/subversion.py
--- a/hgext/convert/subversion.py    Thu Apr 23 15:40:10 2009 -0500
+++ b/hgext/convert/subversion.py    Sat Apr 25 21:27:47 2009 +0800
@@ -851,7 +851,7 @@
                         self.ui.note(_('skipping blacklisted revision
%d\n')
                                      % revnum)
                         continue
-                    if paths is None:
+                    if not paths:
                         self.ui.debug(_('revision %d has no entries\n')
% revnum)
                         continue
                     cset, lastonbranch = parselogentry(paths, revnum,
author,



More information about the Mercurial-devel mailing list