~bzr/ubuntu/maverick/bzr-svn/bzr-ppa

« back to all changes in this revision

Viewing changes to tree.py

  • Committer: Jelmer Vernooij
  • Date: 2008-05-11 19:29:26 UTC
  • mfrom: (220.36.144 0.4)
  • Revision ID: jelmer@samba.org-20080511192926-7mh02j45r25qmzkz
Merge 0.4 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
 
# the Free Software Foundation; either version 2 of the License, or
 
5
# the Free Software Foundation; either version 3 of the License, or
6
6
# (at your option) any later version.
7
7
 
8
8
# This program is distributed in the hope that it will be useful,
53
53
                raise errors.InvalidExternalsDescription()
54
54
            ret[pts[0]] = (int(pts[1][2:]), urlutils.join(base_url, pts[2]))
55
55
        elif len(pts) == 2:
 
56
            if pts[1].startswith("//"):
 
57
                raise NotImplementedError("Relative to the scheme externals not yet supported")
 
58
            if pts[1].startswith("^/"):
 
59
                raise NotImplementedError("Relative to the repository root externals not yet supported")
56
60
            ret[pts[0]] = (None, urlutils.join(base_url, pts[1]))
57
61
        else:
58
62
            raise errors.InvalidExternalsDescription()
171
175
        return file_id
172
176
 
173
177
    def change_dir_prop(self, id, name, value, pool):
174
 
        from mapping import (SVN_PROP_BZR_ANCESTRY, 
175
 
                        SVN_PROP_BZR_PREFIX, SVN_PROP_BZR_REVISION_INFO, 
176
 
                        SVN_PROP_BZR_FILEIDS, SVN_PROP_BZR_REVISION_ID,
177
 
                        SVN_PROP_BZR_BRANCHING_SCHEME, SVN_PROP_BZR_MERGE)
178
 
 
179
178
        if name == svn.core.SVN_PROP_ENTRY_COMMITTED_REV:
180
179
            self.dir_revnum[id] = int(value)
181
180
        elif name == svn.core.SVN_PROP_IGNORE:
182
181
            self.dir_ignores[id] = value
183
 
        elif name.startswith(SVN_PROP_BZR_ANCESTRY):
184
 
            if id != self.tree._inventory.root.file_id:
185
 
                mutter('%r set on non-root dir!' % name)
186
 
                return
187
 
        elif name in (SVN_PROP_BZR_FILEIDS, SVN_PROP_BZR_BRANCHING_SCHEME):
188
 
            if id != self.tree._inventory.root.file_id:
189
 
                mutter('%r set on non-root dir!' % name)
190
 
                return
191
182
        elif name in (svn.core.SVN_PROP_ENTRY_COMMITTED_DATE,
192
183
                      svn.core.SVN_PROP_ENTRY_LAST_AUTHOR,
193
184
                      svn.core.SVN_PROP_ENTRY_LOCK_TOKEN,
196
187
            pass
197
188
        elif name.startswith(svn.core.SVN_PROP_WC_PREFIX):
198
189
            pass
199
 
        elif (name == SVN_PROP_BZR_REVISION_INFO or 
200
 
              name.startswith(SVN_PROP_BZR_REVISION_ID)):
201
 
            pass
202
 
        elif name == SVN_PROP_BZR_MERGE:
203
 
            pass
204
 
        elif (name.startswith(svn.core.SVN_PROP_PREFIX) or
205
 
              name.startswith(SVN_PROP_BZR_PREFIX)):
 
190
        elif name.startswith(svn.core.SVN_PROP_PREFIX):
206
191
            mutter('unsupported dir property %r' % name)
207
192
 
208
193
    def change_file_prop(self, id, name, value, pool):
209
 
        from mapping import SVN_PROP_BZR_PREFIX
210
 
 
211
194
        if name == svn.core.SVN_PROP_EXECUTABLE:
212
195
            self.is_executable = (value != None)
213
196
        elif name == svn.core.SVN_PROP_SPECIAL:
224
207
            pass
225
208
        elif name.startswith(svn.core.SVN_PROP_WC_PREFIX):
226
209
            pass
227
 
        elif (name.startswith(svn.core.SVN_PROP_PREFIX) or
228
 
              name.startswith(SVN_PROP_BZR_PREFIX)):
 
210
        elif name.startswith(svn.core.SVN_PROP_PREFIX):
229
211
            mutter('unsupported file property %r' % name)
230
212
 
231
213
    def add_file(self, path, parent_id, copyfrom_path, copyfrom_revnum, baton):