Отмечено: git Показать/спрятать ветки комментариев | Горячие клавиши

  • manandbytes 20:39 on April 29, 2011 Постоянная ссылка |
    Метки: dvcs, git, scm, svn   

    Don’t know how to move to Git? 

    We started out with SVN mostly because that was what everyone was used to. A year ago or so, one of our remote developers started using a git-svn mirror to remove some of the latency issues they had with SVN. Someone else put together a ten page wiki on how to easily use a git-svn mirror and push back to the canonical SVN repo. As time went on, interest in git grew and new modules were created in git, instead of our SVN repositories. Finally there was a push to move everything to git.

    It’s not a problem for a new codebase, but preserving all history (with authors as well) may be critical for existing ones. If you are not sure how to convert your existing SVN repositories into Git, Goodbye SVN, Hello Git from Sonatype provides a background why they moved to Git and a step-by-step instructions.

  • manandbytes 20:16 on November 1, 2009 Постоянная ссылка |
    Метки: , , git   

    Lessons learned contributing to EGit project 

    Now it’s possible to share a project using Git provider from any place in the workspace with only a keyboard. My contribution was finally accepted and there are some lessons I’ve learned:

    • Be careful with sources had been used on the way. You may be asked under what terms you received this material.
    • Your contribution may be accepted not with all speed. Don’t expect rapid feedback on your bugs, patches, e-mails etc.
    • Holes may be present in a contributor’s guide. Do you like nitpicking? Sometimes you may be forced to resubmit your patch due to a trivial style nit.
    • When users download your sources, they must always just build. Always. Build. Without a single failing unit test. Programs with failing unit tests are difficult to contribute to, because you cannot easily determine if any change you made improved the program or not.
    • Always open is a fundamental rule of open source, so internal conversations should be avoided at any cost. Unfortunately, right now you can’t reply to a comment posted via Gerrit using your e-mail client’s feature «reply to mailing list» so that it will be posted to the comment thread in Gerrit. I hope an incoming email gateway would be implemented in Google Gerrit, sooner or later.
    • Conversations must be conducted as close to the code as possible. Tools like git format-patch, git am and Google Gerrit make this a no-brainer task.
    • «Release early, release often» sounds as an easy goal but there is still no update site with a latest pre-build version(s) of EGit.
  • manandbytes 15:14 on December 23, 2008 Постоянная ссылка |
    Метки: , git   

    How to import eclipse.org’s CVS into git with git-cvsimport 

    In order to be able to update a local git repository later with changes from the foreign remote repository (which is Eclipse.org’s CVS repository in my case) I have to store CVS metadata somewhere. The first place which pops up in my mind is .git/config and git-svn uses this approach for storing SVN metadata:

    mn@tabernacle:~/src/git-mirrors/josm$ cat .git/config 
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
    [svn-remote "svn"]
            url = http://josm.openstreetmap.de/svn
            fetch = trunk:refs/remotes/trunk
            branches = branches/*:refs/remotes/*
            tags = tags/*:refs/remotes/tags/*

    And this metadata may be retrieved at any time in a standard way using git config command:
    mn@tabernacle:~/src/git-mirrors/josm$ git config --get svn-remote.svn.url

    But for git-cvsimport I’m out of luck. Fortunately there is another solution:

    • create a working directory containing copies of the source files from original CVS repository using cvs checkout command
    • import a CVS module into Git repository using git cvsimport command

    So, lets start with importing org.eclipse.jdt.ui project:

    cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co org.eclipse.jdt.ui
    cd org.eclipse.jdt.ui
    git cvsimport

    And a full history of org.eclipse.jdt.ui project since 2001 at my fingertips:

    Author: cvs   2001-05-02 20:50:00
    Committer: cvs   2001-05-02 20:50:00
    Child:  c43be3ba3c0e24ae62dda72232e0d191bcc6e05b (*** empty log message ***)
    Branches: JDK_1_5, NewSearchIntegration, Pioneering_5_0, R2_1_maintenance, content_assist_participants, editorWork, linkedPositions_rework, master, origin, pre_3_3_work
    Precedes: v0_102+

    *** empty log message ***

    git cvsimport uses cvsps for generating a patchset information from a CVS repository. A patchset is a set of changes made to a collection of files and all committed at the same time (using a single cvs commit command). And it works, as I can see with git log d27f355 --max-count=3 --name-only:

    commit d27f355593d46d301291e9f84ce263d8c19e42b2
    Author: mkeller 
    Date:   Thu Dec 11 12:46:55 2008 +0000
        239347: Drag and drop any none java file doesn't refactor
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/JDTRefactoringDescriptorComment.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/refactoring.properties
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameCompilationUnitProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameJavaProjectProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameMethodProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamePackageProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeParameterProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgPolicy.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaMoveProcessor.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java
    core refactoring/org/eclipse/jdt/internal/corext/refactoring/tagging/IReferenceUpdating.java
    ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInputWizardPage.java
    ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMoveWizard.java
    commit 8ee13e0e34d9ab201abdfc0722a25cd8614dc796
    Author: dmegert 
    Date:   Thu Dec 11 10:32:36 2008 +0000
        Require com.ibm.icu until Bidi is part of icu.base.
    commit 4769cf70021ece07bce67cdc3563b0928dd50d87
    Author: dmegert 
    Date:   Wed Dec 10 09:10:57 2008 +0000
        Fixed bug 258238: Typo in Delete Working Set dialog: space before '?'
    ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.properties

    It took me about a one day and 1G(?) of data transfer (but who counts all these bytes in our days?) for a full import and now I can work on stuff offline. And Git is really disk-space-friendly. Only 54M of disk space is been used for 19000+ commits which had been made to org.eclipse.jdt.ui project since 2001.

    And to update my local git repository with changes from the remote CVS I can just run git cvsimport from the project’s working directory:

    Fetching ui/org/eclipse/jdt/internal/ui/workingsets/ConfigureWorkingSetAssignementAction.java   v 1.19
    Update ui/org/eclipse/jdt/internal/ui/workingsets/ConfigureWorkingSetAssignementAction.java: 25116 bytes
    Tree ID bad5edfd1a0dac40fa3a2c865cd2a3e4401380bb
    Parent ID fcf05781ae88bf413904aca54a9c4ee745c7f3cb
    Committed patch 19257 (origin +0000 2008-12-15 10:23:40)
    Commit ID 1e13114d7f01024110c0495de0350d8cfb43d1d6
    Updating fcf0578..1e13114
    Fast forward
     .../ConfigureWorkingSetAssignementAction.java      |   37 +++++++++++++++++++-
     1 files changed, 36 insertions(+), 1 deletions(-)

  • manandbytes 13:05 on December 16, 2008 Постоянная ссылка |
    Метки: git   

    «Git» в исполнении переводчика Promt 

    «a local git repository» = «местный склад мерзавца» (c) translate.ru

cоздать новую запись
следующая запись/комментарий
предыдущая запись/комментарий
показать/скрыть комментарии
перейти наверх
Go to login
Показать/Скрыть помощь
shift + esc