Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 49287:127d33e63d1a
branching: merge stable into default
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 08 Jun 2022 15:46:04 +0200 |
parents | 63fd0282ad40 3b102efde517 |
children | 6dbe74669eba |
comparison
equal
deleted
inserted
replaced
49286:c6a3243567b6 | 49287:127d33e63d1a |
---|---|
1336 return subset & rs | 1336 return subset & rs |
1337 | 1337 |
1338 | 1338 |
1339 @predicate(b'nodefromfile(path)') | 1339 @predicate(b'nodefromfile(path)') |
1340 def nodefromfile(repo, subset, x): | 1340 def nodefromfile(repo, subset, x): |
1341 """ | 1341 """Read a list of nodes from the file at `path`. |
1342 An alias for ``::.`` (ancestors of the working directory's first parent). | 1342 |
1343 If file pattern is specified, the histories of files matching given | 1343 This applies `id(LINE)` to each line of the file. |
1344 pattern in the revision given by startrev are followed, including copies. | 1344 |
1345 This is useful when the amount of nodes you need to specify gets too large | |
1346 for the command line. | |
1345 """ | 1347 """ |
1346 path = getstring(x, _(b"nodefromfile require a file path")) | 1348 path = getstring(x, _(b"nodefromfile require a file path")) |
1347 listed_rev = set() | 1349 listed_rev = set() |
1348 try: | 1350 try: |
1349 with pycompat.open(path, 'rb') as f: | 1351 with pycompat.open(path, 'rb') as f: |