subrepo: handle diff with working copy
We cannot unconditionally call bin(node2) since node2 is None when
comparing with the working copy.
--- a/mercurial/subrepo.py Fri Sep 10 22:52:00 2010 +0200
+++ b/mercurial/subrepo.py Fri Sep 10 23:53:49 2010 +0200
@@ -307,7 +307,8 @@
node1 = node.bin(self._state[1])
# We currently expect node2 to come from substate and be
# in hex format
- node2 = node.bin(node2)
+ if node2 is not None:
+ node2 = node.bin(node2)
cmdutil.diffordiffstat(self._repo.ui, self._repo, diffopts,
node1, node2, match,
prefix=os.path.join(prefix, self._path),