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
=== modified file 'Makefile'
--- Makefile 2016-08-03 17:10:01 +0000
+++ Makefile 2018-06-25 18:03:37 +0000
@@ -11,9 +11,9 @@
11test: test2 test3 flake811test: test2 test3 flake8
1212
13test3: examples-sign13test3: examples-sign
14 $(TENV) nosetests3 -v tests/14 SIMPLESTREAMS_BZR=1 $(TENV) nosetests3 -v tests/
15test2: examples-sign15test2: examples-sign
16 $(TENV) nosetests -v tests/16 SIMPLESTREAMS_BZR=1 $(TENV) nosetests -v tests/
1717
18flake8:18flake8:
19 # any means run via 'flake8' or 'python3 -m flake8'19 # any means run via 'flake8' or 'python3 -m flake8'
2020
=== modified file 'README.txt'
--- README.txt 2013-05-07 17:25:58 +0000
+++ README.txt 2018-06-25 18:03:37 +0000
@@ -1,52 +1,11 @@
1== Intro ==1****************************************************************************
2This is a documentation, examples, a python library and some tools for2** Simplestreams has moved its development from bzr to git. **
3interacting with simple streams format.3** **
44** If you are seeing this message, it means you have checked out via bzr. **
5The intent of simple streams format is to make well formated data available5** Please update your workflow to use git. Instead of **
6about "products".6** bzr branch lp:simplestreams **
77** use: **
8There is more documentation in doc/README.8** git clone https://git.launchpad.net/simplestreams **
9There are examples in examples/.9** **
1010** This bzr repository is expected to be removed by 2018-07-31 **
11== Simple Streams Getting Started ==11****************************************************************************
12
13= Mirroring ==
14To mirror one source (http or file) to a local directory, see tools/do-mirror.
15For example, to mirror the 'foocloud' example content, do:
16 ./tools/tenv do-mirror examples/foocloud/ my.out streams/v1/index.json
17
18That will create a full mirror in my.out/.
19
20 ./tools/tenv do-mirror --mirror=http://download.cirros-cloud.net/ \
21 --max=1 examples/cirros/ cirros.mirror/
22
23That will create a mirror of cirros data in cirros.mirror, with only
24the latest file from each product.
25
26= Hooks =
27To use the "command hooks mirror" for invoking commands to synchronize, between
28one source and another, see bin/sstream-sync.
29
30For an example, the following runs the debug hook against the example 'foocloud'
31data:
32 ./tools/tenv sstream-sync --hook=hook-debug \
33 --path=streams/v1/index.json examples/foocloud/
34
35You can also run it with cloud-images.ubuntu.com data like this:
36
37 ./tools/tenv sstream-sync \
38 --item-skip-download --hook=./tools/hook-debug \
39 --path=streams/v1/index.sjson http://cloud-images.ubuntu.com/releases/
40
41The 'hook-debug' program simply outputs the data it is invoked with. It does
42not actually mirror anything.
43
44
45== Glance ==
46Example mirror of a download image source to glance with swift serving
47a localized image-id format:
48
49./tools/sstream-mirror-glance --region=RegionOne \
50 --cloud-name=localcloud "--content-id=localcloud.%(region)s:partners" \
51 --output-swift=published/ --max=1 --name-prefix="ubuntu/" \
52 http://cloud-images.ubuntu.com/releases/ streams/v1/index.json
5312
=== modified file 'simplestreams/__init__.py'
--- simplestreams/__init__.py 2013-03-15 21:10:58 +0000
+++ simplestreams/__init__.py 2018-06-25 18:03:37 +0000
@@ -1,1 +1,16 @@
1import os
2
3_readme = os.path.join(os.path.dirname(__file__), "..", "README.txt")
4if os.path.exists(_readme):
5 from datetime import date
6 import warnings
7 with open(_readme, "r") as fp:
8 content = fp.read()
9 if (not os.environ.get("SIMPLESTREAMS_BZR") and
10 date.today() > date(2018, 7, 31)):
11 raise DeprecationWarning("\n" + content)
12 else:
13 warnings.showwarning("\n" + content, UserWarning,
14 filename=None, lineno=None, line=False)
15
1# vi: ts=4 expandtab16# vi: ts=4 expandtab
217
=== modified file 'tox.ini'
--- tox.ini 2017-10-24 13:38:58 +0000
+++ tox.ini 2018-06-25 18:03:37 +0000
@@ -4,6 +4,7 @@
4[testenv]4[testenv]
5setenv =5setenv =
6 GNUPGHOME={toxinidir}/gnupg6 GNUPGHOME={toxinidir}/gnupg
7 SIMPLESTREAMS_BZR=1
7commands = 8commands =
8 {toxinidir}/tools/create-gpgdir9 {toxinidir}/tools/create-gpgdir
9 {toxinidir}/tools/sign-examples10 {toxinidir}/tools/sign-examples

Subscribers

People subscribed via source and target branches

to all changes: