monotone

monotone Mtn Source Tree

Root/selectors.hh

1// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10#ifndef __SELECTORS_HH__
11#define __SELECTORS_HH__
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 expand_selector, which is just like the
35// first overload of complete() except that it produces no progress messages
36// or usage errors. The only place where this is currently still
37// in use is automate select.
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
43#endif // __SELECTORS_HH__
44
45// Local Variables:
46// mode: C++
47// fill-column: 76
48// c-file-style: "gnu"
49// indent-tabs-mode: nil
50// End:
51// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

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