[PATCH 3 of 5] cmdutil: reword cannot follow parent revision message
timeless at mozdev.org
timeless at mozdev.org
Thu Oct 15 16:05:38 CDT 2015
# HG changeset patch
# User timeless at mozdev.org
# Date 1444856672 14400
# Wed Oct 14 17:04:32 2015 -0400
# Node ID 31bdbd8519204c15d79d92a8290bc2f48eba8914
# Parent ea351d6956fc625aa471724ca273615af8bcfafb
cmdutil: reword cannot follow parent revision message
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1658,8 +1658,9 @@
for filename in match.files():
if follow:
if filename not in pctx:
- raise error.Abort(_('cannot follow file not in parent '
- 'revision: "%s"') % filename)
+ # this is not tested
+ raise error.Abort(_('cannot follow parent revision '
+ 'does not have file: "%s"') % filename)
yield filename, pctx[filename].filenode()
else:
yield filename, None
@@ -1976,8 +1977,8 @@
slowpath = True
continue
else:
- raise error.Abort(_('cannot follow file not in parent '
- 'revision: "%s"') % f)
+ raise error.Abort(_('cannot follow parent revision '
+ 'does not have file: "%s"') % f)
filelog = repo.file(f)
if not filelog:
# A zero count may be a directory or deleted file, so
diff --git a/tests/test-glog.t b/tests/test-glog.t
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -1650,9 +1650,9 @@
Test --follow on a non-existent directory
$ testlog -f dir
- abort: cannot follow file not in parent revision: "dir"
- abort: cannot follow file not in parent revision: "dir"
- abort: cannot follow file not in parent revision: "dir"
+ abort: cannot follow parent revision does not have file: "dir"
+ abort: cannot follow parent revision does not have file: "dir"
+ abort: cannot follow parent revision does not have file: "dir"
Test --follow on a directory
@@ -1676,9 +1676,9 @@
Test --follow on file not in parent revision
$ testlog -f a
- abort: cannot follow file not in parent revision: "a"
- abort: cannot follow file not in parent revision: "a"
- abort: cannot follow file not in parent revision: "a"
+ abort: cannot follow parent revision does not have file: "a"
+ abort: cannot follow parent revision does not have file: "a"
+ abort: cannot follow parent revision does not have file: "a"
Test --follow and patterns
diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -101,7 +101,7 @@
-f, non-existent directory
$ hg log -f dir
- abort: cannot follow file not in parent revision: "dir"
+ abort: cannot follow parent revision does not have file: "dir"
[255]
-f, directory
More information about the Mercurial-devel
mailing list