[PATCH 2 of 2 V2] subrepo: add _gitmissing checks where needed
Mathias De Maré
mathias.demare at gmail.com
Thu Feb 26 18:50:22 UTC 2015
# HG changeset patch
# User Mathias De Maré <mathias.demare at gmail.com>
# Date 1424847016 -3600
# Wed Feb 25 07:50:16 2015 +0100
# Node ID d04da423afaf121d7cd19dfbac86097609f6563e
# Parent ad021801d5dcef705a942c638430cf1a83ef2e4d
subrepo: add _gitmissing checks where needed
Some commands did not yet check if the git repository was present.
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1602,6 +1602,8 @@
@annotatesubrepoerror
def cat(self, match, prefix, **opts):
+ if self._gitmissing():
+ return 1
rev = self._state[1]
if match.anypats():
return 1 #No support for include/exclude yet
@@ -1659,6 +1661,8 @@
@annotatesubrepoerror
def diff(self, ui, diffopts, node2, match, prefix, **opts):
+ if self._gitmissing():
+ return
node1 = self._state[1]
cmd = ['diff']
if opts['stat']:
More information about the Mercurial-devel
mailing list