# HG changeset patch # User Augie Fackler # Date 1239675553 18000 # Node ID d978192f0d63bdcf1c741b4b4b6f1509bb21fdc4 # Parent 3b3627611468f28bc3f171ce1971e5cc8d8784f7 Clean up TODOs that are no longer relevant. diff --git a/hg_delta_editor.py b/hg_delta_editor.py --- a/hg_delta_editor.py +++ b/hg_delta_editor.py @@ -216,8 +216,6 @@ class HgChangeReceiver(delta.Editor): while paths_need_discovery: p = paths_need_discovery.pop(0) path_could_be_file = True - # TODO(augie) Figure out if you can use break here in a for loop, quick - # testing of that failed earlier. ind = 0 while ind < len(paths_need_discovery) and not paths_need_discovery: if op.startswith(p): @@ -633,7 +631,6 @@ class HgChangeReceiver(delta.Editor): revlog.nullid) if parents[0] in closed_revs and branch in self.branches_to_delete: continue - # TODO this needs to be fixed with the new revmap extra = util.build_extra(rev.revnum, branch, open(self.uuid_file).read(), self.subdir) diff --git a/stupid.py b/stupid.py --- a/stupid.py +++ b/stupid.py @@ -513,9 +513,10 @@ def svn_server_pull_rev(ui, svn, hg_edit for f in excluded: files_touched.remove(f) if parentctx.node() != node.nullid or files_touched: - # TODO(augie) remove this debug code? Or maybe it's sane to have it. for f in files_touched: if f: + # this is a case that really shouldn't ever happen, it means something + # is very wrong assert f[0] != '/' current_ctx = context.memctx(hg_editor.repo, [parentctx.node(), revlog.nullid], diff --git a/svnwrap/svn_swig_wrapper.py b/svnwrap/svn_swig_wrapper.py --- a/svnwrap/svn_swig_wrapper.py +++ b/svnwrap/svn_swig_wrapper.py @@ -112,7 +112,6 @@ class Revision(object): """ def __init__(self, revnum, author, message, date, paths, strip_path=''): self.revnum, self.author, self.message = revnum, author, message - # TODO parse this into a datetime self.date = date self.paths = {} if paths: diff --git a/tests/test_fetch_command.py b/tests/test_fetch_command.py --- a/tests/test_fetch_command.py +++ b/tests/test_fetch_command.py @@ -24,7 +24,6 @@ class TestBasicRepoLayout(test_util.Test def test_fresh_fetch_two_revs(self): repo = self._load_fixture_and_fetch('two_revs.svndump') - # TODO there must be a better way than repo[0] for this check self.assertEqual(node.hex(repo[0].node()), '434ed487136c1b47c1e8f952edb4dc5a8e6328df') self.assertEqual(node.hex(repo['tip'].node()), @@ -33,7 +32,6 @@ class TestBasicRepoLayout(test_util.Test def test_branches(self): repo = self._load_fixture_and_fetch('simple_branch.svndump') - # TODO there must be a better way than repo[0] for this check self.assertEqual(node.hex(repo[0].node()), '434ed487136c1b47c1e8f952edb4dc5a8e6328df') self.assertEqual(node.hex(repo['tip'].node()), @@ -48,7 +46,6 @@ class TestBasicRepoLayout(test_util.Test def test_two_branches_with_heads(self): repo = self._load_fixture_and_fetch('two_heads.svndump') - # TODO there must be a better way than repo[0] for this check self.assertEqual(node.hex(repo[0].node()), '434ed487136c1b47c1e8f952edb4dc5a8e6328df') self.assertEqual(node.hex(repo['tip'].node()), @@ -63,14 +60,12 @@ class TestBasicRepoLayout(test_util.Test def test_many_special_cases_replay(self): repo = self._load_fixture_and_fetch('many_special_cases.svndump') - # TODO there must be a better way than repo[0] for this check self._many_special_cases_checks(repo) def test_many_special_cases_diff(self): repo = self._load_fixture_and_fetch('many_special_cases.svndump', stupid=True) - # TODO there must be a better way than repo[0] for this check self._many_special_cases_checks(repo) def _many_special_cases_checks(self, repo): @@ -156,7 +151,6 @@ class TestStupidPull(test_util.TestBase) self.repo_path, self.wc_path, True) - # TODO there must be a better way than repo[0] for this check self.assertEqual(node.hex(repo[0].node()), '434ed487136c1b47c1e8f952edb4dc5a8e6328df') self.assertEqual(node.hex(repo['tip'].node()), diff --git a/util.py b/util.py --- a/util.py +++ b/util.py @@ -80,7 +80,6 @@ def outgoing_revisions(ui, repo, hg_edit return outgoing_rev_hashes def build_extra(revnum, branch, uuid, subdir): - # TODO this needs to be fixed with the new revmap extra = {} branchpath = 'trunk' if branch: diff --git a/utility_commands.py b/utility_commands.py --- a/utility_commands.py +++ b/utility_commands.py @@ -142,7 +142,6 @@ def rebase(ui, repo, extrafn=None, sourc if parent_rev == target_rev: ui.status('Already up to date!\n') return 0 - # TODO this is really hacky, there must be a more direct way return hgrebase.rebase(ui, repo, dest=node.hex(target_rev.node()), base=node.hex(sourcerev), extrafn=extrafn) diff --git a/wrappers.py b/wrappers.py --- a/wrappers.py +++ b/wrappers.py @@ -255,8 +255,6 @@ def pull(orig, ui, repo, source="default passwd = opts.get('password', '') svn = svnwrap.SubversionRepo(svn_url, user, passwd) author_host = "@%s" % svn.uuid - # TODO these should be configurable again, but I'm torn on how. - # Maybe this should be configured in .hg/hgrc for each repo? Seems vaguely reasonable. tag_locations = ['tags', ] authors = opts.pop('svn_authors', None) filemap = opts.pop('svn_filemap', None)