1 /*
2  * ====================================================================
3  * Copyright (c) 2002-2009 The RapidSvn Group.  All rights reserved.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program (in the file GPL.txt.
17  * If not, see <http://www.gnu.org/licenses/>.
18  *
19  * This software consists of voluntary contributions made by many
20  * individuals.  For exact contribution history, see the revision
21  * history and logs, available at http://rapidsvn.tigris.org/.
22  * ====================================================================
23  */
24 
25 #ifndef _SVNCPP_WC_HPP_
26 #define _SVNCPP_WC_HPP_
27 
28 // svncpp
29 #include "kdevsvncpp/revision.hpp"
30 
31 
32 namespace svn
33 {
34   // forward declarations
35   class Path;
36 
37   /**
38    * Class that deals with a working copy
39    */
40   class Wc
41   {
42   public:
43     /**
44      * check if Path is a valid working directory
45      *
46      * @param dir path to a directory
47      * @return true=valid working copy
48      */
49     static bool
50     checkWc(const char * dir);
51 
52     static bool
53     checkWc(const Path & dir);
54 
55     /**
56      * ensure that an administrative area exists for @a dir, so that @a dir
57      * is a working copy subdir based on @a url at @a revision.
58      *
59      * @param dir path to a directory
60      * @param url corresponding url
61      * @param revision expected working copy revision
62      */
63     static void
64     ensureAdm(const char * dir, const char * uuid,
65               const char * url, const Revision & revision);
66 
67     /**
68      * use \a dir as name for the subversion administrative directory
69      * instead of the standard ".svn"
70      */
71     static void
72     setAdmDir(const char * dir);
73 
74     /**
75      * checks whether @a name is an administrative directory
76      *
77      * @remarks @a name may only be a filename, not an absolute path
78      */
79     static bool
80     isAdmDir(const char * name);
81 
82   private:
83   };
84 }
85 
86 #endif
87 /* -----------------------------------------------------------------
88  * local variables:
89  * eval: (load-file "../../rapidsvn-dev.el")
90  * end:
91  */
92