changeset 377:e5d769afd3ef

Merge with TAH -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Merge with TAH manifest hash: f73215065ecbcfd9a0d0964de5ed73a392837a56 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsQqNywK+sNU5EO8RAiuOAJ4lL23LcxAkbPHy33snasBgrkhNxQCgkBLO ohB0/EA2dAvQtu5sMSW03D8= =lF8D -----END PGP SIGNATURE-----
author mpm@selenic.com
date Wed, 15 Jun 2005 21:13:49 -0800
parents b29219389b00 (diff) fadc9e126369 (current diff)
children 4e23eaffd4ae c8bd9793446d
files mercurial/hg.py mercurial/hgweb.py mercurial/revlog.py templates/changelogentry.tmpl templates/changeset.tmpl templates/fileannotate.tmpl templates/filediff.tmpl templates/filelogentry.tmpl templates/filerevision.tmpl templates/manifest.tmpl templates/map tests/test-conflict.out tests/test-tags.out tests/test-up-local-change.out
diffstat 15 files changed, 58 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Thu Jun 16 05:44:05 2005 +0100
+++ b/mercurial/hg.py	Wed Jun 15 21:13:49 2005 -0800
@@ -9,7 +9,7 @@
 from revlog import *
 from demandload import *
 demandload(globals(), "re lock urllib urllib2 transaction time socket")
-demandload(globals(), "tempfile byterange difflib")
+demandload(globals(), "tempfile httprangereader difflib")
 
 def is_exec(f):
     return (os.stat(f).st_mode & 0100 != 0)
@@ -321,7 +321,7 @@
     def o(path, mode="r"):
         if p[:7] == "http://":
             f = os.path.join(p, urllib.quote(path))
-            return httprangereader(f)
+            return httprangereader.httprangereader(f)
 
         f = os.path.join(p, path)
 
@@ -1416,18 +1416,3 @@
     else:
         return localrepository(ui, path, create)
 
-class httprangereader:
-    def __init__(self, url):
-        self.url = url
-        self.pos = 0
-    def seek(self, pos):
-        self.pos = pos
-    def read(self, bytes=None):
-        opener = urllib2.build_opener(byterange.HTTPRangeHandler())
-        urllib2.install_opener(opener)
-        req = urllib2.Request(self.url)
-        end = ''
-        if bytes: end = self.pos + bytes
-        req.add_header('Range', 'bytes=%d-%s' % (self.pos, end))
-        f = urllib2.urlopen(req)
-        return f.read()
--- a/mercurial/hgweb.py	Thu Jun 16 05:44:05 2005 +0100
+++ b/mercurial/hgweb.py	Wed Jun 15 21:13:49 2005 -0800
@@ -129,6 +129,7 @@
             "date": (lambda x: time.asctime(time.gmtime(x))),
             "addbreaks": nl2br,
             "obfuscate": obfuscate,
+            "short": (lambda x: x[:12]),
             "firstline": (lambda x: x.splitlines(1)[0]),
             "permissions": (lambda x: x and "-rwxr-xr-x" or "-rw-r--r--")
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/httprangereader.py	Wed Jun 15 21:13:49 2005 -0800
@@ -0,0 +1,24 @@
+# httprangereader.py - just what it says
+#
+# Copyright 2005 Matt Mackall <mpm@selenic.com>
+#
+# This software may be used and distributed according to the terms
+# of the GNU General Public License, incorporated herein by reference.
+
+import byterange, urllib2
+
+class httprangereader:
+    def __init__(self, url):
+        self.url = url
+        self.pos = 0
+    def seek(self, pos):
+        self.pos = pos
+    def read(self, bytes=None):
+        opener = urllib2.build_opener(byterange.HTTPRangeHandler())
+        urllib2.install_opener(opener)
+        req = urllib2.Request(self.url)
+        end = ''
+        if bytes: end = self.pos + bytes
+        req.add_header('Range', 'bytes=%d-%s' % (self.pos, end))
+        f = urllib2.urlopen(req)
+        return f.read()
--- a/mercurial/revlog.py	Thu Jun 16 05:44:05 2005 +0100
+++ b/mercurial/revlog.py	Wed Jun 15 21:13:49 2005 -0800
@@ -13,7 +13,7 @@
 
 def hex(node): return binascii.hexlify(node)
 def bin(node): return binascii.unhexlify(node)
-def short(node): return hex(node[:4])
+def short(node): return hex(node[:6])
 
 def compress(text):
     if not text: return text
--- a/templates/changelogentry.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/changelogentry.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -5,7 +5,7 @@
  <td><b>#desc|firstline|escape#</b></td></tr>
 <tr>
  <td align="right">changeset #rev#:&nbsp;</td>
- <td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>
+ <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
 <tr>
--- a/templates/changeset.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/changeset.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -1,5 +1,5 @@
 #header#
-<title>#repo|escape#: changeset #node#</title>
+<title>#repo|escape#: changeset #node|short#</title>
 </head>
 <body>
 
@@ -15,12 +15,12 @@
 <table>
 <tr>
  <td class="metatag">changeset #rev#:</td>
- <td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>
+ <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
 <tr>
  <td class="metatag">manifest:</td>
- <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest#</a></td></tr>
+ <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td></tr>
 <tr>
  <td class="metatag">author:</td>
  <td>#author|obfuscate#</td></tr>
--- a/templates/fileannotate.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/fileannotate.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -12,17 +12,17 @@
 <a href="?cmd=filelog;file=#file#;filenode=#filenode#">revisions</a>
 </div>
 
-<h2>Annotate #file# (#filenode#)</h2>
+<h2>Annotate #file# (#filenode|short#)</h2>
 
 <table>
 <tr>
  <td class="metatag">changeset #rev#:</td>
- <td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>
+ <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
 <tr>
  <td class="metatag">manifest:</td>
- <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest#</a></td></tr>
+ <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td></tr>
 <tr>
  <td class="metatag">author:</td>
  <td>#author|obfuscate#</td></tr>
--- a/templates/filediff.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/filediff.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -18,10 +18,10 @@
 <table>
 <tr>
  <td class="metatag">revision #rev#:</td>
- <td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>
+ <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 <tr>
  <td class="metatag">parent #p1rev#:</td>
- <td><a href="?cmd=changeset;node=#p1#">#p1#</a></td></tr>
+ <td><a href="?cmd=changeset;node=#p1#">#p1|short#</a></td></tr>
 </table>
 
 <pre>
--- a/templates/filelogentry.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/filelogentry.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -4,7 +4,7 @@
  <td><b><a href="?cmd=changeset;node=#node#">#desc|firstline|escape#</a></b></td></tr>
 <tr>
  <td align="right">revision #filerev#:&nbsp;</td>
- <td><a href="?cmd=file;file=#file#;filenode=#filenode#">#filenode#</a>
+ <td><a href="?cmd=file;file=#file#;filenode=#filenode#">#filenode|short#</a>
 <a href="?cmd=filediff;file=#file#;node=#node#">(diff)</a>
 <a href="?cmd=annotate;file=#file#;filenode=#filenode#">(annotate)</a>
 </td></tr>
--- a/templates/filerevision.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/filerevision.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -13,17 +13,17 @@
 <a href="?cmd=file;file=#file#;filenode=#filenode#;style=raw">raw</a>
 </div>
 
-<h2>#file# (revision #filenode#)</h2>
+<h2>#file# (revision #filenode|short#)</h2>
 
 <table>
 <tr>
  <td class="metatag">changeset #rev#:</td>
- <td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>
+ <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent1#
 #parent2#
 <tr>
  <td class="metatag">manifest:</td>
- <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest#</a></td></tr>
+ <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td></tr>
 <tr>
  <td class="metatag">author:</td>
  <td>#author|obfuscate#</td></tr>
--- a/templates/manifest.tmpl	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/manifest.tmpl	Wed Jun 15 21:13:49 2005 -0800
@@ -1,5 +1,5 @@
 #header#
-<title>#repo|escape#: manifest #manifest#</title>
+<title>#repo|escape#: manifest #manifest|short#</title>
 </head>
 <body>
 
@@ -9,7 +9,7 @@
 <a href="?cmd=changeset;node=#node#">changeset</a>
 </div>
 
-<h2>manifest: #path#</h2>
+<h2>manifest #manifest|short#: #path#</h2>
 
 <table cellpadding="0" cellspacing="0">
 <tr class="parity1">
--- a/templates/map	Thu Jun 16 05:44:05 2005 +0100
+++ b/templates/map	Wed Jun 15 21:13:49 2005 -0800
@@ -21,10 +21,10 @@
 difflineminus = "<span class="minusline">#line|escape#</span>"
 difflineat = "<span class="atline">#line|escape#</span>"
 diffline = "#line|escape#"
-changelogparent = "<tr><td align="right">parent:&nbsp;</td><td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>"
+changelogparent = "<tr><td align="right">parent:&nbsp;</td><td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>"
 changesetparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=changeset;node=#node#">#node#</a></td></tr>"
-filerevparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=file;file=#file#;filenode=#node#">#node#</a></td></tr>"
-fileannotateparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=annotate;file=#file#;filenode=#node#">#node#</a></td></tr>"
+filerevparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=file;file=#file#;filenode=#node#">#node|short#</a></td></tr>"
+fileannotateparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=annotate;file=#file#;filenode=#node#">#node|short#</a></td></tr>"
 tags = tags.tmpl
 tagentry = "<div class="parity#parity#"><tt>#node#</tt> <a href="?cmd=changeset;node=#node#">#tag#</a><br /></div>"
 diffblock = "<div class="parity#parity#">#lines#</div>"
--- a/tests/test-conflict.out	Thu Jun 16 05:44:05 2005 +0100
+++ b/tests/test-conflict.out	Wed Jun 15 21:13:49 2005 -0800
@@ -12,15 +12,15 @@
 + hg -d up -m 1
 merge: warning: conflicts during merge
 resolving manifests
- ancestor 1c6e5a12 local 35fedfab remote a5801785
+ ancestor 1c6e5a129854 local 35fedfab3325 remote a58017859bdc
  a versions differ, resolve
 working dir created .out, keeping
 merging a
 resolving a
-file a: other d7250518 ancestor 68ba9db7
+file a: other d7250518cb1b ancestor 68ba9db7a9e4
 merging a failed!
 + hg id
-32e80765+75234512+ tip
+32e80765d7fe+75234512624c+ tip
 + cat a
 + grep -v '>>>'
 + grep -v '<<<'
--- a/tests/test-tags.out	Thu Jun 16 05:44:05 2005 +0100
+++ b/tests/test-tags.out	Wed Jun 15 21:13:49 2005 -0800
@@ -8,7 +8,7 @@
 + hg commit -t test -u test -d '0 0'
 + hg co
 + hg identify
-acb14030 tip
+acb14030fe0a tip
 ++ hg -q tip
 ++ cut -d : -f 2
 + T=acb14030fe0a21b60322c440ad2d20cf7685a376
@@ -21,15 +21,15 @@
 tip                                1:b9154636be938d3d431e75a7c906504a079bfe07
 first                              0:acb14030fe0a21b60322c440ad2d20cf7685a376
 + hg identify
-b9154636 tip
+b9154636be93 tip
 + echo bb
 + hg status
 C a
 + hg identify
-b9154636+ tip
+b9154636be93+ tip
 + hg co first
 + hg id
-acb14030+ first
+acb14030fe0a+ first
 + hg -v id
 acb14030fe0a21b60322c440ad2d20cf7685a376+ first
 + hg status
@@ -38,10 +38,10 @@
 + hg add b
 + hg commit -t branch -u test -d '0 0'
 + hg id
-c8edf041 tip
+c8edf04160c7 tip
 + hg co -m 1
 + hg id
-c8edf041+b9154636+ tip
+c8edf04160c7+b9154636be93+ tip
 + hg status
 C a
 C .hgtags
--- a/tests/test-up-local-change.out	Thu Jun 16 05:44:05 2005 +0100
+++ b/tests/test-up-local-change.out	Wed Jun 15 21:13:49 2005 -0800
@@ -28,16 +28,16 @@
 C a
 + hg -d up
 resolving manifests
- ancestor a0c8bcbb local a0c8bcbb remote 1165e8bd
+ ancestor a0c8bcbbb45c local a0c8bcbbb45c remote 1165e8bd193e
  a versions differ, resolve
 remote created b
 getting b
 merging a
 resolving a
-file a: other d730145a ancestor b789fdd9
+file a: other d730145abbf9 ancestor b789fdd96dc2
 + hg -d up -m
 resolving manifests
- ancestor 1165e8bd local 1165e8bd remote 1165e8bd
+ ancestor 1165e8bd193e local 1165e8bd193e remote 1165e8bd193e
 + hg parents
 changeset:   1:1e71731e6fbb5b35fae293120dea6964371c13c6
 user:        test