##// END OF EJS Templates
identify: add template support...
identify: add template support This is based on a patch proposed last year by Mathias De Maré[1], with a few changes. - Tags and bookmarks are now formatted lists, for more flexible queries. - The templater is populated whether or not [-nibtB] is specified. (Plain output is unchanged.) This seems more consistent with other templated commands. - The 'id' property is a string, instead of a list. - The parents of 'wdir()' have their own list of attributes. I left 'id' as a string because it seems very useful for generating version info. It's also a bit strange because the value and meaning changes depending on whether or not --debug is passed (short vs full hash), whether the revision is a merge or not (one hash or two, separated by a '+'), the working directory or not (node vs p1node), and local or not (remote defaults to tip, and never has '+'). The equivalent string built with {rev} seems much less useful, and I couldn't think of a reasonable name, so I left it out. The discussion seemed to be pointing towards having a list of nodes, with more than one entry for a merge. It seems simpler to give the nodes a name, and use {node} for the actual commit probed, especially now that there is a virtual node for 'wdir()'. Yuya mentioned using fm.nested() in that thread, so I did for the parent nodes. I'm not sure if the plan is to fill in all of the context attributes in these items, or if these nested items should simply be made {p1node} and {p1rev}. I used ':' as the tag separator for consistency with {tags} in the log templater. Likewise, bookmarks are separated by a space for consistency with the corresponding log template. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-August/087039.html

File last commit:

r31065:7074589c stable
r33051:15a79ac8 default
Show More
test-record.t
91 lines | 2.6 KiB | text/troff | Tads3Lexer
Matt Mackall
tests: fix a bunch of pointless #s in unified tests
r12328 Set up a repo
Dan Villiom Podlaski Christiansen
tests: unify test-record
r12074
Yuya Nishihara
tests: write hgrc of more than two lines by using shell heredoc...
r23172 $ cat <<EOF >> $HGRCPATH
> [ui]
> interactive = true
> [extensions]
> record =
> EOF
Dan Villiom Podlaski Christiansen
tests: unify test-record
r12074
$ hg init a
$ cd a
Laurent Charignon
record: remove duplicated tests...
r24308 Record help
$ hg record -h
hg record [OPTION]... [FILE]...
interactively select changes to commit
timeless
minirst: change hgrole to use single quotes...
r27729 If a list of files is omitted, all changes reported by 'hg status' will be
Laurent Charignon
record: remove duplicated tests...
r24308 candidates for recording.
timeless
minirst: change hgrole to use single quotes...
r27729 See 'hg help dates' for a list of formats valid for -d/--date.
Laurent Charignon
record: remove duplicated tests...
r24308
eloimorlaas
record: update help to describe ui.interface...
r31065 If using the text interface (see 'hg help config'), you will be prompted
for whether to record changes to each modified file, and for files with
multiple changes, for each change to use. For each query, the following
responses are possible:
Laurent Charignon
record: remove duplicated tests...
r24308
y - record this change
n - skip this change
e - edit this change manually
s - skip remaining changes to this file
f - record remaining changes to this file
d - done, skip remaining changes and files
a - record all changes to all remaining files
q - quit, recording no changes
? - display help
This command is not available when committing a merge.
timeless
help: use single quotes in use warning
r29974 (use 'hg help -e record' to show help for the record extension)
Pierre-Yves David
record: deprecate the extension...
r28697
Laurent Charignon
record: remove duplicated tests...
r24308 options ([+] can be repeated):
Pierre-Yves David
help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now...
r30152 -A --addremove mark new/missing files as added/removed before
committing
--close-branch mark a branch head as closed
--amend amend the parent of the working directory
-s --secret use the secret phase for committing
-e --edit invoke editor on commit messages
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-m --message TEXT use text as commit message
-l --logfile FILE read commit message from file
-d --date DATE record the specified date as commit date
-u --user USER record the specified user as committer
-S --subrepos recurse into subrepositories
-w --ignore-all-space ignore white space when comparing lines
-b --ignore-space-change ignore changes in the amount of white space
-B --ignore-blank-lines ignore changes whose lines are all blank
Laurent Charignon
record: remove duplicated tests...
r24308
(some details hidden, use --verbose to show complete help)
Dan Villiom Podlaski Christiansen
tests: unify test-record
r12074 Select no files
$ touch empty-rw
$ hg add empty-rw
$ hg record empty-rw<<EOF
> n
> EOF
diff --git a/empty-rw b/empty-rw
new file mode 100644
Mads Kiilerich
ui: show prompt choice if input is not a tty but is forced to be interactive...
r22589 examine changes to 'empty-rw'? [Ynesfdaq?] n
Dan Villiom Podlaski Christiansen
tests: unify test-record
r12074 no changes to record
Philippe Pepiot
record: return code from underlying commit
r30158 [1]
Dan Villiom Podlaski Christiansen
tests: unify test-record
r12074
$ hg tip -p
changeset: -1:000000000000
tag: tip
user:
date: Thu Jan 01 00:00:00 1970 +0000