Patchwork [4,of,8] convert: add closemap option

login
register
mail settings
Submitter Sean Farley
Date Feb. 4, 2014, 12:09 a.m.
Message ID <2683b86e1c19445be3ba.1391472575@laptop.local>
Download mbox | patch
Permalink /patch/3460/
State Accepted
Commit 81cf597dafa9b339c4fadbafe2217ab3d5675532
Headers show

Comments

Sean Farley - Feb. 4, 2014, 12:09 a.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@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.

Patch

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