# HG changeset patch # User Augie Fackler # Date 1265474089 21600 # Node ID ebd8fb1a05e451988a174454bd6697ce528290da # Parent 809c673bdd30507a3e40b153105de83b913e21aa clean up trailing whitespace diff --git a/hgsubversion/editor.py b/hgsubversion/editor.py --- a/hgsubversion/editor.py +++ b/hgsubversion/editor.py @@ -123,7 +123,7 @@ class HgEditor(delta.Editor): @ieditor def delete_entry(self, path, revision_bogus, parent_baton, pool=None): - br_path, branch = self.meta.split_branch_path(path)[:2] + br_path, branch = self.meta.split_branch_path(path)[:2] if br_path == '': if self.meta.get_path_tag(path): # Tag deletion is not handled as branched deletion diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -393,7 +393,7 @@ class SVNMeta(object): """ if ctx is None: ctx = self.repo[changeid] - extra = ctx.extra()['convert_revision'] + extra = ctx.extra()['convert_revision'] branchpath, revnum = extra[40:].rsplit('@', 1) branch = self.localname(self.normalize(branchpath)) if self.layout == 'single': @@ -446,7 +446,7 @@ class SVNMeta(object): t_name = t_name[:-(len(file)+1)] found = t_name in addedtags if found and src_rev > addedtags[t_name][1]: - addedtags[t_name] = branch, src_rev + addedtags[t_name] = branch, src_rev elif (paths[p].action == 'D' and p.endswith(t_name) and t_name in self.tags): branch = self.get_source_rev(self.tags[t_name])[1] @@ -526,7 +526,7 @@ class SVNMeta(object): data=tagdata, islink=False, isexec=False, - copied=False) + copied=False) revnum, branch = self.get_source_rev(ctx=parentctx)[:2] newparent = None for child in parentctx.children(): diff --git a/tests/test_tags.py b/tests/test_tags.py --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -136,7 +136,7 @@ rename a tag openheads = [h for h in heads if not repo[h].extra().get('close', False)] closedheads = set(heads) - set(openheads) self.assertEqual(len(openheads), 1) - self.assertEqual(len(closedheads), 4) + self.assertEqual(len(closedheads), headcount-1) closedheads = sorted(list(closedheads), cmp=lambda x,y: cmp(repo[x].rev(), repo[y].rev())) @@ -275,7 +275,7 @@ Fix tag pt 2. def test_tagging_into_tag_stupid(self): self.test_tagging_into_tag(True) - + def suite(): return unittest.TestLoader().loadTestsFromTestCase(TestTags)