##// END OF EJS Templates
subrepo: change arguments of abstractsubrepo.__init__ (API)...
FUJIWARA Katsunori -
r24671:98ab035e default
parent child Browse files
Show More
@@ -378,8 +378,18 b' def newcommitphase(ui, ctx):'
378
378
379 class abstractsubrepo(object):
379 class abstractsubrepo(object):
380
380
381 def __init__(self, ui):
381 def __init__(self, ctx, path):
382 self.ui = ui
382 """Initialize abstractsubrepo part
383
384 ``ctx`` is the context referring this subrepository in the
385 parent repository.
386
387 ``path`` is the path to this subrepositiry as seen from
388 innermost repository.
389 """
390 self.ui = ctx.repo().ui
391 self._ctx = ctx
392 self._path = path
383
393
384 def storeclean(self, path):
394 def storeclean(self, path):
385 """
395 """
@@ -544,10 +554,8 b' class abstractsubrepo(object):'
544
554
545 class hgsubrepo(abstractsubrepo):
555 class hgsubrepo(abstractsubrepo):
546 def __init__(self, ctx, path, state):
556 def __init__(self, ctx, path, state):
547 super(hgsubrepo, self).__init__(ctx.repo().ui)
557 super(hgsubrepo, self).__init__(ctx, path)
548 self._path = path
549 self._state = state
558 self._state = state
550 self._ctx = ctx
551 r = ctx.repo()
559 r = ctx.repo()
552 root = r.wjoin(path)
560 root = r.wjoin(path)
553 create = not r.wvfs.exists('%s/.hg' % path)
561 create = not r.wvfs.exists('%s/.hg' % path)
@@ -938,10 +946,8 b' class hgsubrepo(abstractsubrepo):'
938
946
939 class svnsubrepo(abstractsubrepo):
947 class svnsubrepo(abstractsubrepo):
940 def __init__(self, ctx, path, state):
948 def __init__(self, ctx, path, state):
941 super(svnsubrepo, self).__init__(ctx.repo().ui)
949 super(svnsubrepo, self).__init__(ctx, path)
942 self._path = path
943 self._state = state
950 self._state = state
944 self._ctx = ctx
945 self._exe = util.findexe('svn')
951 self._exe = util.findexe('svn')
946 if not self._exe:
952 if not self._exe:
947 raise util.Abort(_("'svn' executable not found for subrepo '%s'")
953 raise util.Abort(_("'svn' executable not found for subrepo '%s'")
@@ -1168,10 +1174,8 b' class svnsubrepo(abstractsubrepo):'
1168
1174
1169 class gitsubrepo(abstractsubrepo):
1175 class gitsubrepo(abstractsubrepo):
1170 def __init__(self, ctx, path, state):
1176 def __init__(self, ctx, path, state):
1171 super(gitsubrepo, self).__init__(ctx.repo().ui)
1177 super(gitsubrepo, self).__init__(ctx, path)
1172 self._state = state
1178 self._state = state
1173 self._ctx = ctx
1174 self._path = path
1175 self._relpath = os.path.join(reporelpath(ctx.repo()), path)
1179 self._relpath = os.path.join(reporelpath(ctx.repo()), path)
1176 self._abspath = ctx.repo().wjoin(path)
1180 self._abspath = ctx.repo().wjoin(path)
1177 self._subparent = ctx.repo()
1181 self._subparent = ctx.repo()
General Comments 0
You need to be logged in to leave comments. Login now