[PATCH 4 of 8] convert: add closemap option

Sean Farley sean.michael.farley at gmail.com
Mon Feb 3 18:09:35 CST 2014


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1390325717 21600
#      Tue Jan 21 11:35:17 2014 -0600
# Node ID 2683b86e1c19445be3ba676203264b1e88afec0e
# Parent  ffc309a9200cb7d46b3e42d77087f368e23003b6
convert: add closemap option

Tests have been updated.

diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -139,10 +139,14 @@ def convert(ui, src, dest=None, revmapfi
     source repository, and "new_branch_name" is the name of the branch
     is the destination repository. No whitespace is allowed in the
     branch names. This can be used to (for instance) move code in one
     repository from "default" to a named branch.
 
+    The closemap is a file that allows closing of a branch. This is useful if
+    you want to close a branch. Each entry contains a revision or hash
+    separated by white space.
+
     Mercurial Source
     ################
 
     The Mercurial source recognizes the following configuration
     options, which you can set on the command line with ``--config``:
@@ -317,10 +321,12 @@ cmdtable = {
            _('remap file names using contents of file'), _('FILE')),
           ('', 'splicemap', '',
            _('splice synthesized history into place'), _('FILE')),
           ('', 'branchmap', '',
            _('change branch names while converting'), _('FILE')),
+          ('', 'closemap', '',
+           _('closes given revs'), _('FILE')),
           ('', 'branchsort', None, _('try to sort changesets by branches')),
           ('', 'datesort', None, _('try to sort changesets by date')),
           ('', 'sourcesort', None, _('preserve source changesets order')),
           ('', 'closesort', None, _('try to reorder closed revisions'))],
          _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')),
diff --git a/tests/test-convert.t b/tests/test-convert.t
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -119,10 +119,14 @@
       repository, and "new_branch_name" is the name of the branch is the
       destination repository. No whitespace is allowed in the branch names. This
       can be used to (for instance) move code in one repository from "default"
       to a named branch.
   
+      The closemap is a file that allows closing of a branch. This is useful if
+      you want to close a branch. Each entry contains a revision or hash
+      separated by white space.
+  
       Mercurial Source
       ################
   
       The Mercurial source recognizes the following configuration options, which
       you can set on the command line with "--config":
@@ -264,10 +268,11 @@
    -r --rev REV          import up to source revision REV
    -A --authormap FILE   remap usernames using this file
       --filemap FILE     remap file names using contents of file
       --splicemap FILE   splice synthesized history into place
       --branchmap FILE   change branch names while converting
+      --closemap FILE    closes given revs
       --branchsort       try to sort changesets by branches
       --datesort         try to sort changesets by date
       --sourcesort       preserve source changesets order
       --closesort        try to reorder closed revisions
   


More information about the Mercurial-devel mailing list