Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hglib: skip unnecessary tweaks for mercurial > 1.2

A new repo has a ui with the same class as the baseui

Changeset c1b5ab8a847e

Parent 8555910bbe48

by Simon Heimberg

Changes to one file · Browse files at c1b5ab8a847e Showing diff from parent 8555910bbe48 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​hglib.py Stacked
 
229
230
231
232
 
233
234
 
235
236
237
 
381
382
383
384
 
 
 
385
386
387
 
229
230
231
 
232
233
 
234
235
236
237
 
381
382
383
 
384
385
386
387
388
389
@@ -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)