Changeset 3212
- Timestamp:
- 02/11/08 05:23:41 (9 months ago)
- Files:
-
- gitplugin/0.11/tracext/git/git_fs.py (modified) (4 diffs)
- gitplugin/0.11/tracext/git/PyGIT.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gitplugin/0.11/tracext/git/git_fs.py
r3211 r3212 15 15 from trac.core import * 16 16 from trac.util import TracError, shorten_line 17 from trac.util.datefmt import utc, FixedOffset17 from trac.util.datefmt import FixedOffset, to_timestamp 18 18 from trac.versioncontrol.api import \ 19 19 Changeset, Node, Repository, IRepositoryConnector, NoSuchChangeset, NoSuchNode … … 203 203 def get_changesets(self, start, stop): 204 204 #print "get_changesets", start, stop 205 def to_unix(dt): 206 return time.mktime(dt.timetuple()) + dt.microsecond/1e6 207 208 for rev in self.git.history_timerange(to_unix(start), to_unix(stop)): 205 for rev in self.git.history_timerange(to_timestamp(start), to_timestamp(stop)): 209 206 yield self.get_changeset(rev) 210 207 … … 259 256 if rev_callback: 260 257 revs = set(self.git.all_revs()) - revs 261 for r in revs:262 rev_callback(r )258 for rev in revs: 259 rev_callback(rev) 263 260 264 261 class GitNode(Node): … … 328 325 return 329 326 330 for e in self.git.ls_tree(self.rev, self.__git_path()):331 yield GitNode(self.git, e [3], self.rev, self.log, e)327 for ent in self.git.ls_tree(self.rev, self.__git_path()): 328 yield GitNode(self.git, ent[3], self.rev, self.log, ent) 332 329 333 330 def get_content_type(self): gitplugin/0.11/tracext/git/PyGIT.py
r3211 r3212 265 265 266 266 def get_branches(self): 267 "returns list of branches, with active (= HEAD) one being the first item"267 "returns list of (local) branches, with active (= HEAD) one being the first item" 268 268 result=[] 269 269 for e in self._git_call_f("branch", ["-v", "--no-abbrev"]).readlines(): … … 276 276 277 277 def get_tags(self): 278 result=[] 279 for e in self._git_call_f("tag", ["-l"]).readlines(): 280 result.append(e.strip()) 281 return result 278 return [e.strip() for e in self._git_call_f("tag", ["-l"]).readlines()] 282 279 283 280 def ls_tree(self, rev, path=""):
