Merge lp:~smoser/simplestreams/trunk.deprecated-bzr into lp:simplestreams

Proposed by Scott Moser
Status: Merged
Merged at revision: 461
Proposed branch: lp:~smoser/simplestreams/trunk.deprecated-bzr
Merge into: lp:simplestreams
Diff against target: 116 lines (+29/-54)
4 files modified
Makefile (+2/-2)
README.txt (+11/-52)
simplestreams/__init__.py (+15/-0)
tox.ini (+1/-0)
To merge this branch: bzr merge lp:~smoser/simplestreams/trunk.deprecated-bzr
Reviewer Review Type Date Requested Status
Philip Roche Approve
simplestreams-dev Pending
Review via email: mp+348485@code.launchpad.net

Commit message

Warn on usage of checked out bzr.

This supplies a UserWarning until 2018-07-31 to inform the user
that they've used bzr from the wrong place.
After that it raises DeprecationWarning.

If neeed, adding SIMPLESTREAMS_BZR=1 to the environment will
turn this error into a warning.

To post a comment you must log in.
Revision history for this message
Philip Roche (philroche) wrote :

+1

review: Approve
Revision history for this message
Scott Moser (smoser) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2016-08-03 17:10:01 +0000
3+++ Makefile 2018-06-25 18:03:37 +0000
4@@ -11,9 +11,9 @@
5 test: test2 test3 flake8
6
7 test3: examples-sign
8- $(TENV) nosetests3 -v tests/
9+ SIMPLESTREAMS_BZR=1 $(TENV) nosetests3 -v tests/
10 test2: examples-sign
11- $(TENV) nosetests -v tests/
12+ SIMPLESTREAMS_BZR=1 $(TENV) nosetests -v tests/
13
14 flake8:
15 # any means run via 'flake8' or 'python3 -m flake8'
16
17=== modified file 'README.txt'
18--- README.txt 2013-05-07 17:25:58 +0000
19+++ README.txt 2018-06-25 18:03:37 +0000
20@@ -1,52 +1,11 @@
21-== Intro ==
22-This is a documentation, examples, a python library and some tools for
23-interacting with simple streams format.
24-
25-The intent of simple streams format is to make well formated data available
26-about "products".
27-
28-There is more documentation in doc/README.
29-There are examples in examples/.
30-
31-== Simple Streams Getting Started ==
32-
33-= Mirroring ==
34-To mirror one source (http or file) to a local directory, see tools/do-mirror.
35-For example, to mirror the 'foocloud' example content, do:
36- ./tools/tenv do-mirror examples/foocloud/ my.out streams/v1/index.json
37-
38-That will create a full mirror in my.out/.
39-
40- ./tools/tenv do-mirror --mirror=http://download.cirros-cloud.net/ \
41- --max=1 examples/cirros/ cirros.mirror/
42-
43-That will create a mirror of cirros data in cirros.mirror, with only
44-the latest file from each product.
45-
46-= Hooks =
47-To use the "command hooks mirror" for invoking commands to synchronize, between
48-one source and another, see bin/sstream-sync.
49-
50-For an example, the following runs the debug hook against the example 'foocloud'
51-data:
52- ./tools/tenv sstream-sync --hook=hook-debug \
53- --path=streams/v1/index.json examples/foocloud/
54-
55-You can also run it with cloud-images.ubuntu.com data like this:
56-
57- ./tools/tenv sstream-sync \
58- --item-skip-download --hook=./tools/hook-debug \
59- --path=streams/v1/index.sjson http://cloud-images.ubuntu.com/releases/
60-
61-The 'hook-debug' program simply outputs the data it is invoked with. It does
62-not actually mirror anything.
63-
64-
65-== Glance ==
66-Example mirror of a download image source to glance with swift serving
67-a localized image-id format:
68-
69-./tools/sstream-mirror-glance --region=RegionOne \
70- --cloud-name=localcloud "--content-id=localcloud.%(region)s:partners" \
71- --output-swift=published/ --max=1 --name-prefix="ubuntu/" \
72- http://cloud-images.ubuntu.com/releases/ streams/v1/index.json
73+****************************************************************************
74+** Simplestreams has moved its development from bzr to git. **
75+** **
76+** If you are seeing this message, it means you have checked out via bzr. **
77+** Please update your workflow to use git. Instead of **
78+** bzr branch lp:simplestreams **
79+** use: **
80+** git clone https://git.launchpad.net/simplestreams **
81+** **
82+** This bzr repository is expected to be removed by 2018-07-31 **
83+****************************************************************************
84
85=== modified file 'simplestreams/__init__.py'
86--- simplestreams/__init__.py 2013-03-15 21:10:58 +0000
87+++ simplestreams/__init__.py 2018-06-25 18:03:37 +0000
88@@ -1,1 +1,16 @@
89+import os
90+
91+_readme = os.path.join(os.path.dirname(__file__), "..", "README.txt")
92+if os.path.exists(_readme):
93+ from datetime import date
94+ import warnings
95+ with open(_readme, "r") as fp:
96+ content = fp.read()
97+ if (not os.environ.get("SIMPLESTREAMS_BZR") and
98+ date.today() > date(2018, 7, 31)):
99+ raise DeprecationWarning("\n" + content)
100+ else:
101+ warnings.showwarning("\n" + content, UserWarning,
102+ filename=None, lineno=None, line=False)
103+
104 # vi: ts=4 expandtab
105
106=== modified file 'tox.ini'
107--- tox.ini 2017-10-24 13:38:58 +0000
108+++ tox.ini 2018-06-25 18:03:37 +0000
109@@ -4,6 +4,7 @@
110 [testenv]
111 setenv =
112 GNUPGHOME={toxinidir}/gnupg
113+ SIMPLESTREAMS_BZR=1
114 commands =
115 {toxinidir}/tools/create-gpgdir
116 {toxinidir}/tools/sign-examples

Subscribers

People subscribed via source and target branches

to all changes: