Hi, Quoting "Marko Kreen" <mark...@gmail.com>:
The example was not actual case from Postgres CVS history, but hypotetical situation without checking if it already works with GIT.
Of course it is a simplified example, but it resembles what could happen i.e. to the file doc/src/sgml/generate_history.pl, which got added from a backported patch after forking off REL8_3_STABLE.
If you create separate commits during the conversion, rename that file on the master branch and then - for whatever reason - try to merge the two branches, you will end up having that file twice. That's what I'm warning about. Changes on either or both sides of the merge make the situation worse.
Merging between branches with GIT is fine workflow in the future.
Do you consider the above scenario a fine merge?
My point is that we should avoid fake merges, to avoid obfuscating history.
Understood. It looks like I'm pretty much the only one who cares more about merge capability than nice looking history :-(
Attached is my current options file for cvs2git, it includes requested changes by Alvaro and additional names and emails as given by Tom (thanks again). A current conversion with cvs2git (and with the merges) results in a repository with exactly 0 differences against any branch or tag symbol compared to cvs checkout -kk.
Regards Markus Wanner
# (Be in -*- mode: python; coding: utf-8 -*- mode.) import re from cvs2svn_lib import config from cvs2svn_lib import changeset_database from cvs2svn_lib.common import CVSTextDecoder from cvs2svn_lib.log import Log from cvs2svn_lib.project import Project from cvs2svn_lib.git_revision_recorder import GitRevisionRecorder from cvs2svn_lib.git_output_option import GitRevisionMarkWriter from cvs2svn_lib.git_output_option import GitOutputOption from cvs2svn_lib.revision_manager import NullRevisionRecorder from cvs2svn_lib.revision_manager import NullRevisionExcluder from cvs2svn_lib.fulltext_revision_recorder \ import SimpleFulltextRevisionRecorderAdapter from cvs2svn_lib.rcs_revision_manager import RCSRevisionReader from cvs2svn_lib.cvs_revision_manager import CVSRevisionReader from cvs2svn_lib.checkout_internal import InternalRevisionRecorder from cvs2svn_lib.checkout_internal import InternalRevisionExcluder from cvs2svn_lib.checkout_internal import InternalRevisionReader from cvs2svn_lib.symbol_strategy import AllBranchRule from cvs2svn_lib.symbol_strategy import AllTagRule from cvs2svn_lib.symbol_strategy import BranchIfCommitsRule from cvs2svn_lib.symbol_strategy import ExcludeRegexpStrategyRule from cvs2svn_lib.symbol_strategy import ForceBranchRegexpStrategyRule from cvs2svn_lib.symbol_strategy import ForceTagRegexpStrategyRule from cvs2svn_lib.symbol_strategy import ExcludeTrivialImportBranchRule from cvs2svn_lib.symbol_strategy import ExcludeVendorBranchRule from cvs2svn_lib.symbol_strategy import HeuristicStrategyRule from cvs2svn_lib.symbol_strategy import UnambiguousUsageRule from cvs2svn_lib.symbol_strategy import HeuristicPreferredParentRule from cvs2svn_lib.symbol_strategy import SymbolHintsFileRule from cvs2svn_lib.symbol_transform import ReplaceSubstringsSymbolTransform from cvs2svn_lib.symbol_transform import RegexpSymbolTransform from cvs2svn_lib.symbol_transform import IgnoreSymbolTransform from cvs2svn_lib.symbol_transform import NormalizePathsSymbolTransform from cvs2svn_lib.property_setters import AutoPropsPropertySetter from cvs2svn_lib.property_setters import CVSBinaryFileDefaultMimeTypeSetter from cvs2svn_lib.property_setters import CVSBinaryFileEOLStyleSetter from cvs2svn_lib.property_setters import CVSRevisionNumberSetter from cvs2svn_lib.property_setters import DefaultEOLStyleSetter from cvs2svn_lib.property_setters import EOLStyleFromMimeTypeSetter from cvs2svn_lib.property_setters import ExecutablePropertySetter from cvs2svn_lib.property_setters import KeywordsPropertySetter from cvs2svn_lib.property_setters import MimeMapper from cvs2svn_lib.property_setters import SVNBinaryFileKeywordsPropertySetter Log().log_level = Log.NORMAL ctx.revision_recorder = SimpleFulltextRevisionRecorderAdapter( CVSRevisionReader(cvs_executable=r'cvs'), GitRevisionRecorder('cvs2git-tmp/git-blob.dat'), ) ctx.revision_excluder = NullRevisionExcluder() ctx.revision_reader = None ctx.sort_executable = r'sort' ctx.trunk_only = False ctx.cvs_author_decoder = CVSTextDecoder( ['ascii', 'latin1'], ) ctx.cvs_log_decoder = CVSTextDecoder( ['ascii', 'latin1'], ) ctx.cvs_filename_decoder = CVSTextDecoder( ['ascii', 'latin1'], ) ctx.initial_project_commit_message = ( 'Standard project directories initialized by cvs2git.' ) ctx.post_commit_message = ( 'This commit was generated by cvs2git to track changes on a CVS ' 'vendor branch.' ) ctx.symbol_commit_message = ( "This commit was manufactured by cvs2git to create %(symbol_type)s " "'%(symbol_name)s'." ) ctx.decode_apple_single = False ctx.symbol_info_filename = None global_symbol_strategy_rules = [ ExcludeTrivialImportBranchRule(), UnambiguousUsageRule(), BranchIfCommitsRule(), HeuristicStrategyRule(), # Convert all ambiguous symbols as branches: AllBranchRule(), # Convert all ambiguous symbols as tags: AllTagRule(), # The last rule is here to choose the preferred parent of branches # and tags, that is, the line of development from which the symbol # sprouts. HeuristicPreferredParentRule(), ] ctx.username = 'cvs2git' ctx.svn_property_setters.extend([ CVSBinaryFileEOLStyleSetter(), CVSBinaryFileDefaultMimeTypeSetter(), DefaultEOLStyleSetter(None), SVNBinaryFileKeywordsPropertySetter(), KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE), ExecutablePropertySetter(), ]) ctx.tmpdir = r'cvs2git-tmp' ctx.cross_project_commits = False ctx.cross_branch_commits = False ctx.keep_cvsignore = True ctx.retain_conflicting_attic_files = True author_transforms={ 'adunstan' : ('Andrew Dunstan', 'and...@dunslane.net'), 'alvherre' : ('Alvaro Herrera', 'alvhe...@alvh.no-ip.org'), 'barry' : ('Barry Lind', 'bl...@xythos.com'), 'bryanh' : ('Bryan Henderson', 'bry...@giraffe.netgate.net'), 'darcy' : ('D\'Arcy J.M. Cain', 'da...@druid.net'), 'dennis' : ('Dennis Björklund', 'd...@zigo.dhs.org'), 'heikki' : ('Heikki Linnakangas', 'heikki.linnakan...@enterprisedb.com'), 'inoue' : ('Hiroshi Inoue', 'in...@tpf.co.jp'), 'ishii' : ('Tatsuo Ishii', 'is...@sraoss.co.jp'), 'joe' : ('Joe Conway', 'm...@joeconway.com'), 'jurka' : ('Kris Jurka', 'bo...@ejurka.com'), 'meskes' : ('Michael Meskes', 'mes...@postgresql.org'), 'mha': ('Magnus Hagander', 'mag...@hagander.net'), 'momjian' : ('Bruce Momjian', 'br...@momjian.us'), 'neilc' : ('Neil Conway', 'neil.con...@gmail.com'), 'petere' : ('Peter Eisentraut', 'pete...@gmx.net'), 'peter' : ('Peter Mount', 'pe...@retep.org.uk'), 'pjw' : ('Philip Warner', 'p...@rhyme.com.au'), 'scrappy' : ('Marc G. Fournier', 'scra...@postgresql.org'), 'teodor' : ('Teodor Sigaev', 'teo...@sigaev.ru'), 'tgl' : ('Tom Lane', 't...@sss.pgh.pa.us'), 'vadim' : ('Vadim B. Mikheev', 'vadi...@yahoo.com'), 'wieck' : ('Jan Wieck', 'janwi...@yahoo.com'), 'cvs2git' : ('cvs2git', 'ad...@postgresql.org'), } # This is the main option that causes cvs2svn to output to git rather # than Subversion: ctx.output_option = GitOutputOption( 'cvs2git-tmp/git-dump.dat', GitRevisionMarkWriter(), max_merges=None, author_transforms=author_transforms, ) run_options.profiling = False changeset_database.use_mmap_for_cvs_item_to_changeset_table = True run_options.set_project( r'../postgresql.org/pgsql', symbol_transforms=[ ReplaceSubstringsSymbolTransform('\\','/'), NormalizePathsSymbolTransform(), ], symbol_strategy_rules=global_symbol_strategy_rules, )
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers