changeset 2701:f12d2e5b97fe

Merged backout head.
author Thomas Arendsen Hein <thomas@intevation.de>
date Thu, 27 Jul 2006 18:53:31 +0200
parents de8dc25a3eeb (current diff) f8bcaf5696d5 (diff)
children 030d0abdf91b
files
diffstat 32 files changed, 354 insertions(+), 76 deletions(-) [+]
line wrap: on
line diff
--- a/MANIFEST.in	Thu Jul 27 18:53:10 2006 +0200
+++ b/MANIFEST.in	Thu Jul 27 18:53:31 2006 +0200
@@ -10,6 +10,7 @@
 include templates/static/*
 include doc/README doc/Makefile doc/gendoc.py doc/*.txt doc/*.html doc/*.[0-9]
 recursive-include contrib *
+recursive-include hgext *
 include README
 include CONTRIBUTORS
 include COPYING
--- a/contrib/bash_completion	Thu Jul 27 18:53:10 2006 +0200
+++ b/contrib/bash_completion	Thu Jul 27 18:53:31 2006 +0200
@@ -288,7 +288,7 @@
 
 _hg_cmd_qdelete()
 {
-    _hg_ext_mq_patchlist qseries
+    _hg_ext_mq_patchlist qunapplied
 }
 
 _hg_cmd_qsave()
@@ -313,6 +313,11 @@
     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur"))
 }
 
+_hg_cmd_export()
+{
+    _hg_ext_mq_patchlist qapplied
+}
+
 
 # hbisect
 _hg_cmd_bisect()
--- a/doc/hgrc.5.txt	Thu Jul 27 18:53:10 2006 +0200
+++ b/doc/hgrc.5.txt	Thu Jul 27 18:53:31 2006 +0200
@@ -139,12 +139,13 @@
     Optional.  Email address to use in "From" header and SMTP envelope
     of outgoing messages.
   to;;
-    Optional.  Email address(es) of recipient(s).
+    Optional.  Comma-separated list of recipients' email addresses.
   cc;;
-    Optional.  Email address(es) to send carbon copies to.
+    Optional.  Comma-separated list of carbon copy recipients'
+    email addresses.
   bcc;;
-    Optional.  Email address(es) to send blind carbon copies to.
-    Cannot be set interactively.
+    Optional.  Comma-separated list of blind carbon copy
+    recipients' email addresses.  Cannot be set interactively.
   method;;
     Optional.  Method to use to send email messages.  If value is
     "smtp" (default), use SMTP (see section "[smtp]" for
--- a/hgext/mq.py	Thu Jul 27 18:53:10 2006 +0200
+++ b/hgext/mq.py	Thu Jul 27 18:53:31 2006 +0200
@@ -257,7 +257,7 @@
         head = self.qparents(repo)
 
         for patch in series:
-            patch = mergeq.lookup(patch)
+            patch = mergeq.lookup(patch, strict=True)
             if not patch:
                 self.ui.warn("patch %s does not exist\n" % patch)
                 return (1, None)
@@ -380,7 +380,7 @@
         return (err, n)
 
     def delete(self, repo, patch):
-        patch = self.lookup(patch)
+        patch = self.lookup(patch, strict=True)
         info = self.isapplied(patch)
         if info:
             self.ui.warn("cannot delete applied patch %s\n" % patch)
@@ -418,7 +418,7 @@
                 commitfiles = c + a + r
         self.check_toppatch(repo)
         wlock = repo.wlock()
-        insert = self.series_end()
+        insert = self.full_series_end()
         if msg:
             n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True,
                             wlock=wlock)
@@ -442,7 +442,7 @@
         r = self.qrepo()
         if r: r.add([patch])
         if commitfiles:
-            self.refresh(repo, short=True)
+            self.refresh(repo, msg=None, short=True)
 
     def strip(self, repo, rev, update=True, backup="all", wlock=None):
         def limitheads(chlog, stop):
@@ -530,6 +530,9 @@
         revnum = chlog.rev(rev)
 
         if update:
+            (c, a, r, d, u) = repo.changes(None, None)
+            if c or a or d or r:
+                raise util.Abort(_("Local changes found"))
             urev = self.qparents(repo, rev)
             repo.update(urev, allow=False, force=True, wlock=wlock)
             repo.dirstate.write()
@@ -598,25 +601,79 @@
                 return (i, a[0], a[1])
         return None
 
-    def lookup(self, patch):
+    # if the exact patch name does not exist, we try a few 
+    # variations.  If strict is passed, we try only #1
+    #
+    # 1) a number to indicate an offset in the series file
+    # 2) a unique substring of the patch name was given
+    # 3) patchname[-+]num to indicate an offset in the series file
+    def lookup(self, patch, strict=False):
+        def partial_name(s):
+            count = 0
+            if s in self.series:
+                return s
+            for x in self.series:
+                if s in x:
+                    count += 1
+                    last = x
+                if count > 1:
+                    return None
+            if count:
+                return last
+            if len(self.series) > 0 and len(self.applied) > 0:
+                if s == 'qtip':
+                    return self.series[self.series_end()-1]
+                if s == 'qbase':
+                    return self.series[0]
+            return None
         if patch == None:
             return None
-        if patch in self.series:
-            return patch
+
+        # we don't want to return a partial match until we make
+        # sure the file name passed in does not exist (checked below)
+        res = partial_name(patch)
+        if res and res == patch:
+            return res
+
         if not os.path.isfile(os.path.join(self.path, patch)):
             try:
                 sno = int(patch)
             except(ValueError, OverflowError):
-                self.ui.warn("patch %s not in series\n" % patch)
-                sys.exit(1)
-            if sno >= len(self.series):
-                self.ui.warn("patch number %d is out of range\n" % sno)
-                sys.exit(1)
-            patch = self.series[sno]
-        else:
-            self.ui.warn("patch %s not in series\n" % patch)
-            sys.exit(1)
-        return patch
+                pass
+            else:
+                if sno < len(self.series):
+                    patch = self.series[sno]
+                    return patch
+            if not strict:
+                # return any partial match made above
+                if res:
+                    return res
+                minus = patch.rsplit('-', 1)
+                if len(minus) > 1:
+                    res = partial_name(minus[0])
+                    if res:
+                        i = self.series.index(res)
+                        try:
+                            off = int(minus[1] or 1)
+                        except(ValueError, OverflowError):
+                            pass
+                        else:
+                            if i - off >= 0:
+                                return self.series[i - off]
+                plus = patch.rsplit('+', 1)
+                if len(plus) > 1:
+                    res = partial_name(plus[0])
+                    if res:
+                        i = self.series.index(res)
+                        try:
+                            off = int(plus[1] or 1)
+                        except(ValueError, OverflowError):
+                            pass
+                        else:
+                            if i + off < len(self.series):
+                                return self.series[i + off]
+        self.ui.warn("patch %s not in series\n" % patch)
+        sys.exit(1)
 
     def push(self, repo, patch=None, force=False, list=False,
              mergeq=None, wlock=None):
@@ -654,7 +711,8 @@
             self.ui.write("Now at: %s\n" % top)
         return ret[0]
 
-    def pop(self, repo, patch=None, force=False, update=True, wlock=None):
+    def pop(self, repo, patch=None, force=False, update=True, all=False,
+            wlock=None):
         def getfile(f, rev):
             t = repo.file(f).read(rev)
             try:
@@ -695,7 +753,17 @@
         self.applied_dirty = 1;
         end = len(self.applied)
         if not patch:
-            info = [len(self.applied) - 1] + self.applied[-1].split(':')
+            if all:
+                popi = 0
+            else:
+                popi = len(self.applied) - 1
+        else:
+            popi = info[0] + 1
+            if popi >= end:
+                self.ui.warn("qpop: %s is already at the top\n" % patch)
+                return
+        info = [ popi ] + self.applied[popi].split(':')
+
         start = info[0]
         rev = revlog.bin(info[1])
 
@@ -739,7 +807,7 @@
         qp = self.qparents(repo, top)
         commands.dodiff(sys.stdout, self.ui, repo, qp, None, files)
 
-    def refresh(self, repo, short=False):
+    def refresh(self, repo, msg=None, short=False):
         if len(self.applied) == 0:
             self.ui.write("No patches applied\n")
             return
@@ -822,10 +890,14 @@
             repo.dirstate.update(c, 'n')
             repo.dirstate.forget(forget)
 
-            if not message:
-                message = "patch queue: %s\n" % patch
+            if not msg:
+                if not message:
+                    message = "patch queue: %s\n" % patch
+                else:
+                    message = "\n".join(message)
             else:
-                message = "\n".join(message)
+                message = msg
+
             self.strip(repo, top, update=False, backup='strip', wlock=wlock)
             n = repo.commit(filelist, message, changes[1], force=1, wlock=wlock)
             self.applied[-1] = revlog.hex(n) + ':' + patch
@@ -976,6 +1048,15 @@
         self.applied.append(revlog.hex(n) + ":" + '.hg.patches.save.line')
         self.applied_dirty = 1
 
+    def full_series_end(self):
+        if len(self.applied) > 0:
+            (top, p) = self.applied[-1].split(':')
+            end = self.find_series(p)
+            if end == None:
+                return len(self.full_series)
+            return end + 1
+        return 0
+
     def series_end(self):
         end = 0
         if len(self.applied) > 0:
@@ -1063,7 +1144,7 @@
             if patch in self.series:
                 self.ui.warn("patch %s is already in the series file\n" % patch)
                 sys.exit(1)
-            index = self.series_end() + i
+            index = self.full_series_end() + i
             self.full_series[index:index] = [patch]
             self.read_series(self.full_series)
             self.ui.warn("adding %s to series file\n" % patch)
@@ -1144,14 +1225,16 @@
 def new(ui, repo, patch, **opts):
     """create a new patch"""
     q = repomap[repo]
-    q.new(repo, patch, msg=opts['message'], force=opts['force'])
+    message=commands.logmessage(**opts)
+    q.new(repo, patch, msg=message, force=opts['force'])
     q.save_dirty()
     return 0
 
 def refresh(ui, repo, **opts):
     """update the current patch"""
     q = repomap[repo]
-    q.refresh(repo, short=opts['short'])
+    message=commands.logmessage(**opts)
+    q.refresh(repo, msg=message, short=opts['short'])
     q.save_dirty()
     return 0
 
@@ -1216,9 +1299,7 @@
         localupdate = False
     else:
         q = repomap[repo]
-    if opts['all'] and len(q.applied) > 0:
-        patch = q.applied[0].split(':')[1]
-    q.pop(repo, patch, force=opts['force'], update=localupdate)
+    q.pop(repo, patch, force=opts['force'], update=localupdate, all=opts['all'])
     q.save_dirty()
     return 0
 
@@ -1234,7 +1315,8 @@
 def save(ui, repo, **opts):
     """save current queue state"""
     q = repomap[repo]
-    ret = q.save(repo, msg=opts['message'])
+    message=commands.logmessage(**opts)
+    ret = q.save(repo, msg=message)
     if ret:
         return ret
     q.save_dirty()
@@ -1325,9 +1407,10 @@
          'hg qinit [-c]'),
     "qnew":
         (new,
-         [('m', 'message', '', 'commit message'),
+         [('m', 'message', '', _('use <text> as commit message')),
+          ('l', 'logfile', '', _('read the commit message from <file>')),
           ('f', 'force', None, 'force')],
-         'hg qnew [-m TEXT] [-f] PATCH'),
+         'hg qnew [-m TEXT] [-l FILE] [-f] PATCH'),
     "qnext": (next, [], 'hg qnext'),
     "qprev": (prev, [], 'hg qprev'),
     "^qpop":
@@ -1346,8 +1429,10 @@
          'hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]'),
     "^qrefresh":
         (refresh,
-         [('s', 'short', None, 'short refresh')],
-         'hg qrefresh [-s]'),
+         [('m', 'message', '', _('change commit message with <text>')),
+          ('l', 'logfile', '', _('change commit message with <file> content')),
+          ('s', 'short', None, 'short refresh')],
+         'hg qrefresh [-m TEXT] [-l FILE] [-s]'),
     "qrestore":
         (restore,
          [('d', 'delete', None, 'delete save entry'),
@@ -1355,12 +1440,13 @@
          'hg qrestore [-d] [-u] REV'),
     "qsave":
         (save,
-         [('m', 'message', '', 'commit message'),
+         [('m', 'message', '', _('use <text> as commit message')),
+          ('l', 'logfile', '', _('read the commit message from <file>')),
           ('c', 'copy', None, 'copy patch directory'),
           ('n', 'name', '', 'copy directory name'),
           ('e', 'empty', None, 'clear queue status file'),
           ('f', 'force', None, 'force copy')],
-         'hg qsave [-m TEXT] [-c] [-n NAME] [-e] [-f]'),
+         'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'),
     "qseries":
         (series,
          [('m', 'missing', None, 'print patches not in series')],
--- a/mercurial/commands.py	Thu Jul 27 18:53:10 2006 +0200
+++ b/mercurial/commands.py	Thu Jul 27 18:53:31 2006 +0200
@@ -40,6 +40,25 @@
         return [util.normpath(os.path.join(cwd, x)) for x in args]
     return args
 
+def logmessage(**opts):
+    """ get the log message according to -m and -l option """
+    message = opts['message']
+    logfile = opts['logfile']
+
+    if message and logfile:
+        raise util.Abort(_('options --message and --logfile are mutually '
+                           'exclusive'))
+    if not message and logfile:
+        try:
+            if logfile == '-':
+                message = sys.stdin.read()
+            else:
+                message = open(logfile).read()
+        except IOError, inst:
+            raise util.Abort(_("can't read commit message '%s': %s") %
+                             (logfile, inst.strerror))
+    return message
+
 def matchpats(repo, pats=[], opts={}, head=''):
     cwd = repo.getcwd()
     if not pats and cwd:
@@ -989,21 +1008,7 @@
     If no commit message is specified, the editor configured in your hgrc
     or in the EDITOR environment variable is started to enter a message.
     """
-    message = opts['message']
-    logfile = opts['logfile']
-
-    if message and logfile:
-        raise util.Abort(_('options --message and --logfile are mutually '
-                           'exclusive'))
-    if not message and logfile:
-        try:
-            if logfile == '-':
-                message = sys.stdin.read()
-            else:
-                message = open(logfile).read()
-        except IOError, inst:
-            raise util.Abort(_("can't read commit message '%s': %s") %
-                             (logfile, inst.strerror))
+    message = logmessage(**opts)
 
     if opts['addremove']:
         addremove_lock(ui, repo, pats, opts)
--- a/mercurial/hgweb/hgweb_mod.py	Thu Jul 27 18:53:10 2006 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Jul 27 18:53:31 2006 +0200
@@ -48,6 +48,7 @@
             self.repo = hg.repository(self.repo.ui, self.repo.root)
             self.maxchanges = int(self.repo.ui.config("web", "maxchanges", 10))
             self.stripecount = int(self.repo.ui.config("web", "stripes", 1))
+            self.maxshortchanges = int(self.repo.ui.config("web", "maxshortchanges", 60))
             self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10))
             self.allowpull = self.repo.ui.configbool("web", "allowpull", True)
 
@@ -160,7 +161,7 @@
                             ignorewsamount=ignorewsamount,
                             ignoreblanklines=ignoreblanklines), f, tn)
 
-    def changelog(self, pos):
+    def changelog(self, pos, shortlog=False):
         def changenav(**map):
             def seq(factor, maxchanges=None):
                 if maxchanges:
@@ -175,8 +176,9 @@
 
             l = []
             last = 0
-            for f in seq(1, self.maxchanges):
-                if f < self.maxchanges or f <= last:
+            maxchanges = shortlog and self.maxshortchanges or self.maxchanges
+            for f in seq(1, maxchanges):
+                if f < maxchanges or f <= last:
                     continue
                 if f > count:
                     break
@@ -221,14 +223,15 @@
             for e in l:
                 yield e
 
+        maxchanges = shortlog and self.maxshortchanges or self.maxchanges
         cl = self.repo.changelog
         mf = cl.read(cl.tip())[0]
         count = cl.count()
-        start = max(0, pos - self.maxchanges + 1)
-        end = min(count, start + self.maxchanges)
+        start = max(0, pos - maxchanges + 1)
+        end = min(count, start + maxchanges)
         pos = end - 1
 
-        yield self.t('changelog',
+        yield self.t(shortlog and 'shortlog' or 'changelog',
                      changenav=changenav,
                      manifest=hex(mf),
                      rev=pos, changesets=count, entries=changelist,
@@ -611,7 +614,8 @@
                  lastchange = (0, 0), # FIXME
                  manifest = hex(mf),
                  tags = tagentries,
-                 shortlog = changelist)
+                 shortlog = changelist,
+                 archives=self.archivelist("tip"))
 
     def filediff(self, file, changeset):
         cl = self.repo.changelog
@@ -691,6 +695,7 @@
         def expand_form(form):
             shortcuts = {
                 'cl': [('cmd', ['changelog']), ('rev', None)],
+                'sl': [('cmd', ['shortlog']), ('rev', None)],
                 'cs': [('cmd', ['changeset']), ('node', None)],
                 'f': [('cmd', ['file']), ('filenode', None)],
                 'fl': [('cmd', ['filelog']), ('filenode', None)],
@@ -773,6 +778,18 @@
 
         req.write(self.changelog(hi))
 
+    def do_shortlog(self, req):
+        hi = self.repo.changelog.count() - 1
+        if req.form.has_key('rev'):
+            hi = req.form['rev'][0]
+            try:
+                hi = self.repo.changelog.rev(self.repo.lookup(hi))
+            except hg.RepoError:
+                req.write(self.search(hi)) # XXX redirect to 404 page?
+                return
+
+        req.write(self.changelog(hi, shortlog = True))
+
     def do_changeset(self, req):
         req.write(self.changeset(req.form['node'][0]))
 
--- a/templates/changelog-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/changelog-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -20,7 +20,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | changelog | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;rev=#rev#;style=gitweb">shortlog</a> | changelog | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>#archives%archiveentry#<br/>
 <br/>
 #changenav%naventry#<br/>
 </div>
--- a/templates/changelog.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/changelog.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -6,6 +6,7 @@
 <body>
 
 <div class="buttons">
+<a href="?sl=#rev#">shortlog</a>
 <a href="?cmd=tags">tags</a>
 <a href="?mf=#manifest|short#;path=/">manifest</a>
 #archives%archiveentry#
--- a/templates/changeset-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/changeset-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> | changeset | <a href="?cmd=changeset;node=#node#;style=raw">raw</a> #archives%archiveentry#<br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;rev=#rev#;style=gitweb">shortlog</a> | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> | changeset | <a href="?cmd=changeset;node=#node#;style=raw">raw</a> #archives%archiveentry#<br/>
 </div>
 
 <div>
--- a/templates/changeset.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/changeset.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -5,6 +5,7 @@
 
 <div class="buttons">
 <a href="?cl=#rev#">changelog</a>
+<a href="?sl=#rev#">shortlog</a>
 <a href="?cmd=tags">tags</a>
 <a href="?mf=#manifest|short#;path=/">manifest</a>
 <a href="?cs=#node|short#;style=raw">raw</a>
--- a/templates/error-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/error-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
 </div>
 
 <div>
--- a/templates/fileannotate-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/fileannotate-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | annotate | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | annotate | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/>
 </div>
 
 <div class="title">#file|escape#</div>
--- a/templates/fileannotate.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/fileannotate.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -5,6 +5,7 @@
 
 <div class="buttons">
 <a href="?cl=#rev#">changelog</a>
+<a href="?sl=#rev#">shortlog</a>
 <a href="?tags=">tags</a>
 <a href="?cs=#node|short#">changeset</a>
 <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a>
--- a/templates/filediff.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/filediff.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -5,6 +5,7 @@
 
 <div class="buttons">
 <a href="?cl=#rev#">changelog</a>
+<a href="?sl=#rev#">shortlog</a>
 <a href="?tags=">tags</a>
 <a href="?cs=#node|short#">changeset</a>
 <a href="?f=#filenode|short#;file=#file|urlescape#">file</a>
--- a/templates/filelog-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/filelog-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | revisions | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?fl=#filenode|short#;file=#file|urlescape#;style=rss">rss</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | revisions | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?fl=#filenode|short#;file=#file|urlescape#;style=rss">rss</a><br/>
 </div>
 
 <div class="title" >#file|urlescape#</div>
--- a/templates/filelog.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/filelog.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -8,6 +8,7 @@
 
 <div class="buttons">
 <a href="?cl=tip">changelog</a>
+<a href="?sl=tip">shortlog</a>
 <a href="?tags=">tags</a>
 <a href="?f=#filenode|short#;file=#file|urlescape#">file</a>
 <a href="?fa=#filenode|short#;file=#file|urlescape#">annotate</a>
--- a/templates/filerevision-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/filerevision-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?mf=#manifest|short#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | file | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?mf=#manifest|short#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | file | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/>
 </div>
 
 <div class="title">#file|escape#</div>
--- a/templates/filerevision.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/filerevision.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -5,6 +5,7 @@
 
 <div class="buttons">
 <a href="?cl=#rev#">changelog</a>
+<a href="?sl=#rev#">shortlog</a>
 <a href="?tags=">tags</a>
 <a href="?cs=#node|short#">changeset</a>
 <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a>
--- a/templates/manifest-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/manifest-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | manifest | <a href="?cs=#node|short#;style=gitweb">changeset</a> #archives%archiveentry#<br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | manifest | <a href="?cs=#node|short#;style=gitweb">changeset</a> #archives%archiveentry#<br/>
 </div>
 
 <div class="title" >#path|escape#</div>
--- a/templates/manifest.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/manifest.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -5,6 +5,7 @@
 
 <div class="buttons">
 <a href="?cl=#rev#">changelog</a>
+<a href="?sl=#rev#">shortlog</a>
 <a href="?tags=">tags</a>
 <a href="?cs=#node|short#">changeset</a>
 #archives%archiveentry#
--- a/templates/map	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/map	Thu Jul 27 18:53:31 2006 +0200
@@ -3,7 +3,10 @@
 footer = footer.tmpl
 search = search.tmpl
 changelog = changelog.tmpl
+shortlog = shortlog.tmpl
+shortlogentry = shortlogentry.tmpl
 naventry = '<a href="?cl=#rev#">#label|escape#</a> '
+navshortentry = '<a href="?sl=#rev#">#label|escape#</a> '
 filedifflink = '<a href="?fd=#node|short#;file=#file|urlescape#">#file|escape#</a> '
 filenodelink = '<a href="?f=#filenode|short#;file=#file|urlescape#">#file|escape#</a> '
 fileellipses = '...'
--- a/templates/search-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/search-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -1,6 +1,6 @@
 #header#
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | log | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
 </div>
 
 <h2>searching for #query|escape#</h2>
--- a/templates/search.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/search.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -5,6 +5,7 @@
 
 <div class="buttons">
 <a href="?cl=tip">changelog</a>
+<a href="?sl=tip">shortlog</a>
 <a href="?tags=">tags</a>
 <a href="?mf=#manifest|short#;path=/">manifest</a>
 </div>
--- a/templates/shortlog-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/shortlog-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -1,13 +1,32 @@
 #header#
+<title>#repo|escape#: Shortlog</title>
+<link rel="alternate" type="application/rss+xml"
+   href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
+</head>
+<body>
 
+<div class="page_header">
+<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / shortlog
+</div>
+
+<form action="#">
+<div class="search">
+<input type="hidden" name="repo" value="#repo|escape#"  />
+<input type="hidden" name="style" value="gitweb"  />
+<input type="hidden" name="cmd" value="changelog"  />
+<input type="text" name="rev"  />
+</div>
+</form>
+</div>
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">log</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
+<a href="?cmd=summary;style=gitweb">summary</a> | shortlog | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>#archives%archiveentry#<br/>
+<br/>
 
-#changenav%naventry#<br/>
+#changenav%navshortentry#<br/>
 </div>
 
 <table cellspacing="0">
-#entries#
+#entries%shortlogentry#
 </table>
 
 #footer#
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/shortlog.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -0,0 +1,38 @@
+#header#
+<title>#repo|escape#: shortlog</title>
+<link rel="alternate" type="application/rss+xml"
+   href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#">
+</head>
+<body>
+
+<div class="buttons">
+<a href="?cl=#rev#">changelog</a>
+<a href="?cmd=tags">tags</a>
+<a href="?mf=#manifest|short#;path=/">manifest</a>
+#archives%archiveentry#
+<a type="application/rss+xml" href="?style=rss">rss</a>
+</div>
+
+<h2>shortlog for #repo|escape#</h2>
+
+<form action="#">
+<p>
+<label for="search1">search:</label>
+<input type="hidden" name="cmd" value="changelog">
+<input name="rev" id="search1" type="text" size="30">
+navigate: <small class="navigate">#changenav%navshortentry#</small>
+</p>
+</form>
+
+#entries%shortlogentry#
+
+<form action="#">
+<p>
+<label for="search2">search:</label>
+<input type="hidden" name="cmd" value="changelog">
+<input name="rev" id="search2" type="text" size="30">
+navigate: <small class="navigate">#changenav%navshortentry#</small>
+</p>
+</form>
+
+#footer#
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/shortlogentry.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -0,0 +1,7 @@
+<table class="slogEntry parity#parity#">
+ <tr>
+  <td class="age">#date|age#</td>
+  <td class="author">#author|obfuscate#</td>
+  <td class="node"><a href="?cs=#node|short#">#desc|strip|firstline|escape#</a></td>
+ </tr>
+</table>
--- a/templates/static/style.css	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/static/style.css	Thu Jul 27 18:53:31 2006 +0200
@@ -57,6 +57,12 @@
 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
 .logEntry th.firstline { text-align: left; width: inherit; }
 
+/* Shortlog entries */
+.slogEntry { width: 100%; font-size: smaller; }
+.slogEntry .age { width: 7%; }
+.slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
+.slogEntry td.author { width: 35%; }
+
 /* Tag entries */
 #tagEntries { list-style: none; margin: 0; padding: 0; }
 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
--- a/templates/summary-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/summary-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -9,7 +9,8 @@
 <a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / summary
 </div>
 <div class="page_nav">
-summary | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/>
+summary | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>#archives%archiveentry#
+<br/>
 </div>
 
 <div class="title">&nbsp;</div>
--- a/templates/tags-gitweb.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/tags-gitweb.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -10,7 +10,7 @@
 </div>
 
 <div class="page_nav">
-<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>
+<a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>
 <br/>
 </div>
 
--- a/templates/tags.tmpl	Thu Jul 27 18:53:10 2006 +0200
+++ b/templates/tags.tmpl	Thu Jul 27 18:53:31 2006 +0200
@@ -7,6 +7,7 @@
 
 <div class="buttons">
 <a href="?cl=tip">changelog</a>
+<a href="?sl=tip">shortlog</a>
 <a href="?mf=#manifest|short#;path=/">manifest</a>
 <a type="application/rss+xml" href="?cmd=tags;style=rss">rss</a>
 </div>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-qrefresh-replace-log-message	Thu Jul 27 18:53:31 2006 +0200
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Environement setup for MQ
+export HGRCPATH=./hgrc
+echo "[extensions]" >> ./hgrc
+echo "mq=" >> ./hgrc
+
+#Repo init
+hg init
+hg qinit
+
+hg qnew -m "First commit message" first-patch
+echo aaaa > file
+hg add file
+hg qrefresh
+echo =======================
+echo "Should display 'First commit message'"
+hg log -l1 -v | sed -n '/description/,$p'
+echo
+
+# Testing changing message with -m
+echo bbbb > file
+hg qrefresh -m "Second commit message" 
+echo =======================
+echo "Should display 'Second commit message'"
+hg log -l1 -v | sed -n '/description/,$p'
+echo
+
+
+# Testing changing message with -l
+echo "Third commit message" > logfile
+echo " This is the 3rd log message" >> logfile
+echo bbbb > file
+hg qrefresh -l logfile
+echo =======================
+echo "Should display 'Third commit message\n This is the 3rd log message'"
+hg log -l1 -v | sed -n '/description/,$p'
+echo
+
+# Testing changing message with -l-
+hg qnew -m "First commit message" second-patch
+echo aaaa > file2
+hg add file2
+echo bbbb > file2
+(echo "Fifth commit message" 
+echo " This is the 5th log message" >> logfile) |\
+hg qrefresh -l-
+echo =======================
+echo "Should display 'Fifth commit message\n This is the 5th log message'"
+hg log -l1 -v | sed -n '/description/,$p'
+echo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-qrefresh-replace-log-message.out	Thu Jul 27 18:53:31 2006 +0200
@@ -0,0 +1,29 @@
+=======================
+Should display 'First commit message'
+description:
+First commit message
+
+
+
+=======================
+Should display 'Second commit message'
+description:
+Second commit message
+
+
+
+=======================
+Should display 'Third commit message\n This is the 3rd log message'
+description:
+Third commit message
+ This is the 3rd log message
+
+
+
+=======================
+Should display 'Fifth commit message\n This is the 5th log message'
+description:
+Fifth commit message
+
+
+