Change the format of the revprops block sent in svnserve for
[svn.git] / subversion / libsvn_subr / lock.c
blob571e8d8fa667e18470115138d1831cf671ebb1a5
1 /*
2 * lock.c: routines for svn_lock_t objects.
4 * ====================================================================
5 * Copyright (c) 2000-2005 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 /* ==================================================================== */
23 /*** Includes. ***/
25 #include <apr_strings.h>
27 #include "svn_types.h"
30 /*** Code. ***/
32 svn_lock_t *
33 svn_lock_create(apr_pool_t *pool)
35 return apr_pcalloc(pool, sizeof(svn_lock_t));
38 svn_lock_t *
39 svn_lock_dup(const svn_lock_t *lock, apr_pool_t *pool)
41 svn_lock_t *new_l = apr_palloc(pool, sizeof(*new_l));
43 *new_l = *lock;
45 new_l->path = apr_pstrdup(pool, new_l->path);
46 new_l->token = apr_pstrdup(pool, new_l->token);
47 new_l->owner = apr_pstrdup(pool, new_l->owner);
48 if (new_l->comment)
49 new_l->comment = apr_pstrdup(pool, new_l->comment);
51 return new_l;