Feature request: "Surrogate" repository root for $Header$ and $Source$ keyword expansion?

Maciek Sakrejda <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <CAH_hXRa-JbDBP2ute9kyUimiczrZ9QbLd0Qf3e8jhaP-yLwcog@mail.gmail.com>
So in working with keyword expansion, the $Source$ and $Header$
keywords are a pain, since they include the full path to the current
file (in whatever environment you are doing the conversion). This
certainly follows the behavior of this keyword in RCS, but if I'm
migrating a public repository that happened to have made the
(unfortunate; but I'll skip the rant) decision to use keyword
expansion (especially with these keywords) at some point, it doesn't
make sense to include *my* information in the new (git or svn)
history. Of course, due to this behavior, it's not possible to
replicate a CVS history perfectly (since CVS would do this expansion
for you on checkout), but it would be nice to have a user-configurable
"neutral" expansion that could be used in history in place of the
*actual* repository root.

E.g., is it reasonable to change

  def source(self):
    project = self.cvs_rev.cvs_file.project
    return '%s/%s%s,v' % (
        project.cvs_repository_root,
        project.cvs_module,
        self.cvs_rev.cvs_file.cvs_path,
        )

in keyword_expander.py to something like

  def source(self):
    project = self.cvs_rev.cvs_file.project
    return '%s/%s%s,v' % (
        project.cvs_surrogate_root or project.cvs_repository_root,
        project.cvs_module,
        self.cvs_rev.cvs_file.cvs_path,
        )

(of course, with the additional config to set
project.cvs_surrogate_root)? I could try to contribute a patch if this
would be generally useful; otherwise I'll just solve this with git
filter-branch.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

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

To unsubscribe from this discussion, e-mail: [[email protected]].
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.