# HG changeset patch
# User Sune Foldager <c...@cyanite.org>
# Date 1323185780 -3600
# Branch stable
# Node ID 8b4acb6031004c84dbc4809ab860a13e1a5fa422
# Parent  d3d9c6af529a0dc9fe69389a9b851b7339c2f5b2
repomodel: allow complete patch reordering

Using drag and drop, it was previously impossible to drop a patch at the bottom
most position (i.e. dropping it onto the "working directory", making it the
first patch to apply next). This is now possible.

diff -r d3d9c6af529a -r 8b4acb603100 tortoisehg/hgqt/repomodel.py
--- a/tortoisehg/hgqt/repomodel.py      Wed Nov 30 23:51:08 2011 -0600
+++ b/tortoisehg/hgqt/repomodel.py      Tue Dec 06 16:36:20 2011 +0100
@@ -16,6 +16,7 @@
 
 from mercurial import util, error
 from mercurial.util import propertycache
+from mercurial.context import workingctx
 
 from tortoisehg.util import hglib
 from tortoisehg.hgqt.graph import Graph
@@ -478,6 +479,8 @@
         dragflags = Qt.ItemFlags(0)
         if ctx.thgmqunappliedpatch():
             dragflags = Qt.ItemIsDragEnabled | Qt.ItemIsDropEnabled
+        if isinstance(ctx, workingctx):
+            dragflags |= Qt.ItemIsDropEnabled
         if not self.revset:
             return Qt.ItemIsSelectable | Qt.ItemIsEnabled | dragflags
         if ctx.rev() not in self.revset:

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to