monotone

monotone Commit Details

Date:2010-11-23 00:53:00 (8 years 6 months ago)
Author:Thomas Keller
Branch:net.venge.monotone
Commit:a69b014519d54982daf0ea0ab54999b3a4e292d3
Parents: 71bb9a1cd28d2709cc13375c4d0d722dcd05cc2e
Message:* cmd_packet.cc: giving get_key_identity the key store sounds

like a good idea...; remove some more dead code there - once
we completed the key identity we know for sure that the key
exists
* tests/dump_private_key: improve the tests by adding some more
test cases and rely on a statically generated key for the test
* NEWS: note the fix
Changes:
Atests/dump_private_key/example.key (full)
MNEWS (1 diff)
Mcmd_packet.cc (1 diff)
Mtests/dump_private_key/__driver__.lua (1 diff)

File differences

NEWS
66
77
88
9
9
1010
1111
1212
1313
14
15
14
15
1616
1717
1818
1919
2020
2121
22
23
24
2225
2326
2427
- in 'mtn conflicts resolve_first interactive', the result
file name now defaults to _MTN/resolutions/<left_path>.
Fixes monotone issue 103.
(fixes monotone issue 103)
New Features
- 'mtn conflicts store' now outputs a count of the conflicts,
and the name of the conflicts file. Fixes monotone issue
108.
and the name of the conflicts file.
(fixes monotone issue 108)
Bugs fixed
- improve help, fix arg indexing in 'conflicts resolve_first'
(fixes monotone issue 101)
- 'mtn privkey' did not recognize private keys solely available
in the key store. this has been fixed.
- add compatibility with Botan 1.9.9 and newer
(fixes monotone issue 104)
cmd_packet.cc
149149
150150
151151
152
152
153
153154
154155
155
156
157
158156
159157
160158
throw usage(execid);
key_identity_info identity;
project.get_key_identity(app.lua,
project.get_key_identity(keys,
app.lua,
typecast_vocab<external_key_name>(idx(args, 0)),
identity);
E(keys.key_pair_exists(identity.id), origin::user,
F("public and private key '%s' do not exist in keystore")
% idx(args, 0)());
packet_writer pw(cout);
keypair kp;
tests/dump_private_key/__driver__.lua
11
2
3
24
35
4
6
7
8
59
6
10
711
8
12
13
14
15
16
917
10
18
1119
20
21
22
23
check(get("example.key"))
mtn_setup()
check(mtn("au", "generate_key", "foo@bar.com", "bla"), 0, false, false)
check(mtn("read"), 0, false, false, { "example.key" })
-- fetch by name
check(mtn("privkey", "foo@bar.com"), 0, true, false)
check(qgrep("\\[keypair foo@bar.com\\]", "stdout"))
check(samefile("example.key", "stdout"))
-- check without a database or workspace
-- fetch by id
check(mtn("privkey", "d081c00cf730ee673d3d75e5a8262e2fec11a23f"), 0, true, false)
check(samefile("example.key", "stdout"))
-- fetch with absent database and workspace
check(nodb_mtn("privkey", "--no-workspace", "foo@bar.com"), 0, true, false)
check(qgrep("\\[keypair foo@bar.com\\]", "stdout"))
check(samefile("example.key", "stdout"))
-- fetch non-existant key
check(mtn("privkey", "blabla"), 1, false, true)
check(qgrep("there is no key named 'blabla'", "stderr"))
tests/dump_private_key/example.key
1
2
3
4
[keypair foo@bar.com]
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/1lKw9RlaEXsDW8sD7BFQriFQQY9BerXWRr3YmEbvIRhY0yP2Fz5mly/BN4/httONBrmfu/yS6m3s/+YbvLdHvpn/sKwr1h9XD8PQTwbeRyerQbSqI92xRLcGOEmOil+paMP0MuQi61DRqeJlXANqJTpEoTqVV3DYWSqMIUh+tQIDAQAB#
LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUNkd0lCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQW1Fd2dnSmRBZ0VBQW9HQkFML1dVckQxR1ZvUmV3TmIKeXdQc0VWQ3VJVkJCajBGNnRkWkd2ZGlZUnU4aEdGalRJL1lYUG1hWEw4RTNqK0cyMDQwR3VaKzcvSkxxYmV6Lwo1aHU4dDBlK21mK3dyQ3ZXSDFjUHc5QlBCdDVISjZ0QnRLb2ozYkZFdHdZNFNZNktYNmxvdy9ReTVDTHJVTkdwCjRtVmNBMm9sT2tTaE9wVlhjTmhaS293aFNINjFBZ01CQUFFQ2dZQWlucGZ2clZ1MDRHQzF1M1FJc2lweHgrcmwKSTkrcGJtNndTN1hwQjVvTmY0aDRSeW8vTi9TZjZQcktRSytyaVNYbVZtZGJSejZPZU5YN3BqYXRuTUhxVlQ3UgpyelRpS21EdU1ub0FnbFpHbDkrWnRlaWVoc1l2Q29pYUNBNlM4WWZxOHZrMlk0cUZER2VSU2hGZkowL3FyY3k0Ci9wMEh5SzU5UkcvQmQwMHRZUUpCQU1pa2hjN2VwcUp0d1BYOU04emdIV3VmMnJETXdQSDRvYVd4UTEvbVBEc04KSlI2UGxPTGtacVl3aFJYdkU3eGhsR3VIeHVRMy9tbkNrOHc3UnR5Njdua0NRUUQwdzkzTDdiNEQ4Ui91QVNtVgo4SjZuazlDMDM1YjBuM21mOEhpeUVBSW5teVgyTEhiQ2dVcTkyYzZGNlBJbkVOcXdOVFpOSCtPSnBzZVNXSEtYCmpKTWRBa0VBdHZtQ3BYTmExMG5yN09qcDhtNTNwZ3h6clVRc3VQNGF2RFg1MFZ6dmxKS2FSVkovWHFNWUVYcXkKQTV5eGpOd1lOQy93YTNPODZjbnVheE9ydmVRalVRSkJBS3RRUS9jdDZXYjg1Nm8vNmdsbUpzV0hzZlpHNEhOTApBMmVzZWUyM1FxclI3cG9FdVFLZVY5L1ZpTFUxTy9lWDFsaXFoZDBwU3FyWHJxdUJlSU1XQXdrQ1FIZWdHZ2ZKCi9ocUZzVDRuL2tZSnhTN0VjYmtzdjVSTUZMalBJeEdzbmNYOUdORjZHcHNSaG1uV1FNVm9tdytqQVlhZVpQZVMKd0haU3A2aUF6OHkvai9ZPQotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==
[end]

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status