# File lib/fastcst/repo.rb, line 321
321:         def resolve_id(rev, id)
322:             # determine the md_file based on the possible id
323:             if rev
324:                 possibles = find_revision(rev)
325:                 # done looking for matches, see if there's more than one and warn
326:                 if possibles.length > 1
327:                     UI.failure :constraint, "More than one revision matches that name:"
328:                     possibles.each do |rev, id|
329:                         puts "#{rev} -- #{id}"
330:                     end
331:                 elsif possibles.length == 1
332:                     # found the revision
333:                     id = possibles[0][1]
334:                 else
335:                     UI.failure :search, "Could not find the requested revision #{rev}"
336:                 end
337:             elsif id
338:                 if not find_meta_data(id)
339:                     UI.failure :input, "Given id #{id} is not in the repository"
340:                     id = nil  # unset id since it's bogus
341:                 end
342:             else
343:                 id = self['Path'].pop
344:             end
345:             
346:             return id
347:         end