# HG changeset patch # User Matt Mackall # Date 1320961234 21600 # Node ID 7c06e9c35f2f87e0ee963f0c0044d5be3e1ef891 # Parent 95174c381525bb3f0953c003b363745456b9174d mq: add a warning about uncommitted changes for qfinish diff -r 95174c381525 -r 7c06e9c35f2f contrib/hgweb.fcgi --- a/contrib/hgweb.fcgi Wed Nov 09 19:46:51 2011 -0500 +++ b/contrib/hgweb.fcgi Thu Nov 10 15:40:34 2011 -0600 @@ -5,7 +5,8 @@ # Path to repo or hgweb config to serve (see 'hg help hgweb') config = "/path/to/repo/or/config" -# Uncomment and adjust if Mercurial is not installed system-wide: +# Uncomment and adjust if Mercurial is not installed system-wide +# (consult "installed modules" path from 'hg debuginstall'): #import sys; sys.path.insert(0, "/path/to/python/lib") # Uncomment to send python tracebacks to the browser if an error occurs: diff -r 95174c381525 -r 7c06e9c35f2f contrib/hgweb.wsgi --- a/contrib/hgweb.wsgi Wed Nov 09 19:46:51 2011 -0500 +++ b/contrib/hgweb.wsgi Thu Nov 10 15:40:34 2011 -0600 @@ -4,7 +4,8 @@ # Path to repo or hgweb config to serve (see 'hg help hgweb') config = "/path/to/repo/or/config" -# Uncomment and adjust if Mercurial is not installed system-wide: +# Uncomment and adjust if Mercurial is not installed system-wide +# (consult "installed modules" path from 'hg debuginstall'): #import sys; sys.path.insert(0, "/path/to/python/lib") # Uncomment to send python tracebacks to the browser if an error occurs: diff -r 95174c381525 -r 7c06e9c35f2f hgext/mq.py --- a/hgext/mq.py Wed Nov 09 19:46:51 2011 -0500 +++ b/hgext/mq.py Thu Nov 10 15:40:34 2011 -0600 @@ -2915,6 +2915,9 @@ return 0 revs = scmutil.revrange(repo, revrange) + if repo['.'].rev() in revs and repo[None].files(): + ui.warn(_('warning: uncommitted changes in the working directory\n')) + q.finish(repo, revs) q.savedirty() return 0 diff -r 95174c381525 -r 7c06e9c35f2f hgweb.cgi --- a/hgweb.cgi Wed Nov 09 19:46:51 2011 -0500 +++ b/hgweb.cgi Thu Nov 10 15:40:34 2011 -0600 @@ -6,7 +6,8 @@ # Path to repo or hgweb config to serve (see 'hg help hgweb') config = "/path/to/repo/or/config" -# Uncomment and adjust if Mercurial is not installed system-wide: +# Uncomment and adjust if Mercurial is not installed system-wide +# (consult "installed modules" path from 'hg debuginstall'): #import sys; sys.path.insert(0, "/path/to/python/lib") # Uncomment to send python tracebacks to the browser if an error occurs: diff -r 95174c381525 -r 7c06e9c35f2f tests/test-mq-qdelete.t --- a/tests/test-mq-qdelete.t Wed Nov 09 19:46:51 2011 -0500 +++ b/tests/test-mq-qdelete.t Thu Nov 10 15:40:34 2011 -0600 @@ -188,7 +188,9 @@ $ echo > .hg/patches/series # remove 4.diff and 5.diff from series to confuse mq $ echo hup >> base $ hg qnew -f -d '1 0' -m 6 6.diff + $ echo pup > base $ hg qfinish -a + warning: uncommitted changes in the working directory revision 2b1c98802260 refers to unknown patches: 5.diff revision 33a6861311c0 refers to unknown patches: 4.diff