1datalad rerun(1)            General Commands Manual           datalad rerun(1)
2
3
4

NAME

6       datalad rerun - re-execute previous `datalad run` commands.
7

SYNOPSIS

9       datalad  rerun [-h] [--since SINCE] [-d DATASET] [-b NAME] [-m MESSAGE]
10              [--onto   base]   [--script    FILE]    [--report]    [--assume-
11              ready {inputs|outputs|both}] [--explicit] [-J NJOBS] [--version]
12              [REVISION]
13
14
15

DESCRIPTION

17       This will unlock any dataset content that is on  record  to  have  been
18       modified by the command in the specified revision.  It will then re-ex‐
19       ecute the command in the recorded path (if it was inside the  dataset).
20       Afterwards, all modifications will be saved.
21
22   Report mode
23       When  called with --report, this command reports information about what
24       would be re-executed as a series of records. There will be a record for
25       each  revision in the specified revision range. Each of these will have
26       one of the following "rerun_action" values:
27
28       - run: the revision has a recorded command that would be re-executed  -
29       skip-or-pick: the revision does not have a recorded command and would
30         be  either  skipped or cherry picked - merge: the revision is a merge
31       commit and a corresponding merge would
32         be made
33
34       The decision to skip rather than cherry pick a  revision  is  based  on
35       whether the revision would be reachable from HEAD at the time of execu‐
36       tion.
37
38       In addition, when a starting point other than HEAD is specified,  there
39       is  a  rerun_action value "checkout", in which case the record includes
40       information about the revision the would be checked out  before  rerun‐
41       ning any commands.
42
43       NOTE   Currently  the  "onto" feature only sets the working tree of the
44              current dataset to a previous state. The working  trees  of  any
45              subdatasets remain unchanged.
46
47   Examples
48       Re-execute the command from the previous commit::
49
50        % datalad rerun
51
52       Re-execute any commands in the last five commits::
53
54        % datalad rerun --since=HEAD~5
55
56       Do the same as above, but re-execute the commands on top of HEAD~5 in a
57       detached state::
58
59        % datalad rerun --onto= --since=HEAD~5
60
61       Re-execute all previous commands and compare the old and new results::
62
63        % # on master branch
64        % datalad rerun --branch=verify --since=
65        % # now on verify branch
66        % datalad diff --revision=master..
67        % git log --oneline --left-right --cherry-pick master...
68
69

OPTIONS

71       REVISION
72              rerun command(s) in REVISION. By default, the command from  this
73              commit  will be executed, but --since can be used to construct a
74              revision range. The default value is like "HEAD" but resolves to
75              the  main  branch when on an adjusted branch. Constraints: value
76              must be a string or value must be NONE
77
78
79       -h, --help, --help-np
80              show this help message. --help-np forcefully disables the use of
81              a pager for displaying the help message
82
83       --since SINCE
84              If SINCE is a commit-ish, the commands from all commits that are
85              reachable from `revision` but not SINCE will be re-executed  (in
86              other  words, the commands in git log SINCE..REVISION). If SINCE
87              is an empty string, it is set to the parent of the first  commit
88              that  contains a recorded command (i.e., all commands in git log
89              REVISION will be re-executed).  Constraints:  value  must  be  a
90              string or value must be NONE
91
92       -d DATASET, --dataset DATASET
93              specify  the  dataset from which to rerun a recorded command. If
94              no dataset is given, an attempt is made to identify the  dataset
95              based  on  the current working directory. If a dataset is given,
96              the command will be executed  in  the  root  directory  of  this
97              dataset. Constraints: Value must be a Dataset or a valid identi‐
98              fier of a Dataset (e.g. a path) or value must be NONE
99
100       -b NAME, --branch NAME
101              create and checkout this branch before rerunning  the  commands.
102              Constraints: value must be a string or value must be NONE
103
104       -m MESSAGE, --message MESSAGE
105              use MESSAGE for the reran commit rather than the recorded commit
106              message. In the case of a multi-commit rerun, all the reran com‐
107              mits will have this message. Constraints: value must be a string
108              or value must be NONE
109
110       --onto base
111              start point for rerunning the commands. If not  specified,  com‐
112              mands  are  executed at HEAD. This option can be used to specify
113              an alternative start point, which will be checked out  with  the
114              branch  name specified by --branch or in a detached state other‐
115              wise. As a special case, an empty value for  this  option  means
116              the  parent  of  the  first run commit in the specified revision
117              list. Constraints: value must be a string or value must be NONE
118
119       --script FILE
120              extract the commands into FILE rather than rerunning. Use  -  to
121              write  to  stdout  instead.  This  option implies --report. Con‐
122              straints: value must be a string or value must be NONE
123
124       --report
125              Don't actually re-execute anything, just display what  would  be
126              done. Note: If you give this option, you most likely want to set
127              --output-format to 'json' or 'json_pp'.
128
129       --assume-ready {inputs|outputs|both}
130              Assume that inputs do not need to be retrieved and/or outputs do
131              not need to unlocked or removed before running the command. This
132              option allows you to avoid  the  expense  of  these  preparation
133              steps  if you know that they are unnecessary. Note that this op‐
134              tion also affects any additional outputs that are  automatically
135              inferred  based  on  inspecting changed files in the run commit.
136              Constraints: value must be one of ('inputs', 'outputs', 'both')
137
138       --explicit
139              Consider the specification of inputs  and  outputs  in  the  run
140              record  to  be  explicit. Don't warn if the repository is dirty,
141              and only save modifications to the  outputs  from  the  original
142              record.  Note  that when several run commits are specified, this
143              applies to every one. Care should also be taken when using --on‐
144              to  because  checking  out  a  new HEAD can easily fail when the
145              working tree has modifications.
146
147       -J NJOBS, --jobs NJOBS
148              how many parallel jobs (where possible) to  use.  "auto"  corre‐
149              sponds to the number defined by 'datalad.runtime.max-annex-jobs'
150              configuration item NOTE: This option can only parallelize  input
151              retrieval  (get)  and  output recording (save). DataLad does NOT
152              parallelize your scripts for you.  Constraints:  value  must  be
153              convertible to type 'int' or value must be NONE or value must be
154              one of ('auto',)
155
156       --version
157              show the module and its version which provides the command
158

AUTHORS

160        datalad is developed by The DataLad Team and Contributors <team@datal‐
161       ad.org>.
162
163
164
165datalad rerun 0.19.3              2023-08-11                  datalad rerun(1)
Impressum