Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation questions #97

Open
eric-s-raymond opened this issue Feb 22, 2020 · 6 comments
Open

Documentation questions #97

eric-s-raymond opened this issue Feb 22, 2020 · 6 comments

Comments

@eric-s-raymond
Copy link

  1. It looks like gitcc rebase is the functional equivalent of git pull --rebase on a git repo. Is this correct?

  2. The "synchronise just a portion of your git history" procedure is really confusing. Why use the keyword :"tag"? Is that command actually declaring a tag in any sense?

  3. Is a config file required? If not, is the default to pull all content and branches and labels?

  4. If no users module is specified, what is the CC username "foo" mapped to?

@charleso
Copy link
Owner

  1. Yep. I regret not calling the command pull.
  2. It's the implementation bleeding though. Git-cc uses two git tags to track the "state" of the sync, so this command literally just creates/or moves a tag.
  3. Yes a config file is required. The "init" command creates one with the path to your mounted Clearcase directory, and I think the default branches filter list which starts as "main". They're the two critical bits of config. Just a heads up, git-cc doesn't sync labels in any way.
  4. I can't quite remember but looking at the code I believe the git committer email would be "foo@" (which is invalid). I vaguely recall the user mapping file was required to at least provide the mail suffix to make legal email addresses.

Does that help?

@eric-s-raymond
Copy link
Author

It does help, a lot. Would you take an MR updating your README to fold in some of this info?

  1. What's stopping you from just renaming the rebase command? I would.

  2. I hope the filter can be set to "all branches". I'm going to need that.

Here's my situation. I need a a cc-fast-export command that will ship a fast-import stream capturing an entire CC history to stdout, with branches and labels. I don't care about live-syncing. Your rebase command, the way it uses lsh, looks like a place to start.

I don't know how interested you are in this use case, so I don't know whether I should plan to up-gun your code (adding a fast-export command) or write my own tool. If I were to write my own it would probably be in Go - I like Python but dragging in all the dependencies that implies is unappealing.

Relevant fact: I maintain these...

http://www.catb.org/~esr/reposurgeon/

http://www.catb.org/esr/cvs-fast-export/

I may have figured out how to solve the deletions problem. My solution depends on two assumptions:

a. A directory's version gets bumped when - and only when - a file is added to or deleted from it.

b. It is possible to specify a directory and a revision number and get a list of the filenames it had at that revision.

Are these premises correct?

Do you have a sandbox machine you can give me ssh access to with CC on it?

@charleso
Copy link
Owner

charleso commented Feb 22, 2020 via email

@charleso
Copy link
Owner

If you do get access to a Clearcase instance I would just double check if "lshistory -all" returns data for deleted files. That would improve the import quality if it does. I'm sorry I can't confirm that myself. :(

@eric-s-raymond
Copy link
Author

eric-s-raymond commented Feb 23, 2020

OK, it's write my own then.

lshistory not returning events for the file after the delete happens...presumably it starts doing so again if the file is recreated? I will bear it in mind to try lshistory --all.

@charleso
Copy link
Owner

charleso commented Feb 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants