Mercurial > hg-stable
changeset 15476:7c06e9c35f2f
mq: add a warning about uncommitted changes for qfinish
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 10 Nov 2011 15:40:34 -0600 |
parents | 95174c381525 |
children | 9d774a10e954 |
files | contrib/hgweb.fcgi contrib/hgweb.wsgi hgext/mq.py hgweb.cgi tests/test-mq-qdelete.t |
diffstat | 5 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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:
--- 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
--- 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:
--- 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