Patchwork [8,of,8] convert: add tagmap option

login
register
mail settings
Submitter Sean Farley
Date Feb. 4, 2014, 12:09 a.m.
Message ID <f2b68517b6bacd84c55c.1391472579@laptop.local>
Download mbox | patch
Permalink /patch/3464/
State Accepted
Commit b75a04502ced539b2c18dc1955fb59b933cbf46e
Headers show

Comments

Sean Farley - Feb. 4, 2014, 12:09 a.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1390427001 21600
#      Wed Jan 22 15:43:21 2014 -0600
# Node ID f2b68517b6bacd84c55cef85f9e6b054cb509b96
# Parent  110bfd6fac2ebf95cef12882b095bfce589f6851
convert: add tagmap option

Tests have been updated.
Matt Mackall - Feb. 6, 2014, 8:19 p.m.
On Mon, 2014-02-03 at 18:09 -0600, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@gmail.com>
> # Date 1390427001 21600
> #      Wed Jan 22 15:43:21 2014 -0600
> # Node ID f2b68517b6bacd84c55cef85f9e6b054cb509b96
> # Parent  110bfd6fac2ebf95cef12882b095bfce589f6851
> convert: add tagmap option

These are queued for default, thanks.

Patch

diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -143,10 +143,14 @@  def convert(ui, src, dest=None, revmapfi
 
     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.
 
+    The tagpmap is a file that exactly analogous to the branchmap. This will
+    rename tags on the fly and prevent the 'update tags' commit usually found
+    at the end of a convert process.
+
     Mercurial Source
     ################
 
     The Mercurial source recognizes the following configuration
     options, which you can set on the command line with ``--config``:
@@ -323,10 +327,12 @@  cmdtable = {
            _('splice synthesized history into place'), _('FILE')),
           ('', 'branchmap', '',
            _('change branch names while converting'), _('FILE')),
           ('', 'closemap', '',
            _('closes given revs'), _('FILE')),
+          ('', 'tagmap', '',
+           _('change tag names while converting'), _('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
@@ -123,10 +123,14 @@ 
   
       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.
   
+      The tagpmap is a file that exactly analogous to the branchmap. This will
+      rename tags on the fly and prevent the 'update tags' commit usually found
+      at the end of a convert process.
+  
       Mercurial Source
       ################
   
       The Mercurial source recognizes the following configuration options, which
       you can set on the command line with "--config":
@@ -269,10 +273,11 @@ 
    -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
+      --tagmap FILE      change tag names while converting
       --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