# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1237370264 -3600
# Node ID ef04a65e4eeb03dea25e8bbf6575c4793180843e
# Parent b156e1437200eaa0e7a91880405d8427444fb8a2
commit: allow qnew when there are no changes
diff -r b156e1437200 -r ef04a65e4eeb hggtk/commit.py
--- a/hggtk/commit.py Wed Mar 18 09:21:54 2009 +0100
+++ b/hggtk/commit.py Wed Mar 18 10:57:44 2009 +0100
@@ -299,7 +299,8 @@
commit_list = self._relevant_files(commitable)
if len(commit_list) > 0:
self._commit_selected(commit_list)
- return True
+ elif len(self.filemodel) == 0 and self._get_qnew_name():
+ self._commit_selected([])
else:
Prompt('Nothing Commited', 'No committable files selected',
self).run()
return True
@@ -489,7 +490,7 @@
# won't get locked up by potential large commit. CmdDialog will also
# display the progress of the commit operation.
cmdline = ['hg', 'commit', '--verbose', '--repository',
self.repo.root]
- qnew = self.qnew_name and self.qnew_name.get_text().strip()
+ qnew = self._get_qnew_name()
if qnew:
qnew = fromutf(qnew)
cmdline[1] = 'qnew'
@@ -525,6 +526,9 @@
tip = cl.node(nullrev + len(cl))
return hex(tip)
+ def _get_qnew_name(self):
+ return self.qnew_name and self.qnew_name.get_text().strip() or ''
+
def _qnew_changed(self, element):
mqmode = self.mqmode
self.mqmode = not self.qnew_name.get_text().strip()
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop