cvs2git/hg/bzr ctx.tmpdir fix

Steve Folly <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
Hi,

I'm using cvs2git 2.3.0, and wanted to change the temporary directory from cvs2svn-tmp to something else.

I noticed a couple of git options to generate git-dump.dat and git-blob.dat also use a hard-coded path of cvs2svn-tmp instead of ctx.tmpdir

I've attached 3 patches for changing the example options (git, hg and bzr example options) to make those paths use ctx.tmpdir. 

I'm not sure if this is the right way to contribute, but I hope they're useful.

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2447195

To unsubscribe from this discussion, e-mail: [[email protected]].



Regards,
Steve
cvs2bzr-example.options.patch (application/octet-stream, 1.4 KB)
*** cvs2bzr-example.options~	2010-02-12 22:32:48.000000000 +0000
--- cvs2bzr-example.options	2010-02-12 22:34:53.000000000 +0000
***************
*** 127,132 ****
--- 127,135 ----
  #Log().log_level = Log.DEBUG
  
  
+ # The directory to use for temporary files:
+ ctx.tmpdir = r'cvs2svn-tmp'
+ 
  # cvs2bzr reads the contents of file revisions during OutputPass, so no
  # revision recorder is needed:
  ctx.revision_recorder = NullRevisionRecorder()
***************
*** 402,410 ****
  
      ])
  
- # The directory to use for temporary files:
- ctx.tmpdir = r'cvs2svn-tmp'
- 
  # To skip the cleanup of temporary files, uncomment the following
  # option:
  #ctx.skip_cleanup = True
--- 405,410 ----
***************
*** 472,478 ****
  # "fastimport"-format dumpfile rather than to Subversion:
  ctx.output_option = GitOutputOption(
      # The file in which to write the "fastimport" stream:
!     'cvs2svn-tmp/dumpfile.fi',
  
      # Write the file contents inline in the "fastimport" stream,
      # rather than using a separate blobs file (which "bzr fastimport"
--- 472,478 ----
  # "fastimport"-format dumpfile rather than to Subversion:
  ctx.output_option = GitOutputOption(
      # The file in which to write the "fastimport" stream:
!     ctx.tmpdir+'/dumpfile.fi',
  
      # Write the file contents inline in the "fastimport" stream,
      # rather than using a separate blobs file (which "bzr fastimport"
cvs2git-example.options.patch (application/octet-stream, 1.9 KB)
*** cvs2git-example.options~	2010-02-12 22:22:03.000000000 +0000
--- cvs2git-example.options	2010-02-12 22:23:07.000000000 +0000
***************
*** 127,132 ****
--- 127,135 ----
  #Log().log_level = Log.DEBUG
  
  
+ # The directory to use for temporary files:
+ ctx.tmpdir = r'cvs2svn-tmp'
+ 
  # During CollectRevsPass, cvs2git records the contents of file
  # revisions into a "blob" file in git-fast-import format.  This option
  # configures that process:
***************
*** 152,158 ****
  
      # The file in which to write the git-fast-import stream that
      # contains the file revision contents:
!     GitRevisionRecorder('cvs2svn-tmp/git-blob.dat'),
      )
  
  # cvs2git does not need to keep track of what revisions will be
--- 155,161 ----
  
      # The file in which to write the git-fast-import stream that
      # contains the file revision contents:
!     GitRevisionRecorder(ctx.tmpdir+'/git-blob.dat'),
      )
  
  # cvs2git does not need to keep track of what revisions will be
***************
*** 427,435 ****
  
      ])
  
- # The directory to use for temporary files:
- ctx.tmpdir = r'cvs2svn-tmp'
- 
  # To skip the cleanup of temporary files, uncomment the following
  # option:
  #ctx.skip_cleanup = True
--- 430,435 ----
***************
*** 498,504 ****
  ctx.output_option = GitOutputOption(
      # The file in which to write the git-fast-import stream that
      # contains the changesets and branch/tag information:
!     'cvs2svn-tmp/git-dump.dat',
  
      # The blobs will be written via the revision recorder, so in
      # OutputPass we only have to emit references to the blob marks:
--- 498,504 ----
  ctx.output_option = GitOutputOption(
      # The file in which to write the git-fast-import stream that
      # contains the changesets and branch/tag information:
!     ctx.tmpdir+'/git-dump.dat',
  
      # The blobs will be written via the revision recorder, so in
      # OutputPass we only have to emit references to the blob marks:
cvs2hg-example.options.patch (application/octet-stream, 1.4 KB)
*** cvs2hg-example.options~	2010-02-12 22:33:07.000000000 +0000
--- cvs2hg-example.options	2010-02-12 22:36:01.000000000 +0000
***************
*** 139,144 ****
--- 139,147 ----
  #Log().log_level = Log.DEBUG
  
  
+ # The directory to use for temporary files:
+ ctx.tmpdir = r'cvs2svn-tmp'
+ 
  # cvs2hg reads the contents of file revisions during OutputPass, so no
  # revision recorder is needed:
  ctx.revision_recorder = NullRevisionRecorder()
***************
*** 414,422 ****
  
      ])
  
- # The directory to use for temporary files:
- ctx.tmpdir = r'cvs2svn-tmp'
- 
  # To skip the cleanup of temporary files, uncomment the following
  # option:
  #ctx.skip_cleanup = True
--- 417,422 ----
***************
*** 486,492 ****
  ctx.output_option = GitOutputOption(
      # The file in which to write the "hg fastimport" stream that
      # contains the changesets and branch/tag information:
!     'cvs2svn-tmp/hg-dump.dat',
  
      # Write the file contents inline in the "hg fastimport" stream,
      # rather than using a separate blobs file (which "hg fastimport"
--- 486,492 ----
  ctx.output_option = GitOutputOption(
      # The file in which to write the "hg fastimport" stream that
      # contains the changesets and branch/tag information:
!     ctx.tmpdir+'/hg-dump.dat',
  
      # Write the file contents inline in the "hg fastimport" stream,
      # rather than using a separate blobs file (which "hg fastimport"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.