# HG changeset patch # User Scott Chacon <schacon@gmail.com> # Date 1240718393 25200 # Sat Apr 25 20:59:53 2009 -0700 # Node ID 66860f141788e543e8f1bbb552140c91cc4e728d # Parent 7e776864b30167cf1b6e5f7290f29b50e98621a0 update todo file and removed outdated TODO comments diff --git a/TODO.txt b/TODO.txt --- a/TODO.txt +++ b/TODO.txt @@ -1,6 +1,7 @@ CLONE =========== +* only try to import non-mapped commits * update/add bookmarks * checkout the tip * limit to HEAD branch? (gh-pages makes weird import) diff --git a/dulwich/repo.py b/dulwich/repo.py --- a/dulwich/repo.py +++ b/dulwich/repo.py @@ -308,7 +308,6 @@ # takes a commit object and a file path # returns the contents of that file at that commit - # TODO : make this recursive - any file in a subdir wont be found here def get_file(self, commit, f): otree = self.tree(commit.tree) parts = f.split('/') @@ -322,8 +321,6 @@ # takes a commit and returns an array of the files that were changed # between that commit and it's parents - # TODO : optimize this, it's horrible - # TODO : if no parents, return all files def get_files_changed(self, commit): def filenames(basetree, comptree, prefix): diff --git a/git_handler.py b/git_handler.py --- a/git_handler.py +++ b/git_handler.py @@ -76,7 +76,7 @@ convert_list[sha] = commit todo.extend([p for p in commit.parents if p not in done]) - # sort the commits by commit date (TODO: change to topo sort) + # sort the commits commits = TopoSort(convert_list).items() # import each of the commits, oldest first @@ -84,13 +84,13 @@ commit = convert_list[csha] self.import_git_commit(commit) - # TODO : update Hg bookmarks (possibly named heads?) + # TODO : update Hg bookmarks print bookmarks.parse(self.repo) def import_git_commit(self, commit): print "importing: " + commit.id - # TODO : have to handle merge contexts at some point (two parent files, etc) + # TODO : (?) have to handle merge contexts at some point (two parent files, etc) def getfilectx(repo, memctx, f): (e, sha, data) = self.git.get_file(commit, f) e = '' # TODO : make this a real mode @@ -98,7 +98,6 @@ p1 = "0" * 40 p2 = "0" * 40 - # TODO : do something if parent is not mapped yet! if len(commit.parents) > 0: sha = commit.parents[0] p1 = self._map[sha]