Pull from TAH
authormpm@selenic.com
Sun, 26 Jun 2005 15:12:51 -0800
changeset 484 934279f3ca53
parent 474 b2ae8283d1a6 (current diff)
parent 483 27f5569a5814 (diff)
child 485 c5705ab9cebd
Pull from TAH -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pull from TAH manifest hash: 470ea90dd95189a019f4d96016a45db8a297b841 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCvzZzywK+sNU5EO8RAkZhAKCUJKX1vFtkFxV7qFwbuWQj62zcnQCfU687 jxKpBVesIXSOpBO4NbW/RIM= =hSBe -----END PGP SIGNATURE-----
TODO
doc/hg.1.txt
hgeditor
mercurial/bdiff.c
mercurial/commands.py
mercurial/hg.py
mercurial/revlog.py
--- a/TODO	Sun Jun 26 15:09:37 2005 -0800
+++ b/TODO	Sun Jun 26 15:12:51 2005 -0800
@@ -13,11 +13,8 @@
 - difflib creating/removing files (fixed except dates: should be epoch)
 - directory foo.d or foo.i with existing file foo (use some quoting?)
 - get various options from hgrc (e.g. history always -v, tip always -q)
-- allow full decimal (part of) hash
-  hg export 5005048662 -> OverflowError: long int too large to convert
-  to int
 - better push support (hack exists)
-- hg over ssh://
+- hg over ssh:// and https://
 - commit mailinglist/trigger/hooks
 
 Commands:
@@ -45,3 +42,4 @@
 - some web servers think hgweb.cgi.[di] is a CGI script with old-http://
   (use quoting (see foo.d in Core) or document server configurations?)
 - link children in hgweb
+- search field searching in descriptions, file names, what else?
--- a/doc/hg.1.txt	Sun Jun 26 15:09:37 2005 -0800
+++ b/doc/hg.1.txt	Sun Jun 26 15:12:51 2005 -0800
@@ -1,7 +1,7 @@
 HG(1)
 =====
 Matt Mackall <mpm@selenic.com>
-v0.6, 27 May 2005
+v0.6, 24 Jun 2005
 
 NAME
 ----
@@ -39,14 +39,14 @@
 path::
     indicates a path on the local machine
 
-revision:: 
+revision::
     indicates a changeset which can be specified as a changeset revision
     number, a tag, or a unique substring of the changeset hash value
 
 repository path::
     is either the pathname of a local repository of the URI of a remote
     repository.  There are two available URI protocols, http:// which is
-    fast and the old-http:// protocol which is much slower but does not 
+    fast and the old-http:// protocol which is much slower but does not
     require a special server on the web host.
 
 COMMANDS
@@ -61,8 +61,8 @@
     files are ignored if they match any of the patterns in .hgignore
 
 annotate [-r <rev> -u -n -c] [files ...]::
-    List the files with each line showing the revision id responsible 
-    for that line. 
+    List the files with each line showing the revision id responsible
+    for that line.
 
     options:
     -r, --revision <rev>  annotate the specified revision
@@ -74,12 +74,12 @@
     Output the given revision or tip of the specified file to stdout.
 
 commit [-A -t -l <file> -t <text> -u <user> -d <datecode>] [files...]::
-    commit all changed files in the working dir to the repository.  This uses
+    Commit all changed files in the working dir to the repository.  This uses
     the EDITOR environment variable to bring up an editor to add a commit
     comment.
 
     Options:
-    
+
     -A, --addremove       run addremove during commit
     -t, --text <text>     use <text> as commit message
     -l, --logfile <file>  read the commit message from the specified
@@ -93,10 +93,10 @@
     Mark a file as copied or renamed for the next commit.
 
 diff [-r revision] [-r revision] [files ...]::
-    Generate a unified diff of the indicated files. If there are no 
-    revisions specified, the working directory file is compared to 
-    the tip, one revision specified indicates a comparison between the 
-    working directory file and the specified revision, and two revisions 
+    Generate a unified diff of the indicated files. If there are no
+    revisions specified, the working directory file is compared to
+    the tip, one revision specified indicates a comparison between the
+    working directory file and the specified revision, and two revisions
     compares the two versions specified.
 
 export [revision]::
@@ -118,7 +118,7 @@
     Print a short identifier of the current state of the repo. This
     includes one or two parent hash identifiers, followed by
     a "+" if there are uncommitted changes in the working directory,
-    followed by a list of tags for this revision
+    followed by a list of tags for this revision.
 
     aliases: id
 
@@ -150,13 +150,13 @@
 
 manifest [revision]::
     Print the indicated revision of the manifest (list of version controlled
-    files)
+    files).
 
 parents::
     Print the working directory's parent revisions.
 
 pull <repository path>::
-    pull any changes from the specified repository to the repository in the
+    Pull any changes from the specified repository to the repository in the
     current directory.
 
     options:
@@ -175,18 +175,21 @@
       ssh://[user@]host[:port]/path
 
 rawcommit [-p -d -u -F -t -l]::
-    Primarily useful for importing from other SCMs. 
+    Primarily useful for importing from other SCMs.
 
 recover::
     Recover from an interrupted commit or pull. This should only be
     necessary when Mercurial suggests it.
 
 remove [files ...]::
-    schedule the indicated files for removal from the repository at the next
-    commit
- 
+    Schedule the indicated files for removal from the repository at the next
+    commit.
+
     aliases: rm
 
+root::
+    Print the root directory of the current repository.
+
 serve [-a addr -n name -p port -t templatedir]::
     Start a local HTTP repository browser and pull server.
 
@@ -213,10 +216,10 @@
     -u, --user <user>     user for commit
 
 tags::
-    List the current tags.
+    List the repository tags.
 
 tip::
-    Show the tip revision
+    Show the tip revision.
 
 undo::
     Undo the last commit or pull transaction.
@@ -256,6 +259,10 @@
 ENVIRONMENT VARIABLES
 ---------------------
 
+HGEDITOR::
+    This is the name of the editor to use when committing. Defaults to the
+    value of EDITOR.
+
 HGMERGE::
     An executable to use for resolving merge conflicts. The program ,
     will be executed with three arguments: local file, remote file,
@@ -271,11 +278,12 @@
     If HGUSER is not set, this will be used as the author for a commit.
 
 LOGNAME::
-    if neither HGUSER nor EMAIL is set, LOGNAME will be used (with
+    If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
     '@hostname' appended) as the author value for a commit.
 
 EDITOR::
-    This is the name of the editor to use when committing. Defaults to 'vi'.
+    This is the name of the editor used in the hgmerge script. It will be
+    used for commit messages, too, if HGEDITOR isn't set. Defaults to 'vi'.
 
 PYTHONPATH::
     This is used by Python to find imported modules and may need to be set
@@ -285,7 +293,7 @@
 -----
  .hgignore::
     This file contains regular expressions (one per line) that describe file
-    names that should be ignored by hg
+    names that should be ignored by hg.
 
  .hgtags::
     This file contains changeset hash values and text tag names (one of each
@@ -306,6 +314,7 @@
 
 [paths]
 hg = http://selenic.com/hg
+tah = http://hg.intevation.org/mercurial-tah/
 
 NON_TRANSPARENT PROXY SUPPORT
 -----------------------------
--- a/hgeditor	Sun Jun 26 15:09:37 2005 -0800
+++ b/hgeditor	Sun Jun 26 15:12:51 2005 -0800
@@ -27,7 +27,12 @@
 
     echo -e "\n\nmanifest hash: $MANIFEST" >> "$T1"
     grep -vE '^(HG: manifest hash .*)?$' "$1" >> "$T1"
-    hg diff >> "$T2"
+    (
+        cd "`hg root`"
+        grep '^HG: changed' "$1" | cut -b 13- | while read changed; do
+            hg diff "$changed" >> "$T2"
+        done
+    )
 
     CHECKSUM=`md5sum "$T1"`
     $EDITOR "$T1" "$T2" || cleanup_exit $?
--- a/mercurial/commands.py	Sun Jun 26 15:09:37 2005 -0800
+++ b/mercurial/commands.py	Sun Jun 26 15:12:51 2005 -0800
@@ -172,13 +172,10 @@
         ui.write('hg commands:\n\n')
 
         h = {}
-        for c,e in table.items():
-            f = c
-            aliases = None
-            if "|" in f:
-                l = f.split("|")
-                f, aliases = l[0], l[1:]
-            if f.startswith("debug"): continue
+        for c, e in table.items():
+            f = c.split("|")[0]
+            if f.startswith("debug"):
+                continue
             d = ""
             if e[0].__doc__:
                 d = e[0].__doc__.splitlines(0)[0].rstrip()
@@ -242,8 +239,6 @@
         node = repo.changelog.lookup(ops['revision'])
     change = repo.changelog.read(node)
     mmap = repo.manifest.read(change[0])
-    maxuserlen = 0
-    maxchangelen = 0
     for f in relpath(repo, (file,) + files):
         lines = repo.file(f).annotate(mmap[f])
         pieces = []
@@ -343,7 +338,7 @@
         revs = map(lambda x: repo.lookup(x), opts['rev'])
 
     if len(revs) > 2:
-        self.ui.warn("too many revisions to diff\n")
+        ui.warn("too many revisions to diff\n")
         sys.exit(1)
 
     if files:
@@ -434,8 +429,7 @@
         files = []
         for l in f.read().splitlines():
             l.rstrip('\r\n');
-            if not quiet:
-                print l
+            ui.status("%s\n" % l)
             if l[:14] == 'patching file ':
                 pf = l[14:]
                 if pf not in files:
@@ -662,15 +656,15 @@
 
 def tags(ui, repo):
     """list repository tags"""
-    
+
     l = repo.tagslist()
     l.reverse()
-    for t,n in l:
+    for t, n in l:
         try:
-            r = repo.changelog.rev(n)
+            r = "%5d:%s" % (repo.changelog.rev(n), hg.hex(n))
         except KeyError:
-            r = "?"
-        print "%-30s %5d:%s" % (t, repo.changelog.rev(n), hg.hex(n))
+            r = "    ?:?"
+        ui.write("%-30s %s\n" % (t, r))
 
 def tip(ui, repo):
     """show the tip revision"""
@@ -782,7 +776,6 @@
 norepo = "init version help debugindex debugindexdot"
 
 def find(cmd):
-    i = None
     for e in table.keys():
         if re.match("(%s)$" % e, cmd):
             return table[e]
--- a/mercurial/hg.py	Sun Jun 26 15:09:37 2005 -0800
+++ b/mercurial/hg.py	Sun Jun 26 15:12:51 2005 -0800
@@ -373,7 +373,7 @@
 
     def tags(self):
         '''return a mapping of tag to node'''
-        if not self.tagscache: 
+        if not self.tagscache:
             self.tagscache = {}
             try:
                 # read each head of the tags file, ending with the tip
@@ -386,11 +386,20 @@
                     for l in fl.revision(r).splitlines():
                         if l:
                             n, k = l.split(" ", 1)
-                            self.tagscache[k.strip()] = bin(n)
-            except KeyError: pass
+                            try:
+                                bin_n = bin(n)
+                            except TypeError:
+                                bin_n = ''
+                            self.tagscache[k.strip()] = bin_n
+            except KeyError:
+                pass
             for k, n in self.ui.configitems("tags"):
-                self.tagscache[k] = bin(n)
-                
+                try:
+                    bin_n = bin(n)
+                except TypeError:
+                    bin_n = ''
+                self.tagscache[k] = bin_n
+
             self.tagscache['tip'] = self.changelog.tip()
 
         return self.tagscache
@@ -398,7 +407,7 @@
     def tagslist(self):
         '''return a list of tags ordered by revision'''
         l = []
-        for t,n in self.tags().items():
+        for t, n in self.tags().items():
             try:
                 r = self.changelog.rev(n)
             except:
--- a/mercurial/revlog.py	Sun Jun 26 15:09:37 2005 -0800
+++ b/mercurial/revlog.py	Sun Jun 26 15:12:51 2005 -0800
@@ -195,7 +195,7 @@
             rev = int(id)
             if str(rev) != id: raise ValueError
             if rev < 0: rev = self.count() + rev
-            if rev < 0 or rev >= self.count: raise ValueError
+            if rev < 0 or rev >= self.count(): raise ValueError
             return self.node(rev)
         except (ValueError, OverflowError):
             c = []