monotone

monotone Mtn Source Tree

Root/selectors.hh

1#ifndef __SELECTORS_HH__
2#define __SELECTORS_HH__
3
4// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
5//
6// This program is made available under the GNU GPL version 2.0 or
7// greater. See the accompanying file COPYING for details.
8//
9// This program is distributed WITHOUT ANY WARRANTY; without even the
10// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11// PURPOSE.
12
13#include "vocab.hh"
14#include <set>
15
16class options;
17class lua_hooks;
18class project_t;
19
20// In the normal case, to expand a selector on the command line, use one of
21// these functions: the former if the selector can legitimately expand to
22// more than one revision, the latter if it shouldn't. Both treat a
23// selector that expands to zero revisions, or a nonexistent revision, as an
24// usage error, and generate progress messages when expanding selectors.
25
26void complete(options const & opts, lua_hooks & lua,
27 project_t & project, std::string const & str,
28 std::set<revision_id> & completions);
29
30void complete(options const & opts, lua_hooks & lua,
31 project_t & project, std::string const & str,
32 revision_id & completion);
33
34// For extra control, use these functions. expand_selector is just like the
35// first overload of complete() except that it produces no progress messages
36// or usage errors. diagnose_ambiguous_expansion generates the canonical
37// usage error if the set it is handed has more than one element.
38
39void expand_selector(options const & opts, lua_hooks & lua,
40 project_t & project, std::string const & str,
41 std::set<revision_id> & completions);
42
43void diagnose_ambiguous_expansion(project_t & project, std::string const & str,
44 std::set<revision_id> const & completions);
45
46
47// Local Variables:
48// mode: C++
49// fill-column: 76
50// c-file-style: "gnu"
51// indent-tabs-mode: nil
52// End:
53// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
54
55#endif // __SELECTORS_HH__

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status