by
Changes to 7 files · Browse files at 16b2c90fc6a7 Showing diff from parent 8b90089b96ba 5f040a4a8629 Diff from another changeset...
@@ -454,14 +454,16 @@ parents = []
for pctx in pctxs:
highlight = len(pctxs) == 2 and pctx == pctxs[pindex]
- branch = pctx.branch() != ctx.branch() and pctx.branch() or None
+ branch = None
+ if hasattr(pctx, 'branch') and pctx.branch() != ctx.branch():
+ branch = pctx.branch()
parents.append(revline_data(pctx, highlight, branch))
return parents
elif item == 'children':
children = []
for cctx in ctx.children():
branch = None
- if cctx.branch() != ctx.branch():
+ if hasattr(cctx, 'branch') and cctx.branch() != ctx.branch():
branch = cctx.branch()
children.append(revline_data(cctx, branch=branch))
return children
@@ -540,12 +542,19 @@ box.pack_start(link, False, False)
box.pack_start(text, True, True, 4)
return box
+ def genwidget(param):
+ if isinstance(param, basestring):
+ label = gtk.Label()
+ label.set_markup(param)
+ label.set_selectable(True)
+ return label
+ return linkwidget(*param)
if item in ('parents', 'children'):
csets = widget.get_data(item)
- return [linkwidget(*cset) for cset in csets]
+ return [genwidget(cset) for cset in csets]
elif item == 'transplant':
cset = widget.get_data(item)
- return linkwidget(*cset)
+ return genwidget(cset)
raise csinfo.UnknownItem(item)
custom = csinfo.custom(data=data_func, label=label_func,
|
@@ -148,10 +148,16 @@ os.unlink(tmpfile)
finally:
pf.close()
+ if not msg and hasattr(repo, 'mq'):
+ # attempt to get commit message
+ from hgext import mq
+ msg = mq.patchheader(repo.mq.join(self._patchname)).message
+ if msg:
+ msg = '\n'.join(msg)
self._node = node
self._user = user and hglib.toutf(user) or ''
self._date = date and util.parsedate(date) or None
- self._desc = msg and hglib.toutf(msg.rstrip('\r\n')) or ''
+ self._desc = msg and msg or ''
self._branch = branch and hglib.toutf(branch) or ''
self._parents = []
for p in (p1, p2):
|
@@ -957,7 +957,9 @@ self.update_urllist()
## post pull drop-down list
- syncbox.append_widget(gtk.Label(_('After Pull:')))
+ ppullbox = gtk.HBox()
+ syncbox.append_widget(ppullbox)
+ ppullbox.pack_start(gtk.Label(_('After Pull:')), False, False, 4)
ppulldata = [('none', _('Nothing')), ('update', _('Update'))]
ppull = self.repo.ui.config('tortoisehg', 'postpull', 'none')
if 'fetch' in self.exs or 'fetch' == ppull:
@@ -968,7 +970,7 @@ ppulllist = gtk.ListStore(str, # name
str) # label (utf-8)
ppullcombo = gtk.ComboBox(ppulllist)
- syncbox.append_widget(ppullcombo)
+ ppullbox.pack_start(ppullcombo, False, False)
cell = gtk.CellRendererText()
ppullcombo.pack_start(cell)
ppullcombo.add_attribute(cell, 'text', 1)
@@ -976,6 +978,7 @@ ppulllist.append((name, label))
self.ppullcombo = ppullcombo
self.ppulldata = ppulldata
+ self.ppullbox = ppullbox
self.update_postpull(ppull)
@@ -1196,12 +1199,8 @@ atexit.register(cleanup)
bfile = path
+ path = hglib.validate_synch_path(path, self.repo)
- for alias, path_aux in self.repo.ui.configitems('paths'):
- if path == alias:
- path = path_aux
- elif path == url.hidepassword(path_aux):
- path = path_aux
for badchar in (':', '*', '\\', '?', '#'):
bfile = bfile.replace(badchar, '')
@@ -1250,7 +1249,7 @@ self.cmd_set_sensitive(cmd, False)
self.incoming_disabled_cmds.append(cmd)
- ignore = (self.syncbar_apply, self.syncbar_reject, self.ppullcombo)
+ ignore = (self.syncbar_apply, self.syncbar_reject, self.ppullbox)
self.incoming_disabled = []
def disable_child(w):
if (w not in ignore) and w.get_property('sensitive'):
@@ -1330,7 +1329,7 @@ q = Queue.Queue()
cmd = [q, 'outgoing', '--quiet', '--template', '{node}\n']
cmd += self.get_proxy_args()
- cmd += [path]
+ cmd += [hglib.validate_synch_path(path, self.repo)]
def threadfunc(q, *args):
try:
|
@@ -44,7 +44,7 @@
os.chdir(repo.root)
self.repo = repo
- self.set_title(hglib.get_reponame(repo) + ' ' + command)
+ self.set_title(hglib.get_reponame(repo) + ' - hg ' + command)
self.command = command
labels = { 'add': (_('Select files to add'), _('Add')),
|
@@ -15,6 +15,7 @@ def __init__(self, extra=None):
gtk.HBox.__init__(self)
self.idle_text = None
+ self.started = False
self.pbar = gtk.ProgressBar()
self.sttext = gtk.Label("")
@@ -45,9 +46,11 @@ self.pbox.set_child_visible(True)
self.pbox.map()
self.set_status_text(msg)
+ self.started = True
self._timeout_event = gobject.timeout_add(timeout, self._pulse_timer)
def end(self, msg=None, unmap=True):
+ self.started = False
gobject.source_remove(self._timeout_event)
t = ''
@@ -67,7 +70,7 @@
def set_idle_text(self, msg):
self.idle_text = msg
- if msg:
+ if msg and not self.started:
self.set_status_text(msg)
def set_right1_text(self, msg):
|
@@ -544,11 +544,7 @@ use_proxy = self.use_proxy.get_active()
text_entry = self.pathbox.get_child()
remote_path = hglib.fromutf(text_entry.get_text()).strip()
- for alias, path in self.paths:
- if remote_path == alias:
- remote_path = path
- elif remote_path == url.hidepassword(path):
- remote_path = path
+ remote_path = hglib.validate_synch_path(remote_path, self.repo)
cmdline = cmd[:]
cmdline += ['--verbose']
|
@@ -4,6 +4,7 @@ #
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
+from mercurial.url import url
import os
import sys
@@ -219,3 +220,17 @@ if not author:
author = util.shortuser(user)
return author
+
+def validate_synch_path(path, repo):
+ '''
+ Validate the path that must be used to sync operations (pull,
+ push, outgoing and incoming)
+ '''
+ return_path = path
+ for alias, path_aux in repo.ui.configitems('paths'):
+ if path == alias:
+ return_path = path_aux
+ elif path == url.hidepassword(path_aux):
+ return_path = path_aux
+ return return_path
+
|
Loading...