Show More
@@ -914,20 +914,20 b' def _follow(repo, subset, x, name, follo' | |||
|
914 | 914 | c = repo['.'] |
|
915 | 915 | if l: |
|
916 | 916 | x = getstring(l[0], _("%s expected a pattern") % name) |
|
917 | rev = None | |
|
917 | revs = [None] | |
|
918 | 918 | if len(l) >= 2: |
|
919 | 919 | revs = getset(repo, fullreposet(repo), l[1]) |
|
920 |
if |
|
|
920 | if not revs: | |
|
921 | 921 | raise error.RepoLookupError( |
|
922 |
|
|
|
923 | rev = revs.last() | |
|
924 | c = repo[rev] | |
|
925 | matcher = matchmod.match(repo.root, repo.getcwd(), [x], | |
|
926 | ctx=repo[rev], default='path') | |
|
927 | ||
|
928 | files = c.manifest().walk(matcher) | |
|
929 | ||
|
930 |
fctxs |
|
|
922 | _("%s expected at least one starting revision") % name) | |
|
923 | fctxs = [] | |
|
924 | for r in revs: | |
|
925 | ctx = mctx = repo[r] | |
|
926 | if r is None: | |
|
927 | ctx = repo['.'] | |
|
928 | m = matchmod.match(repo.root, repo.getcwd(), [x], | |
|
929 | ctx=mctx, default='path') | |
|
930 | fctxs.extend(ctx[f].introfilectx() for f in ctx.manifest().walk(m)) | |
|
931 | 931 | s = dagop.filerevancestors(fctxs, followfirst) |
|
932 | 932 | else: |
|
933 | 933 | s = dagop.revancestors(repo, baseset([c.rev()]), followfirst) |
@@ -732,6 +732,19 b' log -r "follow(\'set:grep(b2)\', 4)"' | |||
|
732 | 732 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
733 | 733 | summary: b2 |
|
734 | 734 | |
|
735 | ||
|
736 | follow files starting from multiple revisions: | |
|
737 | ||
|
738 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', 2+3+4)" | |
|
739 | 3: b1 | |
|
740 | 4: b2 | |
|
741 | ||
|
742 | follow files starting from empty revision: | |
|
743 | ||
|
744 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', .-.)" | |
|
745 | abort: follow expected at least one starting revision! | |
|
746 | [255] | |
|
747 | ||
|
735 | 748 | $ hg up -qC 4 |
|
736 | 749 | |
|
737 | 750 | log -f -r null |
General Comments 0
You need to be logged in to leave comments.
Login now