changeset 2705:030d0abdf91b

merge with crew.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Thu, 27 Jul 2006 12:36:17 -0700
parents 99e7cf6bd2f7 (current diff) f12d2e5b97fe (diff)
children 146fef06e188 4af7b178976a
files hgext/patchbomb.py tests/run-tests.py
diffstat 59 files changed, 688 insertions(+), 159 deletions(-) [+]
line wrap: on
line diff
--- a/MANIFEST.in	Thu Jul 27 21:25:39 2006 +0200
+++ b/MANIFEST.in	Thu Jul 27 12:36:17 2006 -0700
@@ -2,7 +2,7 @@
 recursive-include mercurial *.py
 include hgweb.cgi hgwebdir.cgi
 include hgeditor rewrite-log
-include tests/README tests/coverage.py tests/run-tests.py tests/md5sum.py tests/test-*[a-z0-9] tests/*.out
+include tests/README tests/*.py tests/test-*[a-z0-9] tests/*.out
 prune tests/*.err
 include *.txt
 include templates/map templates/map-*[a-z0-9]
@@ -10,8 +10,10 @@
 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
 include Makefile
 include MANIFEST.in
+prune *.elc *.orig *.rej *~ *.o *.so *.pyc *.swp *.prof
--- a/contrib/bash_completion	Thu Jul 27 21:25:39 2006 +0200
+++ b/contrib/bash_completion	Thu Jul 27 12:36:17 2006 -0700
@@ -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/contrib/macosx/Welcome.html	Thu Jul 27 21:25:39 2006 +0200
+++ b/contrib/macosx/Welcome.html	Thu Jul 27 12:36:17 2006 -0700
@@ -5,13 +5,73 @@
   <meta http-equiv="Content-Style-Type" content="text/css">
   <title></title>
   <style type="text/css">
-    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
+    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
     p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
   </style>
 </head>
 <body>
 <p class="p1">This is a prepackaged release of <a href="http://www.selenic.com/mercurial">Mercurial</a> for Mac OS X.</p>
 <p class="p2"><br></p>
-<p class="p1">It is based on Mercurial 0.9.</p>
+<p class="p1">It is based on Mercurial 0.9.1</p>
+<br>
+<pre>
+Release Notes
+-------------
+
+2006-07-24  v0.9.1
+
+Major changes between Mercurial 0.9 and 0.9.1:
+
+ New features:
+ - You can now configure your 'hgweb' server to let remote users
+   'push' changes over http.
+ - You can now 'import' a patch in a mail message by saving the mail
+   message, and importing it.  This works for patches sent either
+   inline or as attachments.
+ - The 'diff' command now accepts '-rA:B' syntax as a synonym for
+   '-r A -r B', and adds '-b' and '-B' options.
+
+ New contributions and extensions:
+ - The 'acl' extension lets you lock down parts of a repository
+   against incoming changes
+ - The 'extdiff' extension lets you run your favourite graphical
+   change viewer
+ - Comprehensive integration with the 'vim' editor
+ - A restricted shell for 'ssh'-hosted repositories
+ - An importer for 'darcs' repositories
+
+ New hooks added:
+ - 'preupdate' is run before an update or merge in the working
+   directory.
+ - 'update' is run after an update or merge in the working
+   directory.
+
+ Behaviour changes:
+ - NOTE: Mercurial as installed by the Windows binary
+   installer no longer performs automatic line-ending conversion for
+   Unix/Linux compatibility.  To re-enable this feature, edit your
+   'mercurial.ini' file after you upgrade.
+ - The Windows binary installer now automatically adds 'hg' to your
+   '%PATH%'.
+ - The 'backout' command now runs an editor by default, to let you
+   modify the commit message for a backed-out changeset.
+ - An earlier problem with parsing of tags has been fixed.
+   This makes tag parsing slower but more reliable.
+
+ Memory usage and performance improvements:
+ - The 'remove' command has been rewritten to be hundreds of times
+   faster in large repositories.
+ - It is now possible to 'clone' a repository very quickly over a
+   LAN, if the server is configured to allow it.  See the new 'server'
+   section in the 'hgrc' documentation.
+
+ Other changes of note:
+ - Mercurial will now print help for an extension if you type 'hg
+   help EXT_NAME'.
+ - The usual array of bug fixes and documentation improvements.
+ - The integrated web server is now more WSGI-compliant.
+ - Work has begun to solidify Mercurial's API for use by third-party
+   packages.
+</pre>
 </body>
 </html>
--- a/contrib/mercurial.el	Thu Jul 27 21:25:39 2006 +0200
+++ b/contrib/mercurial.el	Thu Jul 27 12:36:17 2006 -0700
@@ -380,7 +380,9 @@
   (save-excursion
     (while hg-prev-buffer
       (set-buffer hg-prev-buffer))
-    (let ((path (or default (buffer-file-name) default-directory)))
+    (let ((path (or default
+                    (buffer-file-name)
+                    (expand-file-name default-directory))))
       (if (or (not path) current-prefix-arg)
           (expand-file-name
            (eval (list* 'read-file-name
@@ -972,7 +974,8 @@
       (cd (hg-root path)))
     (when update
       (with-current-buffer buf
-	(set (make-local-variable 'backup-inhibited) nil)
+        (when (local-variable-p 'backup-inhibited)
+          (kill-local-variable 'backup-inhibited))
 	(hg-mode-line)))))
 
 (defun hg-incoming (&optional repo)
--- a/contrib/win32/ReadMe.html	Thu Jul 27 21:25:39 2006 +0200
+++ b/contrib/win32/ReadMe.html	Thu Jul 27 12:36:17 2006 -0700
@@ -14,7 +14,7 @@
   </head>
 
   <body>
-    <h1>Mercurial version 0.9 for Windows</h1>
+    <h1>Mercurial version 0.9.1 for Windows</h1>
 
     <p>Welcome to Mercurial for Windows!</p>
 
--- a/contrib/win32/mercurial.iss	Thu Jul 27 21:25:39 2006 +0200
+++ b/contrib/win32/mercurial.iss	Thu Jul 27 12:36:17 2006 -0700
@@ -4,7 +4,7 @@
 [Setup]
 AppCopyright=Copyright 2005, 2006 Matt Mackall and others
 AppName=Mercurial
-AppVerName=Mercurial version 0.9
+AppVerName=Mercurial version 0.9.1
 InfoAfterFile=contrib/win32/postinstall.txt
 LicenseFile=COPYING
 ShowLanguageDialog=yes
@@ -14,10 +14,10 @@
 AppUpdatesURL=http://www.selenic.com/mercurial
 AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
 AppContact=mercurial@selenic.com
-OutputBaseFilename=Mercurial-0.9
+OutputBaseFilename=Mercurial-0.9.1
 DefaultDirName={sd}\Mercurial
 SourceDir=C:\hg\hg-release
-VersionInfoVersion=0.9
+VersionInfoVersion=0.9.1
 VersionInfoDescription=Mercurial distributed SCM
 VersionInfoCopyright=Copyright 2005, 2006 Matt Mackall and others
 VersionInfoCompany=Matt Mackall and others
--- a/contrib/win32/postinstall.txt	Thu Jul 27 21:25:39 2006 +0200
+++ b/contrib/win32/postinstall.txt	Thu Jul 27 12:36:17 2006 -0700
@@ -7,6 +7,62 @@
 Release Notes
 -------------
 
+2006-07-24  v0.9.1
+
+Major changes between Mercurial 0.9 and 0.9.1:
+
+ New features:
+ - You can now configure your 'hgweb' server to let remote users
+   'push' changes over http.
+ - You can now 'import' a patch in a mail message by saving the mail
+   message, and importing it.  This works for patches sent either
+   inline or as attachments.
+ - The 'diff' command now accepts '-rA:B' syntax as a synonym for
+   '-r A -r B', and adds '-b' and '-B' options.
+
+ New contributions and extensions:
+ - The 'acl' extension lets you lock down parts of a repository
+   against incoming changes
+ - The 'extdiff' extension lets you run your favourite graphical
+   change viewer
+ - Comprehensive integration with the 'vim' editor
+ - A restricted shell for 'ssh'-hosted repositories
+ - An importer for 'darcs' repositories
+
+ New hooks added:
+ - 'preupdate' is run before an update or merge in the working
+   directory.
+ - 'update' is run after an update or merge in the working
+   directory.
+
+ Behaviour changes:
+ - NOTE: Mercurial as installed by the Windows binary
+   installer no longer performs automatic line-ending conversion for
+   Unix/Linux compatibility.  To re-enable this feature, edit your
+   'mercurial.ini' file after you upgrade.
+ - The Windows binary installer now automatically adds 'hg' to your
+   '%PATH%'.
+ - The 'backout' command now runs an editor by default, to let you
+   modify the commit message for a backed-out changeset.
+ - An earlier problem with parsing of tags has been fixed.
+   This makes tag parsing slower but more reliable.
+
+ Memory usage and performance improvements:
+ - The 'remove' command has been rewritten to be hundreds of times
+   faster in large repositories.
+ - It is now possible to 'clone' a repository very quickly over a
+   LAN, if the server is configured to allow it.  See the new 'server'
+   section in the 'hgrc' documentation.
+
+ Other changes of note:
+ - Mercurial will now print help for an extension if you type 'hg
+   help EXT_NAME'.
+ - The usual array of bug fixes and documentation improvements.
+ - The integrated web server is now more WSGI-compliant.
+ - Work has begun to solidify Mercurial's API for use by third-party
+   packages.
+
+
 2006-05-10  v0.9
 
 * Major changes between Mercurial 0.8.1 and 0.9:
--- a/doc/hgrc.5.txt	Thu Jul 27 21:25:39 2006 +0200
+++ b/doc/hgrc.5.txt	Thu Jul 27 12:36:17 2006 -0700
@@ -138,9 +138,17 @@
   from;;
     Optional.  Email address to use in "From" header and SMTP envelope
     of outgoing messages.
+  to;;
+    Optional.  Comma-separated list of recipients' email addresses.
+  cc;;
+    Optional.  Comma-separated list of carbon copy recipients'
+    email addresses.
+  bcc;;
+    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 "[mail]" for
+    "smtp" (default), use SMTP (see section "[smtp]" for
     configuration).  Otherwise, use as name of program to run that
     acts like sendmail (takes "-f" option for sender, list of
     recipients on command line, message on stdin).  Normally, setting
@@ -194,7 +202,8 @@
 
   changegroup;;
     Run after a changegroup has been added via push, pull or
-    unbundle. ID of the first new changeset is in $HG_NODE.
+    unbundle. ID of the first new changeset is in $HG_NODE.  URL from
+    which changes came is in $HG_URL.
   commit;;
     Run after a changeset has been created in the local repository.
     ID of the newly created changeset is in $HG_NODE.  Parent
@@ -202,7 +211,7 @@
   incoming;;
     Run after a changeset has been pulled, pushed, or unbundled into
     the local repository.  The ID of the newly arrived changeset is in
-    $HG_NODE.
+    $HG_NODE.  URL that was source of changes came is in $HG_URL.
   outgoing;;
     Run after sending changes from local repository to another.  ID of
     first changeset sent is in $HG_NODE.  Source of operation is in
@@ -210,7 +219,8 @@
   prechangegroup;;
     Run before a changegroup is added via push, pull or unbundle.
     Exit status 0 allows the changegroup to proceed.  Non-zero status
-    will cause the push, pull or unbundle to fail.
+    will cause the push, pull or unbundle to fail.  URL from which
+    changes will come is in $HG_URL.
   precommit;;
     Run before starting a local commit.  Exit status 0 allows the
     commit to proceed.  Non-zero status will cause the commit to fail.
@@ -236,7 +246,8 @@
     before accepting them.  Passed the ID of the first new changeset
     in $HG_NODE.  Exit status 0 allows the transaction to commit.
     Non-zero status will cause the transaction to be rolled back and
-    the push, pull or unbundle will fail.
+    the push, pull or unbundle will fail.  URL that was source of
+    changes is in $HG_URL.
   pretxncommit;;
     Run after a changeset has been created but the transaction not yet
     committed.  Changeset is visible to hook program.  This lets you
@@ -440,6 +451,9 @@
   push_ssl;;
     Whether to require that inbound pushes be transported over SSL to
     prevent password sniffing.  Default is true.
+  stripes;;
+    How many lines a "zebra stripe" should span in multiline output.
+    Default is 1; set to 0 to disable.
   style;;
     Which template map style to use.
   templates;;
--- a/hgext/extdiff.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/hgext/extdiff.py	Thu Jul 27 12:36:17 2006 -0700
@@ -22,6 +22,9 @@
 #   cmd.vdiff = kdiff3
 #   # add new command called meld, runs meld (no need to name twice)
 #   cmd.meld =
+#   # add new command called vimdiff, runs gvimdiff with DirDiff plugin
+#   #(see http://www.vim.org/scripts/script.php?script_id=102)
+#   cmd.vimdiff = LC_ALL=C gvim -f '+bdel 1 2' '+ execute "DirDiff ".argv(0)." ".argv(1)'
 #
 # you can use -I/-X and list of file or directory names like normal
 # "hg diff" command. extdiff makes snapshots of only needed files, so
--- a/hgext/mq.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/hgext/mq.py	Thu Jul 27 12:36:17 2006 -0700
@@ -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
@@ -852,6 +924,8 @@
         else:
             start = self.series.index(patch) + 1
         for p in self.series[start:]:
+            if self.ui.verbose:
+                self.ui.write("%d " % self.series.index(p))
             self.ui.write("%s\n" % p)
 
     def qseries(self, repo, missing=None):
@@ -974,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:
@@ -999,8 +1082,11 @@
 
     def appliedname(self, index):
         p = self.applied[index]
+        pname = p.split(':')[1]
         if not self.ui.verbose:
-            p = p.split(':')[1]
+            p = pname
+        else:
+            p = str(self.series.index(pname)) + " " + p
         return p
 
     def top(self, repo):
@@ -1015,7 +1101,10 @@
         if end == len(self.series):
             self.ui.write("All patches applied\n")
         else:
-            self.ui.write(self.series[end] + '\n')
+            p = self.series[end]
+            if self.ui.verbose:
+                self.ui.write("%d " % self.series.index(p))
+            self.ui.write(p + '\n')
 
     def prev(self, repo):
         if len(self.applied) > 1:
@@ -1055,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)
@@ -1136,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
 
@@ -1208,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
 
@@ -1226,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()
@@ -1272,28 +1362,30 @@
 
 def reposetup(ui, repo):
     repomap[repo] = queue(ui, repo.join(""))
-    oldlookup = repo.lookup
+    oldtags = repo.tags
+
+    def qtags():
+        if repo.tagscache:
+            return repo.tagscache
 
-    def qlookup(key):
-        try:
-            return oldlookup(key)
-        except hg.RepoError:
-            q = repomap[repo]
+        tagscache = oldtags()
+
+        q = repomap[repo]
+        if len(q.applied) == 0:
+            return tagscache
 
-            qpatchnames = { 'qtip': -1, 'qbase': 0 }
-            if key in qpatchnames:
-                if len(q.applied) == 0:
-                    self.ui.warn('No patches applied\n')
-                    raise
-                patch = q.applied[qpatchnames[key]].split(':')[0]
-                return revlog.bin(patch)
+        mqtags = [patch.split(':') for patch in q.applied]
+        mqtags.append((mqtags[-1][0], 'qtip'))
+        mqtags.append((mqtags[0][0], 'qbase'))
+        for patch in mqtags:
+            if patch[1] in tagscache:
+                repo.ui.warn('Tag %s overrides mq patch of the same name\n' % patch[1])
+            else:
+                tagscache[patch[1]] = revlog.bin(patch[0])
 
-            patch = q.isapplied(key)
-            if not patch:
-                raise
-            return revlog.bin(patch[1])
+        return tagscache
 
-    repo.lookup = qlookup
+    repo.tags = qtags
 
 cmdtable = {
     "qapplied": (applied, [], 'hg qapplied [PATCH]'),
@@ -1315,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":
@@ -1336,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'),
@@ -1345,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/hgext/patchbomb.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/hgext/patchbomb.py	Thu Jul 27 12:36:17 2006 -0700
@@ -38,6 +38,7 @@
 # from = My Name <my@email>
 # to = recipient1, recipient2, ...
 # cc = cc1, cc2, ...
+# bcc = bcc1, bcc2, ...
 
 from mercurial.demandload import *
 demandload(globals(), '''email.MIMEMultipart email.MIMEText email.Utils
@@ -185,6 +186,10 @@
     to = getaddrs('to', 'To')
     cc = getaddrs('cc', 'Cc', '')
 
+    bcc = opts['bcc'] or (ui.config('email', 'bcc') or
+                          ui.config('patchbomb', 'bcc') or '').split(',')
+    bcc = [a.strip() for a in bcc if a.strip()]
+
     if len(patches) > 1:
         ui.write(_('\nWrite the introductory message for the patch series.\n\n'))
 
@@ -242,7 +247,8 @@
         start_time += 1
         m['From'] = sender
         m['To'] = ', '.join(to)
-        if cc: m['Cc'] = ', '.join(cc)
+        if cc: m['Cc']  = ', '.join(cc)
+        if bcc: m['Bcc'] = ', '.join(bcc)
         if opts['test']:
             ui.status('Displaying ', m['Subject'], ' ...\n')
             fp = os.popen(os.getenv('PAGER', 'more'), 'w')
@@ -263,12 +269,13 @@
             fp.close()
         else:
             ui.status('Sending ', m['Subject'], ' ...\n')
-            mail.sendmail(sender, to + cc, m.as_string(0))
+            mail.sendmail(sender, to + bcc + cc, m.as_string(0))
 
 cmdtable = {
     'email':
     (patchbomb,
-     [('c', 'cc', [], 'email addresses of copy recipients'),
+     [('', 'bcc', [], 'email addresses of blind copy recipients'),
+      ('c', 'cc', [], 'email addresses of copy recipients'),
       ('d', 'diffstat', None, 'add diffstat output to messages'),
       ('f', 'from', '', 'email address of sender'),
       ('', 'plain', None, 'omit hg patch header'),
--- a/mercurial/bundlerepo.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/bundlerepo.py	Thu Jul 27 12:36:17 2006 -0700
@@ -159,6 +159,10 @@
 class bundlerepository(localrepo.localrepository):
     def __init__(self, ui, path, bundlename):
         localrepo.localrepository.__init__(self, ui, path)
+
+        self._url = 'bundle:' + bundlename
+        if path: self._url += '+' + path
+
         self.tempfile = None
         self.bundlefile = open(bundlename, "rb")
         header = self.bundlefile.read(6)
@@ -208,6 +212,9 @@
             for c in changegroup.chunkiter(self.bundlefile):
                 pass
 
+    def url(self):
+        return self._url
+
     def dev(self):
         return -1
 
--- a/mercurial/commands.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/commands.py	Thu Jul 27 12:36:17 2006 -0700
@@ -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)
@@ -2763,7 +2768,8 @@
         raise util.Abort(_("%s: unknown bundle compression type")
                          % fname)
     gen = generator(util.filechunkiter(f, 4096))
-    modheads = repo.addchangegroup(util.chunkbuffer(gen), 'unbundle')
+    modheads = repo.addchangegroup(util.chunkbuffer(gen), 'unbundle',
+                                   'bundle:' + fname)
     return postincoming(ui, repo, modheads, opts['update'])
 
 def undo(ui, repo):
--- a/mercurial/dirstate.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/dirstate.py	Thu Jul 27 12:36:17 2006 -0700
@@ -344,6 +344,10 @@
     # directly by this function, but might be modified by your statmatch call.
     #
     def walkhelper(self, files, statmatch, dc, badmatch=None):
+        # self.root may end with a path separator when self.root == '/'
+        common_prefix_len = len(self.root)
+        if not self.root.endswith('/'):
+            common_prefix_len += 1
         # recursion free walker, faster than os.walk.
         def findfiles(s):
             work = [s]
@@ -352,7 +356,7 @@
                 names = os.listdir(top)
                 names.sort()
                 # nd is the top of the repository dir tree
-                nd = util.normpath(top[len(self.root) + 1:])
+                nd = util.normpath(top[common_prefix_len:])
                 if nd == '.':
                     nd = ''
                 else:
--- a/mercurial/hgweb/hgweb_mod.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Jul 27 12:36:17 2006 -0700
@@ -37,6 +37,7 @@
         self.mtime = -1
         self.reponame = name
         self.archives = 'zip', 'gz', 'bz2'
+        self.stripecount = 1
         self.templatepath = self.repo.ui.config("web", "templates",
                                                 templater.templatepath())
 
@@ -46,6 +47,8 @@
             self.mtime = mtime
             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)
 
@@ -158,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:
@@ -173,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
@@ -219,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,
@@ -265,7 +270,7 @@
                 hn = hex(n)
 
                 yield self.t('searchentry',
-                             parity=count & 1,
+                             parity=self.stripes(count),
                              author=changes[1],
                              parent=self.siblings(cl.parents(n), cl.rev),
                              child=self.siblings(cl.children(n), cl.rev),
@@ -376,7 +381,7 @@
             for l, t in enumerate(text.splitlines(1)):
                 yield {"line": t,
                        "linenumber": "% 6d" % (l + 1),
-                       "parity": l & 1}
+                       "parity": self.stripes(l)}
 
         yield self.t("filerevision",
                      file=f,
@@ -409,7 +414,7 @@
         mfn = cs[0]
 
         def annotate(**map):
-            parity = 1
+            parity = 0
             last = None
             for r, l in fl.annotate(n):
                 try:
@@ -489,10 +494,10 @@
                 yield {"file": full,
                        "manifest": mnode,
                        "filenode": hex(fnode),
-                       "parity": parity,
+                       "parity": self.stripes(parity),
                        "basename": f,
                        "permissions": mff[full]}
-                parity = 1 - parity
+                parity += 1
 
         def dirlist(**map):
             parity = 0
@@ -503,11 +508,11 @@
                 if fnode:
                     continue
 
-                yield {"parity": parity,
+                yield {"parity": self.stripes(parity),
                        "path": os.path.join(path, f),
                        "manifest": mnode,
                        "basename": f[:-1]}
-                parity = 1 - parity
+                parity += 1
 
         yield self.t("manifest",
                      manifest=mnode,
@@ -530,12 +535,12 @@
             parity = 0
             for k,n in i:
                 if notip and k == "tip": continue
-                yield {"parity": parity,
+                yield {"parity": self.stripes(parity),
                        "tag": k,
                        "tagmanifest": hex(cl.read(n)[0]),
                        "date": cl.read(n)[2],
                        "node": hex(n)}
-                parity = 1 - parity
+                parity += 1
 
         yield self.t("tags",
                      manifest=hex(mf),
@@ -565,12 +570,12 @@
                 t = c[2]
 
                 yield self.t("tagentry",
-                             parity = parity,
+                             parity = self.stripes(parity),
                              tag = k,
                              node = hex(n),
                              date = t,
                              tagmanifest = hex(m))
-                parity = 1 - parity
+                parity += 1
 
         def changelist(**map):
             parity = 0
@@ -609,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
@@ -689,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)],
@@ -752,6 +759,13 @@
         else:
             req.write(self.t("error"))
 
+    def stripes(self, parity):
+        "make horizontal stripes for easier reading"
+        if self.stripecount:
+            return (1 + parity / self.stripecount) & 1
+        else:
+            return 0
+
     def do_changelog(self, req):
         hi = self.repo.changelog.count() - 1
         if req.form.has_key('rev'):
@@ -764,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]))
 
@@ -895,9 +921,13 @@
         # require ssl by default, auth info cannot be sniffed and
         # replayed
         ssl_req = self.repo.ui.configbool('web', 'push_ssl', True)
-        if ssl_req and not req.env.get('HTTPS'):
-            bail(_('ssl required\n'))
-            return
+        if ssl_req:
+            if not req.env.get('HTTPS'):
+                bail(_('ssl required\n'))
+                return
+            proto = 'https'
+        else:
+            proto = 'http'
 
         # do not allow push unless explicitly allowed
         if not self.check_perm(req, 'push', False):
@@ -943,7 +973,9 @@
                 sys.stdout = cStringIO.StringIO()
 
                 try:
-                    ret = self.repo.addchangegroup(fp, 'serve')
+                    url = 'remote:%s:%s' % (proto,
+                                            req.env.get('REMOTE_HOST', ''))
+                    ret = self.repo.addchangegroup(fp, 'serve', url)
                 finally:
                     val = sys.stdout.getvalue()
                     sys.stdout = old_stdout
--- a/mercurial/httprepo.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/httprepo.py	Thu Jul 27 12:36:17 2006 -0700
@@ -115,6 +115,7 @@
 
 class httprepository(remoterepository):
     def __init__(self, ui, path):
+        self.path = path
         self.caps = None
         scheme, netloc, urlpath, query, frag = urlparse.urlsplit(path)
         if query or frag:
@@ -124,8 +125,8 @@
         host, port, user, passwd = netlocsplit(netloc)
 
         # urllib cannot handle URLs with embedded user or passwd
-        self.url = urlparse.urlunsplit((scheme, netlocunsplit(host, port),
-                                        urlpath, '', ''))
+        self._url = urlparse.urlunsplit((scheme, netlocunsplit(host, port),
+                                         urlpath, '', ''))
         self.ui = ui
 
         proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy')
@@ -189,6 +190,9 @@
         opener.addheaders = [('User-agent', 'mercurial/proto-1.0')]
         urllib2.install_opener(opener)
 
+    def url(self):
+        return self.path
+
     # look up capabilities only when needed
 
     def get_caps(self):
@@ -213,7 +217,7 @@
         q = {"cmd": cmd}
         q.update(args)
         qs = urllib.urlencode(q)
-        cu = "%s?%s" % (self.url, qs)
+        cu = "%s?%s" % (self._url, qs)
         try:
             resp = urllib2.urlopen(urllib2.Request(cu, data, headers))
         except urllib2.HTTPError, inst:
@@ -234,13 +238,13 @@
                not proto.startswith('text/plain') and \
                not proto.startswith('application/hg-changegroup'):
             raise hg.RepoError(_("'%s' does not appear to be an hg repository") %
-                               self.url)
+                               self._url)
 
         if proto.startswith('application/mercurial'):
             version = proto[22:]
             if float(version) > 0.1:
                 raise hg.RepoError(_("'%s' uses newer protocol %s") %
-                                   (self.url, version))
+                                   (self._url, version))
 
         return resp
 
--- a/mercurial/localrepo.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/localrepo.py	Thu Jul 27 12:36:17 2006 -0700
@@ -83,6 +83,9 @@
 
         self.dirstate = dirstate.dirstate(self.opener, self.ui, self.root)
 
+    def url(self):
+        return 'file:' + self.root
+
     def hook(self, name, throw=False, **args):
         def callhook(hname, funcname):
             '''call python hook. hook is callable object, looked up as
@@ -1185,7 +1188,7 @@
             cg = remote.changegroup(fetch, 'pull')
         else:
             cg = remote.changegroupsubset(fetch, heads, 'pull')
-        return self.addchangegroup(cg, 'pull')
+        return self.addchangegroup(cg, 'pull', remote.url())
 
     def push(self, remote, force=False, revs=None):
         # there are two ways to push to remote repo:
@@ -1241,7 +1244,7 @@
         ret = self.prepush(remote, force, revs)
         if ret[0] is not None:
             cg, remote_heads = ret
-            return remote.addchangegroup(cg, 'push')
+            return remote.addchangegroup(cg, 'push', self.url())
         return ret[1]
 
     def push_unbundle(self, remote, force, revs):
@@ -1594,7 +1597,7 @@
 
         return util.chunkbuffer(gengroup())
 
-    def addchangegroup(self, source, srctype):
+    def addchangegroup(self, source, srctype, url):
         """add changegroup to repo.
         returns number of heads modified or added + 1."""
 
@@ -1608,7 +1611,7 @@
         if not source:
             return 0
 
-        self.hook('prechangegroup', throw=True, source=srctype)
+        self.hook('prechangegroup', throw=True, source=srctype, url=url)
 
         changesets = files = revisions = 0
 
@@ -1675,17 +1678,18 @@
 
         if changesets > 0:
             self.hook('pretxnchangegroup', throw=True,
-                      node=hex(self.changelog.node(cor+1)), source=srctype)
+                      node=hex(self.changelog.node(cor+1)), source=srctype,
+                      url=url)
 
         tr.close()
 
         if changesets > 0:
             self.hook("changegroup", node=hex(self.changelog.node(cor+1)),
-                      source=srctype)
+                      source=srctype, url=url)
 
             for i in range(cor + 1, cnr + 1):
                 self.hook("incoming", node=hex(self.changelog.node(i)),
-                          source=srctype)
+                          source=srctype, url=url)
 
         return newheads - oldheads + 1
 
--- a/mercurial/sshrepo.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/sshrepo.py	Thu Jul 27 12:36:17 2006 -0700
@@ -13,7 +13,7 @@
 
 class sshrepository(remoterepository):
     def __init__(self, ui, path, create=0):
-        self.url = path
+        self._url = path
         self.ui = ui
 
         m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path)
@@ -48,6 +48,9 @@
 
         self.validate_repo(ui, sshcmd, args, remotecmd)
 
+    def url(self):
+        return self._url
+
     def validate_repo(self, ui, sshcmd, args, remotecmd):
         cmd = '%s %s "%s -R %s serve --stdio"'
         cmd = cmd % (sshcmd, args, remotecmd, self.path)
@@ -180,7 +183,7 @@
             return 1
         return int(r)
 
-    def addchangegroup(self, cg, source):
+    def addchangegroup(self, cg, source, url):
         d = self.call("addchangegroup")
         if d:
             raise hg.RepoError(_("push refused: %s") % d)
--- a/mercurial/sshserver.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/sshserver.py	Thu Jul 27 12:36:17 2006 -0700
@@ -117,9 +117,13 @@
             return
 
         self.respond("")
-        r = self.repo.addchangegroup(self.fin, 'serve')
+        r = self.repo.addchangegroup(self.fin, 'serve', self.client_url())
         self.respond(str(r))
 
+    def client_url(self):
+        client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0]
+        return 'remote:ssh:' + client
+        
     def do_unbundle(self):
         their_heads = self.getarg()[1].split()
 
@@ -159,7 +163,7 @@
                 # push can proceed
 
                 fp.seek(0)
-                r = self.repo.addchangegroup(fp, 'serve')
+                r = self.repo.addchangegroup(fp, 'serve', self.client_url())
                 self.respond(str(r))
             finally:
                 if not was_locked:
--- a/mercurial/statichttprepo.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/mercurial/statichttprepo.py	Thu Jul 27 12:36:17 2006 -0700
@@ -30,6 +30,7 @@
 
 class statichttprepository(localrepo.localrepository):
     def __init__(self, ui, path):
+        self._url = path
         self.path = (path + "/.hg")
         self.ui = ui
         self.revlogversion = 0
@@ -41,6 +42,9 @@
         self.encodepats = None
         self.decodepats = None
 
+    def url(self):
+        return 'static-' + self._url
+
     def dev(self):
         return -1
 
--- a/templates/changelog-gitweb.tmpl	Thu Jul 27 21:25:39 2006 +0200
+++ b/templates/changelog-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/changelog.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/changeset-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/changeset.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/error-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/fileannotate-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/fileannotate.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/filediff.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/filelog-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/filelog.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/filerevision-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/filerevision.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/manifest-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/manifest.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/map	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/search-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/search.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/shortlog-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 12:36:17 2006 -0700
@@ -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 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/static/style.css	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/summary-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/tags-gitweb.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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 21:25:39 2006 +0200
+++ b/templates/tags.tmpl	Thu Jul 27 12:36:17 2006 -0700
@@ -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>
--- a/tests/run-tests.py	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/run-tests.py	Thu Jul 27 12:36:17 2006 -0700
@@ -25,7 +25,7 @@
 parser.add_option("-v", "--verbose", action="store_true",
     help="output verbose messages")
 parser.add_option("-t", "--timeout", type="int",
-    help="output verbose messages")
+    help="kill errant tests after TIMEOUT seconds")
 parser.add_option("-c", "--cover", action="store_true",
     help="print a test coverage report")
 parser.add_option("-s", "--cover_stdlib", action="store_true",
--- a/tests/test-bundle	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-bundle	Thu Jul 27 12:36:17 2006 -0700
@@ -38,6 +38,8 @@
 hg init empty
 cd empty
 hg -R bundle://../full.hg log
+echo '[hooks]' >> .hg/hgrc
+echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
 #doesn't work (yet ?)
 #hg -R bundle://../full.hg verify
 hg pull bundle://../full.hg
--- a/tests/test-bundle.out	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-bundle.out	Thu Jul 27 12:36:17 2006 -0700
@@ -81,6 +81,7 @@
 date:        Mon Jan 12 13:46:40 1970 +0000
 summary:     0.0
 
+changegroup: u=bundle:../full.hg
 pulling from bundle://../full.hg
 requesting all changes
 adding changesets
--- a/tests/test-hook	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-hook	Thu Jul 27 12:36:17 2006 -0700
@@ -17,9 +17,9 @@
 
 # changegroup hooks can see env vars
 echo '[hooks]' > .hg/hgrc
-echo 'prechangegroup = echo prechangegroup hook' >> .hg/hgrc
-echo 'changegroup = echo changegroup hook: n=$HG_NODE' >> .hg/hgrc
-echo 'incoming = echo incoming hook: n=$HG_NODE' >> .hg/hgrc
+echo 'prechangegroup = echo prechangegroup hook: u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc
+echo 'changegroup = echo changegroup hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc
+echo 'incoming = echo incoming hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc
 
 # pretxncommit and commit hooks can see both parents of merge
 cd ../a
--- a/tests/test-hook.out	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-hook.out	Thu Jul 27 12:36:17 2006 -0700
@@ -22,11 +22,11 @@
 3:4c52fb2e4022
 commit hook: n=4c52fb2e402287dd5dc052090682536c8406c321 p1=1324a5531bac09b329c3845d35ae6a7526874edb p2=b702efe9688826e3a91283852b328b84dbf37bc2
 commit hook b
-prechangegroup hook
-changegroup hook: n=b702efe9688826e3a91283852b328b84dbf37bc2
-incoming hook: n=b702efe9688826e3a91283852b328b84dbf37bc2
-incoming hook: n=1324a5531bac09b329c3845d35ae6a7526874edb
-incoming hook: n=4c52fb2e402287dd5dc052090682536c8406c321
+prechangegroup hook: u=file:
+changegroup hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 u=file:
+incoming hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 u=file:
+incoming hook: n=1324a5531bac09b329c3845d35ae6a7526874edb u=file:
+incoming hook: n=4c52fb2e402287dd5dc052090682536c8406c321 u=file:
 pulling from ../a
 searching for changes
 adding changesets
--- a/tests/test-http	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-http	Thu Jul 27 12:36:17 2006 -0700
@@ -4,22 +4,31 @@
 cd test
 echo foo>foo
 hg commit -A -d '0 0' -m 1
-hg --config server.uncompressed=True serve -p 20059 -d --pid-file=hg1.pid
-cat hg1.pid >> $DAEMON_PIDS
-hg serve -p 20060 -d --pid-file=hg2.pid
-cat hg2.pid >> $DAEMON_PIDS
+hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid
+hg serve -p 20060 -d --pid-file=../hg2.pid
 cd ..
+cat hg1.pid hg2.pid >> $DAEMON_PIDS
 
 echo % clone via stream
 http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \
   sed -e 's/[0-9][0-9.]*/XXX/g'
-cd copy
-hg verify
+hg verify -R copy
 
 echo % try to clone via stream, should use pull instead
 http_proxy= hg clone --uncompressed http://localhost:20060/ copy2
 
 echo % clone via pull
 http_proxy= hg clone http://localhost:20059/ copy-pull
+hg verify -R copy-pull
+
+cd test
+echo bar > bar
+hg commit -A -d '1 0' -m 2
+cd ..
+
+echo % pull
 cd copy-pull
-hg verify
+echo '[hooks]' >> .hg/hgrc
+echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
+hg pull
+cd ..
--- a/tests/test-http.out	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-http.out	Thu Jul 27 12:36:17 2006 -0700
@@ -28,3 +28,13 @@
 crosschecking files in changesets and manifests
 checking files
 1 files, 1 changesets, 1 total revisions
+adding bar
+% pull
+changegroup: u=http://localhost:20059/
+pulling from http://localhost:20059/
+searching for changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+(run 'hg update' to get a working copy)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-qrefresh-replace-log-message	Thu Jul 27 12:36:17 2006 -0700
@@ -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 12:36:17 2006 -0700
@@ -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
+
+
+
--- a/tests/test-push-http	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-push-http	Thu Jul 27 12:36:17 2006 -0700
@@ -36,13 +36,19 @@
 
 echo % expect success
 echo 'allow_push = *' >> .hg/hgrc
+echo '[hooks]' >> .hg/hgrc
+echo 'changegroup = echo changegroup: u=$HG_URL >> $HGTMP/urls' >> .hg/hgrc
 hg serve -p 20059 -d --pid-file=hg.pid
 cat hg.pid >> $DAEMON_PIDS
 hg --cwd ../test2 push http://localhost:20059/
 kill `cat hg.pid`
 hg rollback
 
+sed 's/\(remote:http.*\):.*/\1/' $HGTMP/urls
+
 echo % expect authorization error: all users denied
+echo '[web]' > .hg/hgrc
+echo 'push_ssl = false' >> .hg/hgrc
 echo 'deny_push = *' >> .hg/hgrc
 hg serve -p 20059 -d --pid-file=hg.pid
 cat hg.pid >> $DAEMON_PIDS
--- a/tests/test-push-http.out	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-push-http.out	Thu Jul 27 12:36:17 2006 -0700
@@ -20,6 +20,7 @@
 adding file changes
 added 1 changesets with 1 changes to 1 files
 rolling back last transaction
+changegroup: u=remote:http
 % expect authorization error: all users denied
 pushing to http://localhost:20059/
 searching for changes
--- a/tests/test-ssh	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-ssh	Thu Jul 27 12:36:17 2006 -0700
@@ -17,6 +17,8 @@
 	exit -1
 fi
 
+SSH_CLIENT='127.0.0.1 1 2'
+export SSH_CLIENT
 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog
 $2
 EOF
@@ -29,6 +31,8 @@
 hg ci -A -m "init" -d "1000000 0" foo
 echo '[server]' > .hg/hgrc
 echo 'uncompressed = True' >> .hg/hgrc
+echo '[hooks]' >> .hg/hgrc
+echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc
 
 cd ..
 
@@ -46,6 +50,9 @@
 cd local
 hg verify
 
+echo '[hooks]' >> .hg/hgrc
+echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc
+
 echo "# empty default pull"
 hg paths
 hg pull -e ../dummyssh
--- a/tests/test-ssh.out	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-ssh.out	Thu Jul 27 12:36:17 2006 -0700
@@ -83,5 +83,7 @@
 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
 Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5:
 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
+changegroup in remote: u=remote:ssh:127.0.0.1
 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
 Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5:
+changegroup in remote: u=remote:ssh:127.0.0.1
--- a/tests/test-static-http	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-static-http	Thu Jul 27 12:36:17 2006 -0700
@@ -37,6 +37,14 @@
 cd local
 hg verify
 cat bar
+
+cd ../remote
+echo baz > quux
+hg commit -A -mtest2 -d '100000000 0'
+
+cd ../local
+echo '[hooks]' >> .hg/hgrc
+echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
 http_proxy= hg pull
 
 kill $!
--- a/tests/test-static-http.out	Thu Jul 27 21:25:39 2006 +0200
+++ b/tests/test-static-http.out	Thu Jul 27 12:36:17 2006 -0700
@@ -19,6 +19,12 @@
 checking files
 1 files, 1 changesets, 1 total revisions
 foo
+adding quux
+changegroup: u=static-http://localhost:20059/remote
 pulling from static-http://localhost:20059/remote
 searching for changes
-no changes found
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+(run 'hg update' to get a working copy)