Closed
Bug 376315
Opened 17 years ago
Closed 17 years ago
Set up mercurial mirror of CVS
Categories
(mozilla.org Graveyard :: Server Operations, task)
mozilla.org Graveyard
Server Operations
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: benjamin, Assigned: aravind)
Details
Attachments
(3 files, 6 obsolete files)
7.80 KB,
patch
|
Details | Diff | Splinter Review | |
288.92 KB,
application/octet-stream
|
Details | |
275.04 KB,
text/plain
|
Details |
The script I am going to attach will create and maintain a mercurial mirror of the CVS repository for mozilla 2. It should be set up on a HG repository which is publicly available but only writable by this script (there will be no public checkins). To initialize the repository, run cvs2hg-import.py --inirepo <dir> To do an import, run cvs2hg-import.py --cvsroot=<cvsroot> <dir> The import should be performed frequently, Ideally, it would be performed whenever there are unimported checkins in CVS, but it could probably be run just as well on a cron job or in a permanent loop. The script takes about 30 mins on my machine. I'd like jst or vlad to review the script, before we set it up for use.
Reporter | ||
Comment 1•17 years ago
|
||
vlad/jst, can one of you look this over?
Updated•17 years ago
|
OS: Linux → All
Hardware: PC → All
It looks fine to me; for my personal use I tend to just do a client.mk update in a "clean" tree, though it's only bandwidth (and this will be running local to cvs anyway, I assume) that's the issue.
Assignee | ||
Comment 3•17 years ago
|
||
Tried the CVS import, failed with this message. cvs checkout: Updating mozilla/xulrunner/stub U mozilla/xulrunner/stub/Makefile.in U mozilla/xulrunner/stub/nsXULStub.cpp cvs checkout: Updating mozilla/xulrunner/util Moving /tmp/tmpXvYOvtcvsimport/mozilla/parser to /repo/hg/mozilla/parser Traceback (most recent call last): File "../cvs2hg-import.py", line 225, in ? ImportMozillaCVS(args[0], options.hg, options.cvsroot) File "../cvs2hg-import.py", line 178, in ImportMozillaCVS rename(source, dest) OSError: [Errno 18] Invalid cross-device link [hg@dm-svn01 mozilla]$
Reporter | ||
Comment 4•17 years ago
|
||
Aravind, hrm, this was tested on a system where /tmp and the repo were on the same filesystem. If I add a flag to specify a tmpdir that's on the same filesystem, will that be sufficient?
Reporter | ||
Comment 5•17 years ago
|
||
Revised script takes an optional --tempdir parameter.
Attachment #260415 -
Attachment is obsolete: true
Assignee | ||
Comment 6•17 years ago
|
||
Fixed the calls to hg.
Attachment #260592 -
Attachment is obsolete: true
Assignee | ||
Comment 7•17 years ago
|
||
Imported the current CVS trunk code in mercurial. You can browse this at http://hg.mozilla.org/ I am keeping this bug open, since I still have to cron this, check security perms etc on the repo.
Assignee | ||
Comment 8•17 years ago
|
||
How often do you need the repo updated?
Comment 9•17 years ago
|
||
We were talking about nightly, even with a CVS lock down to speed up the process and guarantee a coherent snapshot. We need the ability to pick and choose when we merge from the 1.9 trunk mirror branch into the Mozilla 2 integration branch, and we may wish to do this two or more days in a row, as well as for any given day. Especially if there's a nightly hook-clearing protocol with QA in the a.m. and sheriffing, again. /be
Reporter | ||
Comment 10•17 years ago
|
||
As I mentioned in private email, I don't see any way to do the mirror->integration branch merge automatically, because it will probably involve regular merging. Personally, I would prefer that the mirroring happen as often as possible, if CVS server load will allow it. The finer the granularity of commits, the easier it is to merge when you have conflicts. If coherence is likely to be an issue, we should check out by date.
Comment 11•17 years ago
|
||
Dbaron was in on the sync once per day idea. IIRC server load and coherence were both considerations. Checking out by date doesn't guarantee coherence with CVS locking, alas. /be
I'd be quite happy with "as often as possible", since it would make it possible for those of us still working on 1.9 to use it rather than all keep our own copies. Once per day probably wouldn't be sufficient for that.
Comment 13•17 years ago
|
||
It might help if toolkit gets imported! :) Aravind, can you use this version instead? I just added "toolkit" to the list of things to import.
Attachment #260634 -
Attachment is obsolete: true
Reporter | ||
Comment 14•17 years ago
|
||
Yeah whoops! r=me Aravind, we need to check this script into VCS somewhere. Perhaps somewhere in mozilla/tools in CVS?
Do we really want to exclude non-Firefox apps from this mirror?
Assignee | ||
Comment 16•17 years ago
|
||
Okay, will modify the script to get toolkit as well. I have set this up in cron to sync every 6 hours. Let me know if you want it done more frequently. I will check this script into mozilla/tools. Can this bug be closed now?
Reporter | ||
Comment 17•17 years ago
|
||
Sure!
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 18•17 years ago
|
||
(In reply to comment #15) > Do we really want to exclude non-Firefox apps from this mirror? I think so; it's not a general purpose mirror. It's for Mozilla 2. See http://groups.google.com/group/mozilla.dev.platform/browse_frm/thread/7673df08a4e1a499/a5300dc31385d601#a5300dc31385d601 You're right, it could be a larger mirror, but as a matter of policy I think it should not be. A separate hg mirror of all of cvs-mirror could be set up, with different access control and no development model as we want for Mozilla 2. File another bug? /be
Comment 19•17 years ago
|
||
Talked to bsmedberg and aravind about this, and there are a couple of things we wanted to have as artifacts of the cvs import: -- Complete log (stdin/stderr) from the import -- Import as of a well-known epoch date (the 1.9a3 tag is a good one; but we should actually tag CVS with the directories that were imported) -- Import from cvs.m.o, not cvs-mirror.m.o Reopening to tweak the script and re-run it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 20•17 years ago
|
||
Talked with Benjamin and Aravind about making these changes; this patch: -- For the initial import, pull the CVS tree from a (known) tag; right now, this tag doesn't exist, but it will shortly. -- Remove all the quiet options to hg/cvs; we want the output from these automated processes -- Point at cvs.m.o, not cvs-mirror.m.o (implies that whomever is running this script has access to the cltbld key and can use it for this purpose) -- Check in each "module" (which it really isn't that, but...) separately -- Pull by date for imports. -- Include the checkin "module", the branch it came from, and the pull date in the Hg checkin message.
Attachment #260754 -
Attachment is obsolete: true
Reporter | ||
Comment 21•17 years ago
|
||
Comment on attachment 261307 [details] [diff] [review] Import CVS to Hg, rev 2.2 I suppose this is ok. I'm not quite sure why you bothered with the importModules hash. And it looks like you eat exceptions that happen during import, which means that the script will exit with a zero code. Is this what you intended?
Comment 22•17 years ago
|
||
(In reply to comment #21) > (From update of attachment 261307 [details] [diff] [review]) > I suppose this is ok. I'm not quite sure why you bothered with the > importModules hash. I did this so that the commits into the Hg repository show up as separate commits. The reason I did *that* is so that when we change [branch] tags that we pull from, the commit messages reflect that. I suppose we could do it as one commit (which I'd prefer), and then build up a commit message that has all the details. What do you think? > And it looks like you eat exceptions that happen during import, which means > that the script will exit with a zero code. Is this what you intended? Nope; good catch; fixed. Admittedly, my python is a bit rusty. :-/
Attachment #261307 -
Attachment is obsolete: true
Comment 23•17 years ago
|
||
Benjamin pointed out that doing separate commits for these modules would cause NSPR/NSS to be entirely removed in those commits. We still want the per module log messages to provide the most information possible, so take 3: -- Fix a bug where mozilla wouldn't get the right tag -- Move back to one Hg commit, but building up a message with specific information about each module -- Make sure rmtree runs in the finally, since we re-raise the exception. -- Use UTC for CVS pulls, like Tinderbox
Attachment #261399 -
Attachment is obsolete: true
Comment 24•17 years ago
|
||
This is a bz2 compressed log file (with set -e/set -v) from the run I did to tag the CVS repo with the HG_REPO_INITIAL_IMPORT tag, which is a clone of the MOZILLA_1_9a3_RELEASE tag, but only applied to the areas that were actually checked into Hg.
Reporter | ||
Comment 25•17 years ago
|
||
2.2 take III looks correct
Comment 26•17 years ago
|
||
(In reply to comment #25) > 2.2 take III looks correct Great! I'll get together with Aravind, and we'll run through it.
Comment 27•17 years ago
|
||
Assignee | ||
Comment 28•17 years ago
|
||
Can this be resolved now? I think jst is actually syncing stuff back to the hg repo.
Comment 29•17 years ago
|
||
Yes, this can IMO be considered done now. There's still work to be done for automation of the cvs-trunk-mirror updates etc, but we'll open new bugs for that work.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: mozilla.org → mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•