##// END OF EJS Templates
rhg: fix `hg cat` interaction with null revision...
Arseniy Alekseyev -
r49050:f8dc7871 default
parent child Browse files
Show More
@@ -133,6 +133,9 b' impl Revlog {'
133 /// Returns the node ID for the given revision number, if it exists in this
133 /// Returns the node ID for the given revision number, if it exists in this
134 /// revlog
134 /// revlog
135 pub fn node_from_rev(&self, rev: Revision) -> Option<&Node> {
135 pub fn node_from_rev(&self, rev: Revision) -> Option<&Node> {
136 if rev == NULL_REVISION {
137 return Some(&NULL_NODE);
138 }
136 Some(self.index.get_entry(rev)?.hash())
139 Some(self.index.get_entry(rev)?.hash())
137 }
140 }
138
141
@@ -129,8 +129,8 b' Specifying revisions by changeset ID'
129 $ $NO_FALLBACK rhg cat -r d file-2
129 $ $NO_FALLBACK rhg cat -r d file-2
130 2
130 2
131 $ $NO_FALLBACK rhg cat -r 0000 file-2
131 $ $NO_FALLBACK rhg cat -r 0000 file-2
132 abort: invalid revision identifier: 0000
132 file-2: no such file in rev 000000000000
133 [255]
133 [1]
134
134
135 Cat files
135 Cat files
136 $ cd $TESTTMP
136 $ cd $TESTTMP
General Comments 0
You need to be logged in to leave comments. Login now