From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Blorgit > SVN integration Date: Fri, 04 Dec 2009 20:54:57 -0700 Message-ID: References: <87r5s24ebl.fsf@missioncriticalit.com> <87fx8asu9s.fsf@missioncriticalit.com> <87vdgo6ob6.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGljh-0007vb-6p for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 22:55:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGljb-0007uo-OB for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 22:55:07 -0500 Received: from [199.232.76.173] (port=45329 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGljb-0007ul-Jh for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 22:55:03 -0500 Received: from mail-px0-f198.google.com ([209.85.216.198]:53475) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGljb-00020v-GS for emacs-orgmode@gnu.org; Fri, 04 Dec 2009 22:55:03 -0500 Received: by pxi36 with SMTP id 36so818531pxi.26 for ; Fri, 04 Dec 2009 19:55:02 -0800 (PST) In-Reply-To: <87vdgo6ob6.fsf@missioncriticalit.com> (Francesco Pizzolante's message of "Thu, 03 Dec 2009 16:59:41 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Francesco Pizzolante Cc: mailing-list-org-mode Hi Francesco, Thanks for the patch. I got it working and pushed up the change to the blorgit git repository. Now all we need is an interface for reviewing/reverting previous commits, and individual username/passwords and blorgit will be a full fledged wiki! :) Thanks -- Eric Francesco Pizzolante writes: > Hi Eric, > >>> One little question: is it possible to add a comment field when editing a file >>> through the web interface and use that comment as the log when checking in the >>> file in the repository? >> >> That behavior is not currently part of blorgit, but it shouldn't be hard >> to add. See lines 241 through 247 of blorgit.rb which are responsible >> for rendering the edit page. It shouldn't be hard to add a comment >> field, and then later access that field when committing to SVN/GIT. > > I've added a text input in the UI: > > diff --git a/blorgit.rb b/blorgit.rb > index 93bea47..c7e4a92 100644 > --- a/blorgit.rb > +++ b/blorgit.rb > @@ -245,6 +245,8 @@ __END__ > %form{ :action => path_for(@blog), :method => :post, :id => :comment_form } > %textarea{ :id => :body, :name => :body, :rows => 28, :cols => 82 }= @blog.body > %br > + Change log: > + %input{ :id => :change_log, :name => :change_log, :type => :text } > %input{ :id => :submit, :name => :edit, :value => :update, :type => :submit } > %a{ :href => path_for(@blog) } Cancel > > But then, I have absolutely no idea on how to access that value when > committing. It should be something like this: > > diff --git a/backend/blog.rb b/backend/blog.rb > index 827ec05..555f12c 100644 > --- a/backend/blog.rb > +++ b/backend/blog.rb > @@ -26,7 +26,7 @@ class Blog < ActiveFile::Base > index: index > def after_savee > Dir.chdir(Blog.base_directory) do > - %x{svn add #{self.path} && svn ci -m "#{self.path} updated through the web interface" #{self.path}} > + %x{svn add #{self.path} && svn ci -m "#{self.path} updated through the web interface: #{self.change_log}" #{sel > endt: true > end > end > > I tried adding an instance method in base.rb but didn't manage to make it > work. > > A little help would be welcome. > > Thanks a lot, > Francesco