Skip to content

Commit 2cf43ec

Browse files
aldbrclaude
authored andcommitted
fix: consolidate dirac-dms-add-file help into single Usage/Arguments blocks
The module docstring used two 'Usage:' / 'Arguments:' blocks separated by '**OR**'. LocalConfiguration.setUsageMessage only keeps the FIRST match of each block (re.search), so the second invocation form and the LocalFile argument were dropped from both the --help output and the generated docs. Merge both invocation forms into one Usage block and all arguments into one Arguments block so nothing is lost. Closes #7290 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a1dc25d commit 2cf43ec

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

src/DIRAC/DataManagementSystem/scripts/dirac_dms_add_file.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,24 @@
44
# Author : Stuart Paterson
55
########################################################################
66
"""
7-
Upload a file to the grid storage and register it in the File Catalog
7+
Upload a file to the grid storage and register it in the File Catalog.
88
9-
Usage:
10-
dirac-dms-add-file [options] ... LFN Path SE [GUID]
11-
12-
Arguments:
13-
LFN: Logical File Name
14-
Path: Local path to the file
15-
SE: DIRAC Storage Element
16-
GUID: GUID to use in the registration (optional)
17-
18-
**OR**
9+
The file(s) to upload can be passed either directly as arguments, or listed in a
10+
local text file given as the only argument (one upload per line).
1911
2012
Usage:
13+
dirac-dms-add-file [options] ... LFN Path SE [GUID]
2114
dirac-dms-add-file [options] ... LocalFile ...
2215
2316
Arguments:
24-
LocalFile: Path to local file containing all the above, i.e.::
25-
26-
lfn1 localfile1 SE [GUID1]
27-
lfn2 localfile2 SE [GUID2]
17+
LFN: Logical File Name
18+
Path: Local path to the file
19+
SE: DIRAC Storage Element
20+
GUID: GUID to use in the registration (optional)
21+
LocalFile: Path to a local file listing the uploads described above, one per line, i.e.::
22+
23+
lfn1 localfile1 SE [GUID1]
24+
lfn2 localfile2 SE [GUID2]
2825
2926
Example:
3027
$ dirac-dms-add-file LFN:/formation/user/v/vhamar/Example.txt Example.txt DIRAC-USER

0 commit comments

Comments
 (0)