问题
I’m working on a project using Accurev as a VCS. Since I’m not at all familiar with it, I’m wondering if it would be a good idea to use git “internally” - meaning I would use git locally, then doing the “official” commits with Accurev.
Would this be an OK approach?
If yes, I would naturally want to exclude git from the Accurev versioning. Is it sufficient to have a .acignore that looks something like this:
myproject/.git
myproject/.git/*
myproject/.gitignore
Thanks!
回答1:
You should be able to use git and AccuRev side-by-side. You mignt need to tune your .acignore, though.
From the AccuRev Help files:
Examples
A simple wild card pattern such as “*.doc” that is specified globally matches any of these names:
docs/chap01.doc
docs/manuals/chap01.doc
docs/widgetproj/src/manuals/usergd/chap01.docThe pattern manuals/*.doc specified in docs/.acignore matches any of these names:
docs/manuals/chap01.doc
docs/manuals/chap02.doc... but not these names:
docs/manuals/usergd/src/chap01.doc
docs/widgetproj/src/manuals/usergd/chap01.docHowever, using ** to specify recursion as in manuals/***/*.doc or manuals/**/chap.doc will match any occurrence of *.doc or chap.doc in any directory underneath the docs/manuals directory. See Wildcards in Ignore Patterns on page 12 for more information on using **.
回答2:
Options:
1) You might want to look into AccuRev's GitCentric interface. It will allow you to work in Git and have your content show up in AccuRev, or vice versa. This doesn't directly answer your question, but provides you a way to work in a tool you're familiar with.
2) If you're unfamiliar with AccuRev, they do sponsor monthly end user training sessions for free. You can sign up for the Online Instructor-led Training. The AccuRev commands you'll need most often are: keep, promote, update and merge. Again not a direct answer, but learning is a life time goal or struggle depending on your prospective.
3) Using .acignore files to keep the Git files out of AccuRev would work. The .acignore files are designed to allow you to keep files not being managed by AccuRev, noted as "(external)", from being acted upon.
You said "I’m wondering if it would be a good idea to use git “internally” - meaning I would use git locally, then doing the “official” commits with Accurev." That's the joy and freedom of being a developer... you certainly can do that if you choose. You'll need to be careful as Git will not be the official source of record, but instead AccuRev has that role. You may find yourself having to do many merges if you don't keep your AccuRev workspace current via the update command.
If you do use GitCentric, then AccuRev will be the offical source of record at your site, but you'll be able to use Git for all of your work.
Please do respond with your path forward as I'm sure there are many curious developers out there who may want to know.
David
回答3:
AccuRev and Git can also be integrated using the GitCentric product. If you have AccuRev licenses already, GitCentric has a minor additional license cost. You can find out more at the following URL:
http://www.accurev.com/products/gitcentric
回答4:
You CAN work with both, but you probably shouldn't. They use quite different underlying models - (Flexible vs static branching (Git vs Clearcase/Accurev)) & (What is a one-sentence explanation of how Accurev works?).
I have tried this (I've worked with just about every major SCM there is btw. Accurev and Clearcase are the worst, Git and SVN the best), and on large projects it quickly becomes more of a headache to deal with the double commit/merge/overlap than it does to just work with Accurev. This is because Accurev does "silent" updates to child streams/workspaces. What this means is that for large teams or frequently updated Accurev streams you often have to deal with the diffs in Git for each commit. Although this might sound like a positive thing, having to do this at least once per day for a number of files, some of which require merges is just not fun (or productive).
So, OK, you're thinking, what about this plugin? Well, to be frank, it's pretty awful in terms of it's implementation, and on top of an already somewhat clunky Accurev UI, it's just another barrier to good working practice and simplified SCM process.
This is surely too late for the person who originally asked the question, but for anyone else stumbling across this question, my advice would be (I know Accurev's so-called best feature, automatic updating of child by parent, is actually it's worst and most fundamental fault), to just take it on the chin and accept the pain of working with Accurev until such time as you can move to something more sensible like Git.
回答5:
I haven't used it personally but legit-the-git is a Ruby project that is made to sync your local git with an Accurev system.
来源:https://stackoverflow.com/questions/19809256/accurev-externally-git-internally