by
Changes to 2 files · Browse files at 6ea918de4837 Showing diff from parent 346877b11747 2e1cc6d04863 Diff from another changeset...
@@ -104,13 +104,14 @@
def _fill_buffer(self, buf, rev, ctx, filelist):
def title_line(title, text, tag):
- pad = ' ' * (20 - len(title))
+ pad = ' ' * (12 - len(title))
buf.insert_with_tags_by_name(eob, title + pad + text, tag)
buf.insert(eob, "\n")
# TODO: Add toggle for gmtime/localtime
eob = buf.get_end_iter()
date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(ctx.date()[0]))
+ self.clipboard.set_text(short(ctx.node()))
change = str(rev) + ':' + short(ctx.node())
tags = ' '.join(ctx.tags())
parents = self.parents
@@ -118,22 +119,27 @@ title_line('changeset:', change, 'changeset')
if ctx.branch() != 'default':
title_line('branch:', ctx.branch(), 'greybg')
- title_line('user:', ctx.user(), 'changeset')
- title_line('date:', date, 'date')
+ title_line('user/date:', ctx.user() + '\t' + date, 'changeset')
for p in parents:
+ pctx = self.repo.changectx(p)
+ summary = pctx.description().splitlines()[0]
change = str(p) + ':' + short(self.repo.changelog.node(p))
title = 'parent:'
- title += ' ' * (20 - len(title))
+ title += ' ' * (12 - len(title))
buf.insert_with_tags_by_name(eob, title, 'parent')
buf.insert_with_tags_by_name(eob, change, 'link')
+ buf.insert_with_tags_by_name(eob, ' ' + summary, 'parent')
buf.insert(eob, "\n")
for n in self.repo.changelog.children(ctx.node()):
+ cctx = self.repo.changectx(n)
+ summary = cctx.description().splitlines()[0]
childrev = self.repo.changelog.rev(n)
change = str(childrev) + ':' + short(n)
title = 'child:'
- title += ' ' * (20 - len(title))
+ title += ' ' * (12 - len(title))
buf.insert_with_tags_by_name(eob, title, 'parent')
buf.insert_with_tags_by_name(eob, change, 'link')
+ buf.insert_with_tags_by_name(eob, ' ' + summary, 'parent')
buf.insert(eob, "\n")
for n in self.repo.changelog.children(ctx.node()):
childrev = self.repo.changelog.rev(n)
@@ -274,6 +280,8 @@ return _menu
def get_body(self):
+ sel = (os.name == 'nt') and 'CLIPBOARD' or 'PRIMARY'
+ self.clipboard = gtk.Clipboard(selection=sel)
self._filemenu = self.file_context_menu()
details_frame = gtk.Frame()
|
@@ -136,19 +136,28 @@ expander = gtk.Expander('Advanced Options')
expander.set_expanded(False)
hbox = gtk.HBox()
+ expander.add(hbox)
self._reventry = gtk.Entry()
self._force = gtk.CheckButton('Force')
+ frame = gtk.Frame('Incoming/Outgoing')
self._showpatch = gtk.CheckButton('Show Patches')
self._newestfirst = gtk.CheckButton('Show Newest First')
self._nomerge = gtk.CheckButton('Show No Merges')
- hbox.pack_start(gtk.Label('Rev:'))
- hbox.pack_start(self._reventry)
- hbox.pack_start(self._force)
- hbox.pack_start(self._showpatch)
- hbox.pack_start(self._newestfirst)
- hbox.pack_start(self._nomerge)
- expander.add(hbox)
+ revvbox = gtk.VBox()
+ revhbox = gtk.HBox()
+ revhbox.pack_start(gtk.Label('Rev:'), False, False, 2)
+ revhbox.pack_start(self._reventry, False, False, 2)
+ revvbox.pack_start(revhbox)
+ revvbox.pack_start(self._force, False, False, 2)
+ hbox.pack_start(revvbox, False, False, 2)
+ hbox.pack_start(frame, False, False, 2)
+
+ hbox = gtk.HBox()
+ hbox.pack_start(self._showpatch, False, False, 2)
+ hbox.pack_start(self._newestfirst, False, False, 2)
+ hbox.pack_start(self._nomerge, False, False, 2)
+ frame.add(hbox)
vbox.pack_start(expander, False, False, 2)
# hg output window
|
Loading...