monotone

monotone Commit Details

Date:2007-03-12 06:11:51 (12 years 3 months ago)
Author:Derek Scherger
Branch:net.venge.monotone.experiment.commands-with-dashes
Commit:54d945669dd3d57b33066657f8be845b0081a65c
Parents: 82acc28b5e418bc0ac7352b80be3469e897436b1
Message: * replace underscores with dashes in remaining automate commands

Changes:
Mautomate.cc (20 diffs)
Mcmd_automate.cc (1 diff)
Mcmd_diff_log.cc (2 diffs)
Mcmd_files.cc (2 diffs)
Mmonotone.texi (22 diffs)
Mtestsuite.lua (2 diffs)

File differences

automate.cc
167167
168168
169169
170
170
171171
172172
173173
......
342342
343343
344344
345
345
346346
347347
348348
......
847847
848848
849849
850
850
851851
852852
853853
......
946946
947947
948948
949
949
950950
951951
952952
......
968968
969969
970970
971
971
972972
973973
974974
......
10021002
10031003
10041004
1005
1005
10061006
10071007
10081008
......
10751075
10761076
10771077
1078
1078
10791079
10801080
10811081
......
11291129
11301130
11311131
1132
1132
11331133
11341134
11351135
......
11551155
11561156
11571157
1158
1158
11591159
11601160
11611161
......
11881188
11891189
11901190
1191
1191
11921192
11931193
11941194
......
14501450
14511451
14521452
1453
1453
14541454
14551455
14561456
......
14581458
14591459
14601460
1461
1461
14621462
14631463
14641464
......
14901490
14911491
14921492
1493
1493
14941494
14951495
14961496
......
15071507
15081508
15091509
1510
1510
15111511
15121512
15131513
......
15451545
15461546
15471547
1548
1548
15491549
15501550
15511551
......
15671567
15681568
15691569
1570
1570
15711571
15721572
15731573
......
16061606
16071607
16081608
1609
1609
16101610
16111611
16121612
......
16611661
16621662
16631663
1664
1664
16651665
16661666
16671667
......
17491749
17501750
17511751
1752
1752
17531753
17541754
17551755
......
17731773
17741774
17751775
1776
1776
17771777
17781778
17791779
}
// Name: erase_ancestors
// Name: erase-ancestors
// Arguments:
// 0 or more: revision ids
// Added in: 0.1
output << (*i).inner()() << '\n';
}
// Name: ancestry_difference
// Name: ancestry-difference
// Arguments:
// 1: a revision id
// 0 or more further arguments: also revision ids
}
}
// Name: get_revision
// Name: get-revision
// Arguments:
// 1: a revision id (optional, determined from the workspace if
// non-existant)
output.write(dat.inner()().data(), dat.inner()().size());
}
// Name: get_base_revision_id
// Name: get-base-revision-id
// Arguments: none
// Added in: 2.0
// Purpose: Prints the revision id the current workspace is based
output << parent_id(parents.begin()) << '\n';
}
// Name: get_current_revision_id
// Name: get-current-revision-id
// Arguments: none
// Added in: 2.0
// Purpose: Prints the revision id of the current workspace. This is the
output << new_revision_id << '\n';
}
// Name: get_manifest_of
// Name: get-manifest-of
// Arguments:
// 1: a revision id (optional, determined from the workspace if not given)
// Added in: 2.0
}
// Name: packet_for_rdata
// Name: packet-for-rdata
// Arguments:
// 1: a revision id
// Added in: 2.0
pw.consume_revision_cert(idx(certs,i));
}
// Name: packet_for_fdata
// Name: packet-for-fdata
// Arguments:
// 1: a file id
// Added in: 2.0
pw.consume_file_data(f_id,f_data);
}
// Name: packet_for_fdelta
// Name: packet-for-fdelta
// Arguments:
// 1: a file id
// 2: a file id
pw.consume_file_delta(f_old_id, f_new_id, file_delta(del));
}
// Name: common_ancestors
// Name: common-ancestors
// Arguments:
// 1 or more revision ids
// Added in: 2.1
}
// Name: get_option
// Name: get-option
// Arguments:
// 1: an options name
// Added in: 3.1
//
// Output format: A string
//
// Sample output (for 'mtn automate get_option branch:
// Sample output (for 'mtn automate get-option branch:
// net.venge.monotone
//
AUTOMATE(get_option, N_("OPTION"), options::opts::none)
N(false, F("'%s' is not a recognized workspace option") % opt);
}
// Name: get_content_changed
// Name: get-content-changed
// Arguments:
// 1: a revision ID
// 2: a file name
//
// 'content_mark'
// the hexadecimal id of the revision the content mark is attached to
// Sample output (for 'mtn automate get_content_changed 3bccff99d08421df72519b61a4dded16d1139c33 ChangeLog):
// Sample output (for 'mtn automate get-content-changed 3bccff99d08421df72519b61a4dded16d1139c33 ChangeLog):
// content_mark [276264b0b3f1e70fc1835a700e6e61bdbe4c3f2f]
//
AUTOMATE(get_content_changed, N_("REV FILE"), options::opts::none)
output.write(prt.buf.data(), prt.buf.size());
}
// Name: get_corresponding_path
// Name: get-corresponding-path
// Arguments:
// 1: a source revision ID
// 2: a file name (in the source revision)
// 'file'
// the file name corresponding to "file name" (arg 2) in the target revision
//
// Sample output (for automate get_corresponding_path 91f25c8ee830b11b52dd356c925161848d4274d0 foo2 dae0d8e3f944c82a9688bcd6af99f5b837b41968; see automate_get_corresponding_path test)
// Sample output (for automate get-corresponding-path 91f25c8ee830b11b52dd356c925161848d4274d0 foo2 dae0d8e3f944c82a9688bcd6af99f5b837b41968; see automate_get_corresponding_path test)
// file "foo"
AUTOMATE(get_corresponding_path, N_("REV1 FILE REV2"), options::opts::none)
{
output.write(prt.buf.data(), prt.buf.size());
}
// Name: put_file
// Name: put-file
// Arguments:
// base FILEID (optional)
// file contents (binary, intended for automate stdio use)
output << sha1sum << '\n';
}
// Name: put_revision
// Name: put-revision
// Arguments:
// revision-data
// Added in: 4.1
guard.commit();
}
// Name: db_set
// Name: db-set
// Arguments:
// variable domain
// variable name
app.db.set_var(key, var_value(value()));
}
// Name: db_get
// Name: db-get
// Arguments:
// variable domain
// variable name
cmd_automate.cc
7575
7676
7777
78
78
7979
8080
8181
static string const interface_version = "4.1";
// Name: interface_version
// Name: interface-version
// Arguments: none
// Added in: 0.0
// Purpose: Prints version of automation interface. Major number increments
cmd_diff_log.cc
332332
333333
334334
335
335
336336
337337
338338
......
512512
513513
514514
515
515
516516
517517
518518
dump_diffs(cs, app, new_is_archived, output, dummy);
}
// common functionality for diff and automate content_diff to determine
// common functionality for diff and automate content-diff to determine
// revisions and rosters which should be diffed
static void
prepare_diff(cset & included,
}
// Name: content_diff
// Name: content-diff
// Arguments:
// (optional) one or more files to include
// Added in: 4.0
cmd_files.cc
266266
267267
268268
269
269
270270
271271
272272
......
285285
286286
287287
288
288
289289
290290
291291
dump_file(cout, app, rid, idx(args, 0));
}
// Name: get_file
// Name: get-file
// Arguments:
// 1: a file id
// Added in: 1.0
dump_file(output, app, ident);
}
// Name: get_fileof
// Name: get-file-of
// Arguments:
// 1: a filename
//
monotone.texi
15621562
15631563
15641564
1565
1565
15661566
15671567
15681568
......
36243624
36253625
36263626
3627
3627
36283628
36293629
36303630
......
36523652
36533653
36543654
3655
3656
3657
3655
3656
3657
36583658
36593659
36603660
......
36663666
36673667
36683668
3669
3669
36703670
36713671
36723672
......
36873687
36883688
36893689
3690
3691
3692
3693
3690
3691
3692
3693
36943694
36953695
36963696
......
52345234
52355235
52365236
5237
5237
52385238
52395239
52405240
52415241
52425242
52435243
5244
5245
5244
5245
52465246
52475247
52485248
......
52505250
52515251
52525252
5253
5253
52545254
52555255
52565256
......
55455545
55465546
55475547
5548
5548
55495549
55505550
55515551
......
56585658
56595659
56605660
5661
5661
56625662
56635663
56645664
......
58615861
58625862
58635863
5864
5864
58655865
58665866
58675867
......
59435943
59445944
59455945
5946
5946
59475947
59485948
59495949
......
69926992
69936993
69946994
6995
6995
69966996
69976997
69986998
......
72137213
72147214
72157215
7216
7216
72177217
72187218
72197219
......
72527252
72537253
72547254
7255
7255
72567256
72577257
72587258
......
73177317
73187318
73197319
7320
7320
73217321
73227322
73237323
......
73547354
73557355
73567356
7357
7357
73587358
73597359
73607360
......
74777477
74787478
74797479
7480
7480
74817481
74827482
74837483
......
75307530
75317531
75327532
7533
7533
75347534
75357535
75367536
......
75437543
75447544
75457545
7546
7546
75477547
75487548
75497549
......
75597559
75607560
75617561
7562
7562
75637563
75647564
75657565
......
75797579
75807580
75817581
7582
7582
75837583
75847584
75857585
75867586
75877587
7588
7588
75897589
75907590
75917591
......
76787678
76797679
76807680
7681
7681
76827682
76837683
76847684
@smallexample
@group
$ mtn automate get_base_revision_id
$ mtn automate get-base-revision-id
2e24d49a48adf9acf3a1b6391a080008cbef9c21
@end group
@end smallexample
@smallexample
@group
$ mtn -d A automate get_revision a423db0ad651c74e41ab2529eca6f17513ccf714
$ mtn -d A automate get-revision a423db0ad651c74e41ab2529eca6f17513ccf714
format_version "1"
new_manifest [b6dbdbbe0e7f41e44d9b72f9fe29b1f1a4f47f18]
@smallexample
@group
mtn -d A automate packet_for_fdata 8714e0ef31edb00e33683f575274379955b3526c > PACKETS
mtn -d A automate packet_for_rdata a423db0ad651c74e41ab2529eca6f17513ccf714 >> PACKETS
mtn -d A automate packets_for_certs a423db0ad651c74e41ab2529eca6f17513ccf714 >> PACKETS
mtn -d A automate packet-for-fdata 8714e0ef31edb00e33683f575274379955b3526c > PACKETS
mtn -d A automate packet-for-rdata a423db0ad651c74e41ab2529eca6f17513ccf714 >> PACKETS
mtn -d A automate packets-for-certs a423db0ad651c74e41ab2529eca6f17513ccf714 >> PACKETS
mtn -d B read < PACKETS
@end group
@end smallexample
@smallexample
@group
mtn -d A automate get_revision d14e89582ad9030e1eb62f563c8721be02ca0b65
mtn -d A automate get-revision d14e89582ad9030e1eb62f563c8721be02ca0b65
format_version "1"
new_manifest [48a03530005d46ed9c31c8f83ad96c4fa22b8b28]
@smallexample
@group
mtn -d A automate packet_for_fdata d2178687226560032947c1deacb39d16a16ea5c6 > PACKETS2
mtn -d A automate packet_for_fdelta 8714e0ef31edb00e33683f575274379955b3526c 8b52d96d4fab6c1e56d6364b0a2673f4111b228e >> PACKETS2
mtn -d A automate packet_for_rdata d14e89582ad9030e1eb62f563c8721be02ca0b65 >> PACKETS2
mtn -d A automate packets_for_certs d14e89582ad9030e1eb62f563c8721be02ca0b65 >> PACKETS2
mtn -d A automate packet-for-fdata d2178687226560032947c1deacb39d16a16ea5c6 > PACKETS2
mtn -d A automate packet-for-fdelta 8714e0ef31edb00e33683f575274379955b3526c 8b52d96d4fab6c1e56d6364b0a2673f4111b228e >> PACKETS2
mtn -d A automate packet-for-rdata d14e89582ad9030e1eb62f563c8721be02ca0b65 >> PACKETS2
mtn -d A automate packets-for-certs d14e89582ad9030e1eb62f563c8721be02ca0b65 >> PACKETS2
mtn -d B read < PACKETS2
@end group
@end smallexample
data items around manually.
@ftable @command
@itemx mtn automate packets_for_certs @var{id}
@itemx mtn automate packets-for-certs @var{id}
This command prints out an @code{rcert} packet for each cert in your
database associated with @var{id}. These can be used to transport
certificates safely between monotone databases. See @ref{Automation}
for details of this command.
@item mtn automate packet_for_fdata @var{id}
@itemx mtn automate packet_for_rdata @var{id}
@item mtn automate packet-for-fdata @var{id}
@itemx mtn automate packet-for-rdata @var{id}
These commands print out an @code{fdata} or @code{rdata} packet for
the file, manifest or revision @var{id} in your database. These can
between monotone databases. See @ref{Automation} for details of these
commands.
@item mtn automate packet_for_fdelta @var{id1} @var{id2}
@item mtn automate packet-for-fdelta @var{id1} @var{id2}
This command prints out an @code{fdelta} packet for the differences
between file versions @var{id1} and @var{id2}, in your database.
@ftable @command
@item mtn automate interface_version
@item mtn automate interface-version
@table @strong
@item Arguments:
@end table
@item mtn automate common_ancestors @var{rev1} [@var{rev2} [...]]
@item mtn automate common-ancestors @var{rev1} [@var{rev2} [...]]
@table @strong
@item Arguments:
@end table
@item mtn automate erase_ancestors [@var{rev1} [@var{rev2} [...]]]
@item mtn automate erase-ancestors [@var{rev1} [@var{rev2} [...]]]
@table @strong
@item Arguments:
@end table
@item mtn automate ancestry_difference @var{new} [@var{old1} [@var{old2} [...]]]
@item mtn automate ancestry-difference @var{new} [@var{old1} [@var{old2} [...]]]
@table @strong
@item Arguments:
@end table
@item mtn automate content_diff [--revision=@var{id1} [--revision=@var{id2}]] [@var{files} ...]
@item mtn automate content-diff [--revision=@var{id1} [--revision=@var{id2}]] [@var{files} ...]
@table @strong
@item Arguments:
@end table
@item mtn automate packet_for_rdata @var{id}
@item mtn automate packet-for-rdata @var{id}
@table @strong
@item Arguments:
@end table
@item mtn automate packet_for_certs @var{id}
@item mtn automate packet-for-certs @var{id}
@table @strong
@item Arguments:
@end table
@item mtn automate packet_for_fdata @var{id}
@item mtn automate packet-for-fdata @var{id}
@table @strong
@item Arguments:
@end table
@item mtn automate packet_for_fdelta @var{from-id} @var{to-id}
@item mtn automate packet-for-fdelta @var{from-id} @var{to-id}
@table @strong
@item Arguments:
@end table
@item mtn automate db_get @var{domain} @var{name}
@item mtn automate db-get @var{domain} @var{name}
@table @strong
@item Arguments:
@item Sample usage:
@verbatim
mtn automate db_set database default-server off.net
mtn automate db-set database default-server off.net
@end verbatim
@item Output format:
@end table
@item mtn automate put_file [@var{base-id}] @var{contents}
@item mtn automate put-file [@var{base-id}] @var{contents}
@table @strong
@item Arguments:
@item Purpose:
Preparation of a workspace-less commit.
See also @command{automate put_revision}. Normally used via
See also @command{automate put-revision}. Normally used via
@command{automate stdio}.
@item Sample output:
@end table
@item mtn automate put_revision @var{revision-data}
@item mtn automate put-revision @var{revision-data}
@table @strong
@item Arguments:
@var{revision-data} is the new revision. See example below. Note that
the new_manifest entry is ignored -- @command{put_revision} will
the new_manifest entry is ignored -- @command{put-revision} will
ignore whatever you put here and calculate the correct manifest id
itself. (However, for now, you must put 40 hex digits here -- it's
just that which particular digits you put are entirely irrelevant.
@section RCS
@ftable @command
@item mtn rcs_import @var{filename...}
@item mtn rcs-import @var{filename...}
This command imports all the file versions in each RCS file listed in
@var{filename...}. These files should be raw RCS files, ending in
testsuite.lua
155155
156156
157157
158
158
159159
160160
161161
......
190190
191191
192192
193
193
194194
195195
196196
197197
198198
199
199
200200
201201
202202
end
function base_manifest()
check(safe_mtn("automate", "get_manifest_of", base_revision()), 0, false)
check(safe_mtn("automate", "get-manifest-of", base_revision()), 0, false)
check(copy("ts-stdout", "base_manifest_temp"))
return sha1("base_manifest_temp")
end
end
if mt == nil then mt = mtn end
check(mt("automate", "get_manifest_of", base_revision()), 0, true, false)
check(mt("automate", "get-manifest-of", base_revision()), 0, true, false)
rename("stdout", "paths-new")
remove("_MTN.old")
rename("_MTN", "_MTN.old")
check(mt("automate", "get_manifest_of", rev), 0, true, false)
check(mt("automate", "get-manifest-of", rev), 0, true, false)
rename("stdout", "paths-old")
-- remove all of the files and dirs in this

Archive Download the corresponding diff file

Branches

Tags

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