~svn/ubuntu/oneiric/subversion/ppa

« back to all changes in this revision

Viewing changes to tools/bdb/erase-all-text-data.py

  • Committer: Max Bowsher
  • Date: 2012-06-27 12:25:12 UTC
  • mfrom: (44.1.46 precise)
  • Revision ID: _@maxb.eu-20120627122512-kmo8fj0lr7mlkppj
Make tree identical to precise branch.

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
# Erases the text of every file in a BDB repository
4
24
#
5
25
 
24
44
  print("Do not proceed unless this is a *COPY* of your real repository")
25
45
  print("If this is really what you want to do, " \
26
46
      "type 'YESERASE' and press Return")
27
 
  confirmation = raw_input("Confirmation string> ")
 
47
  if sys.version_info[0] >= 3:
 
48
    # Python >=3.0
 
49
    confirmation = input("Confirmation string> ")
 
50
  else:
 
51
    # Python <3.0
 
52
    confirmation = raw_input("Confirmation string> ")
28
53
  if confirmation != "YESERASE":
29
54
    print("Cancelled - confirmation string not matched")
30
55
    sys.exit(0)