annotate DESIGN.txt @ 2:c43c02cc803a

added dulwich library and got the script to call it for clone
author Scott Chacon <schacon@gmail.com>
date Wed, 22 Apr 2009 16:59:04 -0700
parents
children d6c443a91b18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
1 GitHug, the Hg-Git Plugin
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
2 =========================
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
3
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
4 This plugin is designed to allow you to push to a Git server over the Git
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
5 protocol and to pull from a Git based project. All data is stored in Hg
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
6 native format with a mapping table. People collaborating in Git should not
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
7 even be able to tell that you're using Hg to collaborate on their project.
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
8 Nothing should be kept in the Git format except perhaps for caching.
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
9
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
10 (Dulwich library)
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
11
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
12 May need to use bookmarks extension to do everything better.
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
13
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
14 * Cloning from a Git Repository *
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
15
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
16 hg init, hg add remote, hg gfetch, hg checkout
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
17
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
18 * Fetching from a Git Repository *
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
19
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
20 hg gremote add (git-url)
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
21
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
22 hg gfetch origin (like a hg pull)
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
23 - connects to server (upload-pack)
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
24 - gets a list of server shas
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
25 - sees what it does not have (maps all unmapped shas, checks list)
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
26 - requests needed shas
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
27 - fetches packfile
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
28 - explodes
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
29 - converts parent linages to hg changesets
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
30 - updates local parents
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
31
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
32 * Pushing to a Git Repository *
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
33
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
34 hg gpush origin
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
35 - maps all unmapped shas
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
36 - connects to server
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
37 - needs/haves
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
38 - creates packfile of git versions of everything the server needs
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
39 - transfers it, updates local references (bookmarks?)
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
40
c43c02cc803a added dulwich library and got the script to call it for clone
Scott Chacon <schacon@gmail.com>
parents:
diff changeset
41