Skip to content

Commit 41a6d85

Browse files
committed
Initial commit (Release 0.4)
0 parents  commit 41a6d85

File tree

20 files changed

+2871
-0
lines changed

20 files changed

+2871
-0
lines changed

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Catalin Marinas <[email protected]>
2+
http://www.procode.org/about.html

COPYING

Lines changed: 340 additions & 0 deletions
Large diffs are not rendered by default.

ChangeLog

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
2005-07-09 Catalin Marinas <[email protected]>
2+
3+
* Release 0.4
4+
5+
2005-07-09 Peter Osterlund <[email protected]>
6+
7+
* Fix spelling errors
8+
9+
2005-07-08 Catalin Marinas <[email protected]>
10+
11+
* stgit/main.py (diff): Add '--stat' option to 'diff'
12+
(files): 'files' command implemented
13+
14+
2005-07-08 Peter Osterlund <[email protected]>
15+
16+
* stgit/git.py (diffstat): %(diffstat)s variable support in the
17+
patch export template
18+
19+
2005-07-07 Catalin Marinas <[email protected]>
20+
21+
* stgit/main.py (resolved): Implemented a 'resolved' command to
22+
mark conflicts as solved. The 'status' command now shows the
23+
conflicts as well. 'refresh' fails if there are conflicts
24+
25+
2005-07-06 Catalin Marinas <[email protected]>
26+
27+
* stgit/stack.py (edit_file): Added support for patchdescr.tmpl
28+
29+
* stgit/main.py (export): Added support for more variables in the
30+
patchexport.tmpl file
31+
32+
* stgit/stack.py (Patch): Add support for author/comitter default
33+
details configuration
34+
35+
* stgit/main.py (push): '--undo' option added to push. This option
36+
allows one to undo the last push operation and restores the old
37+
boundaries of the patch (prior to the push operation)
38+
(pop): pop optimised to switch directly to the last patch to be
39+
popped
40+
41+
2005-07-05 Catalin Marinas <[email protected]>
42+
43+
* stgit/main.py (pop): add '--to' option to 'pop'
44+
(push): add '--to' and '--reverse' options to 'push'
45+
46+
* gitmergeonefile.py: Added support for 'keeporig' option which
47+
selects whether to delete or not the original files after a failed
48+
merge
49+
50+
2005-07-04 Catalin Marinas <[email protected]>
51+
52+
* Add support for configurable merge tool via stgitrc
53+
54+
* Add support for configuration file (/etc/stgitrc, ~/.stgitrc,
55+
.git/stgitrc)
56+
57+
2005-07-02 Catalin Marinas <[email protected]>
58+
59+
* stgit/main.py (export): Added support for the patch description
60+
template. At the moment, only the '%(description)s' variable is
61+
supported
62+
63+
2005-07-01 Catalin Marinas <[email protected]>
64+
65+
* stgit/main.py (refresh): Now it also checks for head != top
66+
(export): Add the patch description to the exported patch files
67+
68+
2005-06-30 Catalin Marinas <[email protected]>
69+
70+
* Fix exception reporting when the .git/HEAD link is not valid
71+
72+
* Empty patches are now marked
73+
74+
2005-06-28 Catalin Marinas <[email protected]>
75+
76+
* Release 0.3
77+
78+
* stgit/stack.py (Series.push_patch): if the merge with the new
79+
base failed, inform the user that "refresh" should be run after
80+
fixing the conflicts
81+
82+
* stgit/main.py (new): checks for local changes and head != top
83+
added
84+
85+
* StGIT is now closer to Quilt in functionality. The 'commit'
86+
command was removed ('refresh' is used instead).
87+
88+
2005-06-25 Catalin Marinas <[email protected]>
89+
90+
* stack.py modified to include all the series functions the Series
91+
class
92+
93+
2005-06-24 Catalin Marinas <[email protected]>
94+
95+
* stgit/git.py (commit): commit tells before invoking the editor
96+
and shows the return error code but without exiting if it is
97+
non-zero
98+
99+
2005-06-23 Catalin Marinas <[email protected]>
100+
101+
* stgit/main.py (push): --number option added to push
102+
(pop): --number option added to push
103+
104+
2005-06-22 Catalin Marinas <[email protected]>
105+
106+
* gitmergeonefile.py: temporary files are placed in <path>.local,
107+
<path>.older and <path>.remote and only removed if the merge
108+
succeeded
109+
110+
2005-06-21 Catalin Marinas <[email protected]>
111+
112+
* stgit/main.py (delete): 'delete' now requires the explicit patch
113+
name as a safety measure
114+
115+
* stgit/stack.py (pop_patch): sys.stdout.flush() added after the
116+
first print
117+
(push_patch): fix bug with 'push' not warning for empty patches
118+
119+
* stgit/stack.py (push_patch): sys.stdout.flush() added after the
120+
first print
121+
122+
2005-06-20 Catalin Marinas <[email protected]>
123+
124+
* Release 0.2
125+
126+
* stgit/stack.py (delete_patch): bug when deleting the topmost
127+
patch fixed
128+
129+
* top/bottom files are backed up to top.old/bottom.old
130+
automatically. The 'diff' command supports them as well
131+
132+
* stg-upgrade.sh: upgrades the .git structure from stgit-0.1 to
133+
stgit-0.2
134+
135+
2005-06-19 Catalin Marinas <[email protected]>
136+
137+
* Multiple heads and bases are now supported. A different series
138+
is available for each head
139+
140+
* gitmergeonefile.py: fix bug caused by not updating the cache
141+
when merging with diff3
142+
143+
* stgit/stack.py: 'push' command reports a warning if the patch is
144+
empty
145+
146+
* stgit/git.py: commit supports an 'allowempty' parameter
147+
148+
* os.path.join() used instead '+' for concatenating path names
149+
150+
2005-06-15 Catalin Marinas <[email protected]>
151+
152+
* Release 0.1
153+

INSTALL

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
For basic installation:
2+
3+
python setup.py install
4+
5+
For more information:
6+
7+
http://docs.python.org/inst/inst.html

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include README MANIFEST.in AUTHORS COPYING INSTALL ChangeLog TODO stgitrc
2+
include examples/*.tmpl

README

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
Stacked GIT
2+
-----------
3+
4+
StGIT is a Python application providing similar functionality to Quilt
5+
(i.e. pushing/poping patches to a stack) on top of GIT. These
6+
operations are performed using the GIT merge algorithms.
7+
8+
Note that StGIT is not an SCM interface for GIT. Use the GIT commands
9+
or some other tools like Cogito for this.
10+
11+
For the latest version see http://www.procode.org/stgit/
12+
13+
14+
Basic Operations
15+
----------------
16+
17+
For a full list of commands:
18+
19+
stg help
20+
21+
For help on individual commands:
22+
23+
stg <cmd> (-h | --help)
24+
25+
To initialise a tree (the tree must have been previously initialised
26+
with GIT):
27+
28+
stg init
29+
30+
To add/delete files:
31+
32+
stg add [<file>*]
33+
stg rm [<file>*]
34+
35+
To inspect the tree status:
36+
37+
stg status
38+
39+
To get a diff between 2 revisions:
40+
41+
stg diff [-r rev1[:[rev2]]]
42+
43+
A revision name can be of the form '([patch]/[bottom | top]) | <tree-ish>'
44+
If the patch name is not specified but '/' is passed, the topmost
45+
patch is considered. If neither 'bottom' or 'top' follows the '/', the
46+
whole patch diff is displayed (this does not include the local
47+
changes).
48+
49+
Note than when the first patch is pushed to the stack, the current
50+
HEAD is saved in the .git/refs/heads/base file for easy reference.
51+
52+
To create/delete a patch:
53+
54+
stg new <name>
55+
stg delete [<name or topmost>]
56+
57+
The 'new' command also sets the topmost patch to the newly created
58+
one.
59+
60+
To push/pop a patch to/from the stack:
61+
62+
stg push [<name or first unapplied>]
63+
stg pop [<name or topmost>]
64+
65+
Note that the 'push' command can apply any patch in the unapplied
66+
list. This is useful if you want to reorder the patches.
67+
68+
To add the patch changes to the tree:
69+
70+
stg refresh
71+
72+
To inspect the patches applied:
73+
74+
stg series
75+
stg applied
76+
stg unapplied
77+
stg top
78+
79+
To export a patch series:
80+
81+
stg export [<dir-name or 'patches'>]
82+
83+
The 'export' command supports options to automatically number the
84+
patches (-n) or add the '.diff' extension (-d).
85+
86+
StGIT does not yet provide support for cloning or pulling changes from
87+
a different repository. Until this becomes available, run the
88+
following commands:
89+
90+
stg pop -a
91+
your-git-script-for-pulling-and-merging
92+
stg push -a
93+
94+
You can also look in the TODO file for what's planned to be
95+
implemented in the future.
96+
97+
98+
Directory Structure
99+
-------------------
100+
101+
.git/
102+
objects/
103+
??/
104+
105+
refs/
106+
heads/
107+
master - the master commit id
108+
...
109+
bases/
110+
master - the bottom id of the stack (to get a big diff)
111+
...
112+
tags/
113+
...
114+
branches/
115+
...
116+
patches/
117+
master/
118+
applied - list of applied patches
119+
unapplied - list of not-yet applied patches
120+
current - name of the topmost patch
121+
patch1/
122+
first - the initial id of the patch (used for log)
123+
bottom - the bottom id of the patch
124+
top - the top id of the patch
125+
patch2/
126+
...
127+
...
128+
129+
HEAD -> refs/heads/<something>
130+
131+
132+
A Bit of StGIT Patch Theory
133+
---------------------------
134+
135+
We assume that a patch is a diff between two nodes - bottom and top. A
136+
node is a commit SHA1 id or tree SHA1 id in the GIT terminology:
137+
138+
P - patch
139+
N - node
140+
141+
P = diff(Nt, Nb)
142+
143+
Nb - bottom (start) node
144+
Nt - top (end) node
145+
Nf - first node (for log generation)
146+
147+
For an ordered stack of patches:
148+
149+
P1 = diff(N1, N0)
150+
P2 = diff(N2, N1)
151+
...
152+
153+
Ps = P1 + P2 + P3 + ... = diff(Nst, Nsb)
154+
155+
Ps - the big patch of the whole stack
156+
Nsb - bottom stack node (= N0)
157+
Nst - top stack node (= Nn)
158+
159+
Applying (pushing) a patch on the stack (Nst can differ from Nb) is
160+
done by diff3 merging. The new patch becomes:
161+
162+
P' = diff(Nt', Nb')
163+
Nb' = Nst
164+
Nt' = diff3(Nst, Nb, Nt)
165+
166+
(note that the diff3 parameters order is: branch1, ancestor, branch2)
167+
168+
The above operation allows easy patch re-ordering.
169+
170+
Removing (popping) a patch from the stack is done by simply setting
171+
the Nst to Nb.

TODO

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
The TODO list for the short term:
2+
3+
- tag (snapshot) command
4+
- pull command (no longer rely on cogito or plain git)
5+
- log command (it should also show the log per single patch)
6+
- import command to import a series of patches or a single patch or a
7+
patch from a different branch in the same tree
8+
- better help for commands
9+
- bug reporting tool
10+
11+
12+
Other things after the list above is completed:
13+
14+
- fold command (to merge 2 patches into one)
15+
- automatic e-mail sending with the patches
16+
- release 1.0
17+
18+
19+
The future, when time allows or someone else does it:
20+
21+
- patches command to show the patches modifying a file
22+
- patch dependency tracking
23+
- multiple heads in a patch - useful for forking a patch,
24+
synchronising with other patches (diff format or in other
25+
repositories)
26+
- remove the old base of the patch if there are no references to it
27+
- write bash-completion script for the StGIT commands

examples/patchdescr.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
Signed-off-by: Your Name <[email protected]>

examples/patchexport.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%(description)s
2+
---
3+
4+
%(diffstat)s
5+

0 commit comments

Comments
 (0)