Changeset c1b5ab8a847e…
Parent 8555910bbe48…
by
Changes to one file · Browse files at c1b5ab8a847e Showing diff from parent 8555910bbe48 Diff from another changeset...
@@ -229,9 +229,9 @@ try:
# Some commands create repositories, and thus must create
# new ui() instances. For those, we monkey-patch ui.ui()
- # as briefly as possible
+ # as briefly as possible (till Mercurial 1.2)
origui = None
- if self.args[0] in ('clone', 'init'):
+ if self.args[0] in ('clone', 'init') and not hasattr(self.ui, 'copy'):
origui = ui.ui
ui.ui = GtkUi
try:
@@ -381,7 +381,9 @@ if cmd not in commands.norepo.split():
try:
repo = hg.repository(ui, path=path)
- repo.ui = ui
+ if not hasattr(ui, 'copy'):
+ #Mercurial 1.2
+ repo.ui = ui
ui.setconfig("bundle", "mainreporoot", repo.root)
if not repo.local():
raise util.Abort(_("repository '%s' is not local") % path)
|
Loading...