mercurial/logcmdutil.py
changeset 45472 07324227f6b7
parent 45471 a03fde1077ce
child 45473 5f0eeda2005d
equal deleted inserted replaced
45471:a03fde1077ce 45472:07324227f6b7
   696             for f in match.files():
   696             for f in match.files():
   697                 # No idea if the path was a directory at that revision, so
   697                 # No idea if the path was a directory at that revision, so
   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                     continue
   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:
   710                     # If the file exists, it may be a directory, so let it
   705                     # If the file exists, it may be a directory, so let it
   711                     # take the slow path.
   706                     # take the slow path.
   720                             )
   715                             )
   721                             % f
   716                             % f
   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                     )
   728         else:
   725         else:
   729             for f in match.files():
   726             for f in match.files():