changeset 3922:693eec9570f3

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Sun, 17 Dec 2006 15:00:56 -0600
parents 6d0d025e125a (current diff) b12eae71382d (diff)
children de6ae8f016af
files
diffstat 8 files changed, 47 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/convert-repo	Sun Dec 17 14:56:12 2006 -0600
+++ b/contrib/convert-repo	Sun Dec 17 15:00:56 2006 -0600
@@ -6,19 +6,20 @@
 # In its current form, it's hardcoded to convert incrementally between
 # git and Mercurial.
 #
-# To use, you must first import the first git version into Mercurial,
-# and establish a mapping between the git commit hash and the hash in
-# Mercurial for that version. This mapping is kept in a simple text
-# file with lines like so:
+# To use, run:
+#
+# convert-repo <git-dir> <hg-dir> <mapfile>
+#
+# (don't forget to create the <hg-dir> repository beforehand)
+#
+# The <mapfile> is a simple text file that maps a git commit hash to
+# the hash in Mercurial for that version, like so:
 #
 # <git hash> <mercurial hash>
 #
-# To convert the rest of the repo, run:
-#
-# convert-repo <git-dir> <hg-dir> <mapfile>
-#
-# This updates the mapfile on each commit copied, so it can be
-# interrupted and can be run repeatedly to copy new commits.
+# If the file doesn't exist, it's automatically created.  It's updated
+# on each commit copied, so convert-repo can be interrupted and can
+# be run repeatedly to copy new commits.
 
 import sys, os, zlib, sha, time
 
--- a/hgext/gpg.py	Sun Dec 17 14:56:12 2006 -0600
+++ b/hgext/gpg.py	Sun Dec 17 15:00:56 2006 -0600
@@ -194,14 +194,25 @@
         return user
 
 def sign(ui, repo, *revs, **opts):
-    """add a signature for the current tip or a given revision"""
+    """add a signature for the current or given revision
+
+    If no revision is given, the parent of the working directory is used,
+    or tip if no revision is checked out.
+    """
+
     mygpg = newgpg(ui, **opts)
     sigver = "0"
     sigmessage = ""
     if revs:
         nodes = [repo.lookup(n) for n in revs]
     else:
-        nodes = [repo.changelog.tip()]
+        nodes = [node for node in repo.dirstate.parents()
+                 if node != hgnode.nullid]
+        if len(nodes) > 1:
+            raise util.Abort(_('uncommitted merge - please provide a '
+                               'specific revision'))
+        if not nodes:
+            nodes = [repo.changelog.tip()]
 
     for n in nodes:
         hexnode = hgnode.hex(n)
--- a/mercurial/commands.py	Sun Dec 17 14:56:12 2006 -0600
+++ b/mercurial/commands.py	Sun Dec 17 15:00:56 2006 -0600
@@ -338,11 +338,11 @@
     changegroup.writebundle(cg, fname, "HG10BZ")
 
 def cat(ui, repo, file1, *pats, **opts):
-    """output the latest or given revisions of files
+    """output the current or given revision of files
 
     Print the specified files as they were at the given revision.
-    If no revision is given then working dir parent is used, or tip
-    if no revision is checked out.
+    If no revision is given, the parent of the working directory is used,
+    or tip if no revision is checked out.
 
     Output may be to a file, in which case the name of the file is
     given using a format string.  The formatting rules are the same as
@@ -1739,9 +1739,11 @@
                 count += 1
 
 def manifest(ui, repo, rev=None):
-    """output the latest or given revision of the project manifest
+    """output the current or given revision of the project manifest
 
     Print a list of version controlled files for the given revision.
+    If no revision is given, the parent of the working directory is used,
+    or tip if no revision is checked out.
 
     The manifest is the list of files being version controlled. If no revision
     is given then the first parent of the working directory is used.
@@ -2398,7 +2400,7 @@
                     ui.write('  %s%s' % (copied, end))
 
 def tag(ui, repo, name, rev_=None, **opts):
-    """add a tag for the current tip or a given revision
+    """add a tag for the current or given revision
 
     Name a particular revision using <name>.
 
@@ -2406,7 +2408,8 @@
     very useful to compare different revision, to go back to significant
     earlier versions or to mark branch points as releases, etc.
 
-    If no revision is given, the parent of the working directory is used.
+    If no revision is given, the parent of the working directory is used,
+    or tip if no revision is checked out.
 
     To facilitate version control, distribution, and merging of tags,
     they are stored as a file named ".hgtags" which is managed
--- a/mercurial/help.py	Sun Dec 17 14:56:12 2006 -0600
+++ b/mercurial/help.py	Sun Dec 17 15:00:56 2006 -0600
@@ -24,7 +24,6 @@
     "12-6"
     "12/6"
     "12/6/6" (Dec 6 2006)
-    "" (Jan 1 00:00:00 1970 UTC)
 
     Lastly, there is Mercurial's internal format:
 
--- a/tests/test-globalopts.out	Sun Dec 17 14:56:12 2006 -0600
+++ b/tests/test-globalopts.out	Sun Dec 17 15:00:56 2006 -0600
@@ -125,7 +125,7 @@
  branch       set or show the current branch name
  branches     list repository named branches
  bundle       create a changegroup file
- cat          output the latest or given revisions of files
+ cat          output the current or given revision of files
  clone        make a copy of an existing repository
  commit       commit the specified files or all outstanding changes
  copy         mark files as copied for the next commit
@@ -140,7 +140,7 @@
  init         create a new repository in the given directory
  locate       locate files matching specific patterns
  log          show revision history of entire repository or files
- manifest     output the latest or given revision of the project manifest
+ manifest     output the current or given revision of the project manifest
  merge        Merge working directory with another revision
  outgoing     show changesets not found in destination
  parents      show the parents of the working dir or revision
@@ -156,7 +156,7 @@
  serve        export the repository via HTTP
  showconfig   show combined config settings from all hgrc files
  status       show changed files in the working directory
- tag          add a tag for the current tip or a given revision
+ tag          add a tag for the current or given revision
  tags         list repository tags
  tip          show the tip revision
  unbundle     apply a changegroup file
@@ -175,7 +175,7 @@
  branch       set or show the current branch name
  branches     list repository named branches
  bundle       create a changegroup file
- cat          output the latest or given revisions of files
+ cat          output the current or given revision of files
  clone        make a copy of an existing repository
  commit       commit the specified files or all outstanding changes
  copy         mark files as copied for the next commit
@@ -190,7 +190,7 @@
  init         create a new repository in the given directory
  locate       locate files matching specific patterns
  log          show revision history of entire repository or files
- manifest     output the latest or given revision of the project manifest
+ manifest     output the current or given revision of the project manifest
  merge        Merge working directory with another revision
  outgoing     show changesets not found in destination
  parents      show the parents of the working dir or revision
@@ -206,7 +206,7 @@
  serve        export the repository via HTTP
  showconfig   show combined config settings from all hgrc files
  status       show changed files in the working directory
- tag          add a tag for the current tip or a given revision
+ tag          add a tag for the current or given revision
  tags         list repository tags
  tip          show the tip revision
  unbundle     apply a changegroup file
--- a/tests/test-help.out	Sun Dec 17 14:56:12 2006 -0600
+++ b/tests/test-help.out	Sun Dec 17 15:00:56 2006 -0600
@@ -46,7 +46,7 @@
  branch       set or show the current branch name
  branches     list repository named branches
  bundle       create a changegroup file
- cat          output the latest or given revisions of files
+ cat          output the current or given revision of files
  clone        make a copy of an existing repository
  commit       commit the specified files or all outstanding changes
  copy         mark files as copied for the next commit
@@ -61,7 +61,7 @@
  init         create a new repository in the given directory
  locate       locate files matching specific patterns
  log          show revision history of entire repository or files
- manifest     output the latest or given revision of the project manifest
+ manifest     output the current or given revision of the project manifest
  merge        Merge working directory with another revision
  outgoing     show changesets not found in destination
  parents      show the parents of the working dir or revision
@@ -77,7 +77,7 @@
  serve        export the repository via HTTP
  showconfig   show combined config settings from all hgrc files
  status       show changed files in the working directory
- tag          add a tag for the current tip or a given revision
+ tag          add a tag for the current or given revision
  tags         list repository tags
  tip          show the tip revision
  unbundle     apply a changegroup file
@@ -92,7 +92,7 @@
  branch       set or show the current branch name
  branches     list repository named branches
  bundle       create a changegroup file
- cat          output the latest or given revisions of files
+ cat          output the current or given revision of files
  clone        make a copy of an existing repository
  commit       commit the specified files or all outstanding changes
  copy         mark files as copied for the next commit
@@ -107,7 +107,7 @@
  init         create a new repository in the given directory
  locate       locate files matching specific patterns
  log          show revision history of entire repository or files
- manifest     output the latest or given revision of the project manifest
+ manifest     output the current or given revision of the project manifest
  merge        Merge working directory with another revision
  outgoing     show changesets not found in destination
  parents      show the parents of the working dir or revision
@@ -123,7 +123,7 @@
  serve        export the repository via HTTP
  showconfig   show combined config settings from all hgrc files
  status       show changed files in the working directory
- tag          add a tag for the current tip or a given revision
+ tag          add a tag for the current or given revision
  tags         list repository tags
  tip          show the tip revision
  unbundle     apply a changegroup file
--- a/tests/test-hup	Sun Dec 17 14:56:12 2006 -0600
+++ b/tests/test-hup	Sun Dec 17 15:00:56 2006 -0600
@@ -10,7 +10,4 @@
 sleep 3
 kill -HUP $P
 wait
-ls -R .hg
-
-
-
+echo .hg/* .hg/store/*
--- a/tests/test-hup.out	Sun Dec 17 14:56:12 2006 -0600
+++ b/tests/test-hup.out	Sun Dec 17 15:00:56 2006 -0600
@@ -4,11 +4,4 @@
 killed!
 transaction abort!
 rollback completed
-.hg:
-00changelog.i
-journal.dirstate
-requires
-store
-
-.hg/store:
-00changelog.i
+.hg/00changelog.i .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i