@@ -40,30 +40,32 class Repository::Darcs < Repository | |||
|
40 | 40 | patch = identifier.nil? ? nil : changesets.find_by_revision(identifier) |
|
41 | 41 | scm.entry(path, patch.nil? ? nil : patch.scmid) |
|
42 | 42 | end |
|
43 | ||
|
43 | ||
|
44 | 44 | def entries(path=nil, identifier=nil) |
|
45 | 45 | patch = identifier.nil? ? nil : changesets.find_by_revision(identifier) |
|
46 | 46 | entries = scm.entries(path, patch.nil? ? nil : patch.scmid) |
|
47 | 47 | if entries |
|
48 | 48 | entries.each do |entry| |
|
49 | 49 | # Search the DB for the entry's last change |
|
50 |
|
|
|
50 | if entry.lastrev && !entry.lastrev.scmid.blank? | |
|
51 | changeset = changesets.find_by_scmid(entry.lastrev.scmid) | |
|
52 | end | |
|
51 | 53 | if changeset |
|
52 | 54 | entry.lastrev.identifier = changeset.revision |
|
53 | entry.lastrev.name = changeset.revision | |
|
54 | entry.lastrev.time = changeset.committed_on | |
|
55 | entry.lastrev.author = changeset.committer | |
|
55 | entry.lastrev.name = changeset.revision | |
|
56 | entry.lastrev.time = changeset.committed_on | |
|
57 | entry.lastrev.author = changeset.committer | |
|
56 | 58 | end |
|
57 | 59 | end |
|
58 | 60 | end |
|
59 | 61 | entries |
|
60 | 62 | end |
|
61 | ||
|
63 | ||
|
62 | 64 | def cat(path, identifier=nil) |
|
63 | 65 | patch = identifier.nil? ? nil : changesets.find_by_revision(identifier.to_s) |
|
64 | 66 | scm.cat(path, patch.nil? ? nil : patch.scmid) |
|
65 | 67 | end |
|
66 | ||
|
68 | ||
|
67 | 69 | def diff(path, rev, rev_to) |
|
68 | 70 | patch_from = changesets.find_by_revision(rev) |
|
69 | 71 | return nil if patch_from.nil? |
@@ -73,7 +75,7 class Repository::Darcs < Repository | |||
|
73 | 75 | end |
|
74 | 76 | patch_from ? scm.diff(path, patch_from.scmid, patch_to ? patch_to.scmid : nil) : nil |
|
75 | 77 | end |
|
76 | ||
|
78 | ||
|
77 | 79 | def fetch_changesets |
|
78 | 80 | scm_info = scm.info |
|
79 | 81 | if scm_info |
General Comments 0
You need to be logged in to leave comments.
Login now