Adds support for file viewing with Darcs 2.0+ (patch #1799 by Ralph Lange slightly edited).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1759 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-08-25 14:33:30 +00:00
1 parent e339d0bcc0
commit d93f96765b
4 files changed
+55 -5

No files matched your search

+10
View File
@@ -28,6 +28,11 @@ class Repository::Darcs < Repository
'Darcs'
end
def entry(path=nil, identifier=nil)
patch = identifier.nil? ? nil : changesets.find_by_revision(identifier)
scm.entry(path, patch.nil? ? nil : patch.scmid)
end
def entries(path=nil, identifier=nil)
patch = identifier.nil? ? nil : changesets.find_by_revision(identifier)
entries = scm.entries(path, patch.nil? ? nil : patch.scmid)
@@ -46,6 +51,11 @@ class Repository::Darcs < Repository
entries
end
def cat(path, identifier=nil)
patch = identifier.nil? ? nil : changesets.find_by_revision(identifier)
scm.cat(path, patch.nil? ? nil : patch.scmid)
end
def diff(path, rev, rev_to)
patch_from = changesets.find_by_revision(rev)
return nil if patch_from.nil?