##// END OF EJS Templates
scm: mercurial: switch short or long id of entry by existing value in DB (#14361)...
Toshi MARUYAMA -
r12485:d301b8c0c180
parent child
Show More
@@ -71,12 +71,25 class Repository::Mercurial < Repository
71 super(cs, cs_to, ' ')
71 super(cs, cs_to, ' ')
72 end
72 end
73
73
74 def modify_entry_lastrev_identifier(entry)
75 if entry.lastrev && entry.lastrev.identifier
76 entry.lastrev.identifier = scmid_for_inserting_db(entry.lastrev.identifier)
77 end
78 end
79 private :modify_entry_lastrev_identifier
80
74 def entry(path=nil, identifier=nil)
81 def entry(path=nil, identifier=nil)
75 scm.entry(path, identifier)
82 entry = scm.entry(path, identifier)
83 return nil if entry.nil?
84 modify_entry_lastrev_identifier(entry)
85 entry
76 end
86 end
77
87
78 def scm_entries(path=nil, identifier=nil)
88 def scm_entries(path=nil, identifier=nil)
79 scm.entries(path, identifier)
89 entries = scm.entries(path, identifier)
90 return nil if entries.nil?
91 entries.each {|entry| modify_entry_lastrev_identifier(entry)}
92 entries
80 end
93 end
81 protected :scm_entries
94 protected :scm_entries
82
95
General Comments 0
You need to be logged in to leave comments. Login now