subrepo: handle diff with working copy
authorMartin Geisler <mg@lazybytes.net>
Fri, 10 Sep 2010 23:53:49 +0200
changeset 12210 21eb85e9ea94
parent 12209 affec9fb56ef
child 12211 798d72f3621c
subrepo: handle diff with working copy We cannot unconditionally call bin(node2) since node2 is None when comparing with the working copy.
mercurial/subrepo.py
--- 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),