-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log: give hint when user forgets "-r"
Summary: I do this myself a lot. The "cannot follow file not in parent revision" error isn't very clear that you passed a revision instead of a file name. Add a hint that suggests "-r ..." and "-r ... -f". Reviewed By: sggutier Differential Revision: D54873788 fbshipit-source-id: 97549118b87b0553a54ed044ea2d9331d04e5294
- Loading branch information
1 parent
883251e
commit a4c337a
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#debugruntest-compatible | ||
|
||
$ configure modernclient | ||
$ setconfig tweakdefaults.logdefaultfollow=true | ||
|
||
$ newclientrepo | ||
$ drawdag <<EOS | ||
> B | ||
> | | ||
> A | ||
> EOS | ||
$ hg go -q $B | ||
|
||
$ hg log tip | ||
abort: cannot follow file not in parent revision: "tip" | ||
(did you mean "hg log -r 'tip'", or "hg log -r 'tip' -f" to follow history?) | ||
[255] | ||
|
||
$ hg log -r 'tip' | ||
commit: 112478962961 | ||
user: test | ||
date: Thu Jan 01 00:00:00 1970 +0000 | ||
summary: B | ||
|
||
$ hg log -r 'tip' -f | ||
commit: 112478962961 | ||
user: test | ||
date: Thu Jan 01 00:00:00 1970 +0000 | ||
summary: B | ||
|
||
commit: 426bada5c675 | ||
user: test | ||
date: Thu Jan 01 00:00:00 1970 +0000 | ||
summary: A |