Show More
@@ -698,12 +698,7 b' def _makematcher(repo, revs, pats, opts)' | |||||
698 | # take the slow path. |
|
698 | # take the slow path. | |
699 | if any(f not in c for c in startctxs): |
|
699 | if any(f not in c for c in startctxs): | |
700 | slowpath = True |
|
700 | slowpath = True | |
701 |
|
|
701 | break | |
702 | filelog = repo.file(f) |
|
|||
703 | if not filelog: |
|
|||
704 | raise error.Abort( |
|
|||
705 | _(b'cannot follow nonexistent file: "%s"') % f |
|
|||
706 | ) |
|
|||
707 | elif follow: |
|
702 | elif follow: | |
708 | for f in match.files(): |
|
703 | for f in match.files(): | |
709 | if f not in wctx: |
|
704 | if f not in wctx: | |
@@ -722,6 +717,8 b' def _makematcher(repo, revs, pats, opts)' | |||||
722 | ) |
|
717 | ) | |
723 | filelog = repo.file(f) |
|
718 | filelog = repo.file(f) | |
724 | if not filelog: |
|
719 | if not filelog: | |
|
720 | # A file exists in wdir but not in history, which means | |||
|
721 | # the file isn't committed yet. | |||
725 | raise error.Abort( |
|
722 | raise error.Abort( | |
726 | _(b'cannot follow nonexistent file: "%s"') % f |
|
723 | _(b'cannot follow nonexistent file: "%s"') % f | |
727 | ) |
|
724 | ) |
@@ -2295,15 +2295,21 b' follow files from wdir' | |||||
2295 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
2295 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
2296 |
|
2296 | |||
2297 |
|
2297 | |||
2298 | BROKEN: added file should exist in wdir |
|
|||
2299 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f2 |
|
2298 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f2 | |
2300 | abort: cannot follow nonexistent file: "d1/f2" |
|
2299 | == 2147483647 == | |
2301 | [255] |
|
2300 | d1/f2 | 1 + | |
2302 |
|
2301 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
2303 | BROKEN: copied file should exist in wdir |
|
2302 | ||
|
2303 | ||||
2304 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat f1-copy |
|
2304 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat f1-copy | |
2305 | abort: cannot follow nonexistent file: "f1-copy" |
|
2305 | == 2147483647 == | |
2306 | [255] |
|
2306 | f1-copy | 1 + | |
|
2307 | 1 files changed, 1 insertions(+), 0 deletions(-) | |||
|
2308 | ||||
|
2309 | == 0 == | |||
|
2310 | d1/f1 | 1 + | |||
|
2311 | 1 files changed, 1 insertions(+), 0 deletions(-) | |||
|
2312 | ||||
2307 |
|
2313 | |||
2308 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat notfound |
|
2314 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat notfound | |
2309 | notfound: $ENOENT$ |
|
2315 | notfound: $ENOENT$ |
General Comments 0
You need to be logged in to leave comments.
Login now