~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

Viewing changes to tools/examples/getfile.py

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
#
 
3
#
 
4
# Licensed to the Apache Software Foundation (ASF) under one
 
5
# or more contributor license agreements.  See the NOTICE file
 
6
# distributed with this work for additional information
 
7
# regarding copyright ownership.  The ASF licenses this file
 
8
# to you under the Apache License, Version 2.0 (the
 
9
# "License"); you may not use this file except in compliance
 
10
# with the License.  You may obtain a copy of the License at
 
11
#
 
12
#   http://www.apache.org/licenses/LICENSE-2.0
 
13
#
 
14
# Unless required by applicable law or agreed to in writing,
 
15
# software distributed under the License is distributed on an
 
16
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
17
# KIND, either express or implied.  See the License for the
 
18
# specific language governing permissions and limitations
 
19
# under the License.
 
20
#
 
21
#
 
22
#
3
23
# USAGE: getfile.py [-r REV] repos-path file
4
24
#
5
25
# gets a file from an SVN repository, puts it to sys.stdout
28
48
 
29
49
  root = fs.revision_root(fsob, rev)
30
50
  file = fs.file_contents(root, filename)
31
 
  while 1:
 
51
  while True:
32
52
    data = core.svn_stream_read(file, CHUNK_SIZE)
33
53
    if not data:
34
54
      break