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