##// END OF EJS Templates
match: resolve filesets in subrepos for commands given the '-S' argument...
match: resolve filesets in subrepos for commands given the '-S' argument This will work for any command that creates its matcher via scmutil.match(), but only the files command is tested here (both workingctx and basectx based tests). The previous behavior was to completely ignore the files in the subrepo, even though -S was given. My first attempt was to teach context.walk() to optionally recurse, but once that was in place and the complete file list was built up, the predicate test would fail with 'path in nested repo' when a file in a subrepo was accessed through the parent context. There are two slightly surprising behaviors with this functionality. First, any path provided inside the fileset isn't narrowed when it is passed to the subrepo. I dont see any clean way to do that in the matcher. Fortunately, the 'subrepo()' fileset is the only one to take a path. The second surprise is that status predicates are resolved against the subrepo, not the parent like 'hg status -S' is. I don't see any way to fix that either, given the path auditor error mentioned above.

File last commit:

r24715:1439bacf default
r25122:755d23a4 default
Show More
map
174 lines | 4.3 KiB | text/plain | TextLexer
Gregory Szorc
templates: add a stub template for json...
r24544 mimetype = 'application/json'
filerevision = '"not yet implemented"'
search = '"not yet implemented"'
Gregory Szorc
json: implement {shortlog} and {changelog} templates...
r24588 # changelog and shortlog are the same web API but with different
# number of entries.
changelog = changelist.tmpl
shortlog = changelist.tmpl
changelistentry = '\{
"node": {node|json},
"date": {date|json},
"desc": {desc|json},
"bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
"tags": [{join(tags%changelistentryname, ", ")}],
"user": {author|json}
}'
changelistentryname = '{name|json}'
Gregory Szorc
json: implement {changeset} template...
r24563 changeset = '\{
"node": {node|json},
"date": {date|json},
"desc": {desc|json},
"branch": {if(branch, branch%changesetbranch, "default"|json)},
"bookmarks": [{join(changesetbookmark, ", ")}],
"tags": [{join(changesettag, ", ")}],
"user": {author|json},
Gregory Szorc
hgweb: add phase to {changeset} template...
r24564 "parents": [{join(parent%changesetparent, ", ")}],
"phase": {phase|json}
Gregory Szorc
json: implement {changeset} template...
r24563 }'
changesetbranch = '{name|json}'
changesetbookmark = '{bookmark|json}'
changesettag = '{tag|json}'
changesetparent = '{node|json}'
Gregory Szorc
json: implement {manifest} template...
r24589 manifest = '\{
"node": {node|json},
"abspath": {path|json},
"directories": [{join(dentries%direntry, ", ")}],
"files": [{join(fentries%fileentry, ", ")}],
"bookmarks": [{join(bookmarks%name, ", ")}],
"tags": [{join(tags%name, ", ")}]
}'
name = '{name|json}'
direntry = '\{
"abspath": {path|json},
"basename": {basename|json},
"emptydirs": {emptydirs|json}
}'
fileentry = '\{
"abspath": {file|json},
"basename": {basename|json},
"date": {date|json},
"size": {size|json},
"flags": {permissions|json}
}'
Gregory Szorc
json: implement {tags} template...
r24545 tags = '\{
"node": {node|json},
"tags": [{join(entriesnotip%tagentry, ", ")}]
}'
tagentry = '\{
"tag": {tag|json},
"node": {node|json},
"date": {date|json}
}'
Gregory Szorc
json: implement {bookmarks} template
r24546 bookmarks = '\{
"node": {node|json},
"bookmarks": [{join(entries%bookmarkentry, ", ")}]
}'
bookmarkentry = '\{
"bookmark": {bookmark|json},
"node": {node|json},
"date": {date|json}
}'
Gregory Szorc
json: implement {branches} template
r24547 branches = '\{
"branches": [{join(entries%branchentry, ", ")}]
}'
branchentry = '\{
"branch": {branch|json},
"node": {node|json},
"date": {date|json},
"status": {status|json}
}'
Gregory Szorc
templates: add a stub template for json...
r24544 summary = '"not yet implemented"'
Gregory Szorc
json: implement {filediff} template...
r24713 filediff = '\{
"path": {file|json},
"node": {node|json},
"date": {date|json},
"desc": {desc|json},
"author": {author|json},
"parents": [{join(parent%changesetparent, ", ")}],
"children": [{join(child%changesetparent, ", ")}],
"diff": [{join(diff%diffblock, ", ")}]
}'
diffblock = '\{
"blockno": {blockno|json},
"lines": [{join(lines, ", ")}]
}'
difflineplus = '\{
"t": "+",
"n": {lineno|json},
"l": {line|json}
}'
difflineminus = '\{
"t": "-",
"n": {lineno|json},
"l": {line|json}
}'
difflineat = '\{
"t": "@",
"n": {lineno|json},
"l": {line|json}
}'
diffline = '\{
"t": "",
"n": {lineno|json},
"l": {line|json}
}'
Gregory Szorc
json: implement {comparison} template...
r24714 filecomparison = '\{
"path": {file|json},
"node": {node|json},
"date": {date|json},
"desc": {desc|json},
"author": {author|json},
"parents": [{join(parent%changesetparent, ", ")}],
"children": [{join(child%changesetparent, ", ")}],
"leftnode": {leftnode|json},
"rightnode": {rightnode|json},
"comparison": [{join(comparison, ", ")}]
}'
comparisonblock = '\{
"lines": [{join(lines, ", ")}]
}'
comparisonline = '\{
"t": {type|json},
"ln": {leftlineno|json},
"ll": {leftline|json},
"rn": {rightlineno|json},
"rl": {rightline|json}
}'
Gregory Szorc
json: implement {fileannotate} template
r24715 fileannotate = '\{
"abspath": {file|json},
"node": {node|json},
"author": {author|json},
"date": {date|json},
"desc": {desc|json},
"parents": [{join(parent%changesetparent, ", ")}],
"children": [{join(child%changesetparent, ", ")}],
"permissions": {permissions|json},
"annotate": [{join(annotate%fileannotation, ", ")}]
}'
fileannotation = '\{
"node": {node|json},
"author": {author|json},
"desc": {desc|json},
"abspath": {file|json},
"targetline": {targetline|json},
"line": {line|json},
"lineno": {lineno|json},
"revdate": {revdate|json}
}'
Gregory Szorc
templates: add a stub template for json...
r24544 filelog = '"not yet implemented"'
graph = '"not yet implemented"'
Gregory Szorc
json: implement {helptopics} template
r24590 helptopics = '\{
"topics": [{join(topics%helptopicentry, ", ")}],
"earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
"othercommands": [{join(othercommands%helptopicentry, ", ")}]
}'
helptopicentry = '\{
"topic": {topic|json},
"summary": {summary|json}
}'
Gregory Szorc
json: implement {help} template...
r24591 help = '\{
"topic": {topic|json},
"rawdoc": {doc|json}
}'
Gregory Szorc
templates: add a stub template for json...
r24544 filenodelink = ''
filenolink = ''