Skip to contentSkip to conversation

Documentation updates

PATCH In review Karl Hasselström 3 participants 19 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

cover Documentation updates

We're approaching a new StGit release (yay!), and the docs are rather outdated. This is an attempt to refresh the main stg man page and the tutorial (but I ran out of time for this weekend, so the second half of the tutorial is incomplete).

Comments & helping hands much appreciated.

Since I touch almost every line, the patches are kind of a nuisance to read. It's probably easiest to just fetch the branch:

git://repo.or.cz/stgit/kha.git doc

---

Karl Hasselström (6):
Refresh and expand the tutorial (not finished) Refresh the main stg man page
Add 1.0 TODO items from recent discussion by private mail We're half-way there with the separate indexes Remove TODO items that have already been addressed Remove unused variable

 Documentation/Makefile      |   11 -
 Documentation/asciidoc.conf |   22 +
 Documentation/stg.txt       |  150 +++++---
 Documentation/tutorial.txt  |  794 ++++++++++++++++++++++++++-----------------
 TODO                        |   26 +
 stgit/argparse.py           |    2 
 6 files changed, 603 insertions(+), 402 deletions(-)
Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle
#1 lore raw

PATCH 1/6 Remove unused variable

---

 Documentation/Makefile |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
Documentation/Makefile +3 -5
index 165e222..37df9ee 100644
@@ -5,12 +5,10 @@ MAN1_TXT= stg.txt $(COMMANDS_TXT)
 
 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT))
 
-ARTICLES = 
-# with their own formatting rules.
-SP_ARTICLES = tutorial
+ARTICLES = tutorial
 
-DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
-DOC_PDF += $(patsubst %,%.pdf,$(ARTICLES) $(SP_ARTICLES))
+DOC_HTML += $(patsubst %,%.html,$(ARTICLES))
+DOC_PDF += $(patsubst %,%.pdf,$(ARTICLES))
 
 DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
 
#2 lore raw

PATCH 2/6 Remove TODO items that have already been addressed

In reply to Karl Hasselström

---

 TODO |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
TODO +0 -9
index ff52a95..3570345 100644
@@ -1,14 +1,9 @@
 The TODO list before 1.0:
 
 - more regression tests
-- stg help should probably pipe through the $PAGER
-- fix StGIT to run correctly in subdirectories
 - use a separate index for some commands (refresh, fold etc.) so that
   files already added/removed are not automatically checked in
-- debian package support
-- man page
 - document the workflow on the StGIT wiki
-- use same configuration file as GIT
 - release 1.0
 
 
@@ -18,9 +13,5 @@ The future, when time allows or if someone else does them:
 - multiple heads in a patch - useful for forking a patch,
   synchronising with other patches (diff format or in other
   repositories)
-- commit directly to a patch which is not top
-- patch synchronisation between between branches (as some people,
-  including me have the same patches based on different branches and
-  they have scripts for moving the changes in one to the others)
 - numeric shortcuts for naming patches near top (eg. +1, -2)
 - (config?) parameter for number of patches included by "series -s"
#3 lore raw

Re: [StGit PATCH 2/6] Remove TODO items that have already been addressed

2008/10/5 Karl Hasselström <[email protected]>:

Quoted 2 lines
 TODO |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

We could also drop this file entirely since we have a Tasks list on the gna.org project page.

Signature · 1 line
Catalin
#4 lore raw

Re: [StGit PATCH 2/6] Remove TODO items that have already been addressed

Quoted 7 lines · Catalin Marinas

2008/10/5 Karl Hasselström <[email protected]>:

Quoted 2 lines
 TODO |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

We could also drop this file entirely since we have a Tasks list on the gna.org project page.

Right, that's probably a good idea.

Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle
#5 lore raw

PATCH 3/6 We're half-way there with the separate indexes

In reply to Karl Hasselström

---

 TODO |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
TODO +6 -0
index 3570345..267e17e 100644
@@ -1,8 +1,14 @@
 The TODO list before 1.0:
 
 - more regression tests
+
 - use a separate index for some commands (refresh, fold etc.) so that
   files already added/removed are not automatically checked in
+
+    + This is easily done with the new infrastructure. refresh now
+      uses a separate index when appropriate. fold has not yet been
+      converted.
+
 - document the workflow on the StGIT wiki
 - release 1.0
 
#6 lore raw

PATCH 4/6 Add 1.0 TODO items from recent discussion by private mail

In reply to Karl Hasselström

---

 TODO |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
TODO +10 -1
index 267e17e..a01daef 100644
@@ -2,6 +2,16 @@ The TODO list before 1.0:
 
 - more regression tests
 
+- Convert the remaining commands to the new infrastructure.
+
+- Go through the design of the UI and make sure there's nothing hard
+  to change in there that we'll regret later.
+
+- Write a user guide. I'm thinking a document on the order of 10-30
+  pages that'll explain why one would want to use StGit, and how.
+
+- Make sure the rest of the documentation is in good shape.
+
 - use a separate index for some commands (refresh, fold etc.) so that
   files already added/removed are not automatically checked in
 
@@ -9,7 +19,6 @@ The TODO list before 1.0:
       uses a separate index when appropriate. fold has not yet been
       converted.
 
-- document the workflow on the StGIT wiki
 - release 1.0
 
 
#7 lore raw

Re: [StGit PATCH 4/6] Add 1.0 TODO items from recent discussion by private mail

2008/10/5 Karl Hasselström <[email protected]>:

TODO The TODO list before 1.0: · line 13

Quoted 9 lines

+- Convert the remaining commands to the new infrastructure.

TODO +8 -0
+
+- Go through the design of the UI and make sure there's nothing hard
+  to change in there that we'll regret later.
+
+- Write a user guide. I'm thinking a document on the order of 10-30
+  pages that'll explain why one would want to use StGit, and how.
+
+- Make sure the rest of the documentation is in good shape.

Actually, at least for these kind of things we should still keep this file. We could drop it after 1.0.

Signature · 1 line
Catalin
#8 lore raw

Re: [StGit PATCH 4/6] Add 1.0 TODO items from recent discussion by private mail

Quoted 14 lines · Catalin Marinas

2008/10/5 Karl Hasselström <[email protected]>:

TODO The TODO list before 1.0: · line 13

Quoted 9 lines

+- Convert the remaining commands to the new infrastructure.

TODO +8 -0
+
+- Go through the design of the UI and make sure there's nothing hard
+  to change in there that we'll regret later.
+
+- Write a user guide. I'm thinking a document on the order of 10-30
+  pages that'll explain why one would want to use StGit, and how.
+
+- Make sure the rest of the documentation is in good shape.

Actually, at least for these kind of things we should still keep this file. We could drop it after 1.0.

Hmm, OK. Though the issue tracker would probably handle this kind of stuff too -- doesn't it have a way to tag issues with the desired milestone, and then present a view with, for example, all the remaining "1.0" issues?

Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle
#9 lore raw

PATCH 5/6 Refresh the main stg man page

In reply to Karl Hasselström

Update the text to reflect what's happened in StGit in the last few releases. Also, consistently capitalize the names "Git" and "StGit".

---

 Documentation/asciidoc.conf |   22 +++++-
 Documentation/stg.txt       |  150 +++++++++++++++++++++++++------------------
 stgit/argparse.py           |    2 -
 3 files changed, 107 insertions(+), 67 deletions(-)
Documentation/asciidoc.conf +18 -4
index 5f7a7af..f2c0ede 100644
@@ -44,9 +44,23 @@ template::[header-declarations]
 endif::backend-docbook[]
 endif::doctype-manpage[]
 
-## link: macro
+## htmllink: macro
 #
-# Usage: link:command[manpage-section]
+# Usage: htmllink:url[text]
+
+ifdef::backend-docbook[]
+[htmllink-inlinemacro]
+{0}
+endif::backend-docbook[]
+
+ifdef::backend-xhtml11[]
+[htmllink-inlinemacro]
+<a href="{target}">{0}</a>
+endif::backend-xhtml11[]
+
+## manlink: macro
+#
+# Usage: manlink:command[manpage-section]
 #
 # Note, {0} is the manpage section, while {target} is the command.
 #
@@ -54,7 +68,7 @@ endif::doctype-manpage[]
 # show the command.
 
 ifdef::backend-docbook[]
-[link-inlinemacro]
+[manlink-inlinemacro]
 {0%{target}}
 {0#<citerefentry>}
 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
@@ -62,7 +76,7 @@ ifdef::backend-docbook[]
 endif::backend-docbook[]
 
 ifdef::backend-xhtml11[]
-[link-inlinemacro]
+[manlink-inlinemacro]
 <a href="{target}.html">{target}{0?({0})}</a>
 endif::backend-xhtml11[]
 
Documentation/stg.txt +88 -62

201 lines not on this page · raw message

stgit/argparse.py +1 -1
index 406ada3..0adb8ff 100644
@@ -103,7 +103,7 @@ def write_asciidoc(cmd, f):
             o.write_asciidoc(f)
             f.write('\n')
     _write_underlined('StGit', '-', f)
-    f.write('Part of the StGit suite - see link:stg[1]\n')
+    f.write('Part of the StGit suite - see manlink:stg[1]\n')
 
 def sign_options():
     def callback(option, opt_str, value, parser, sign_str):
#10 lore raw

Re: [StGit PATCH 5/6] Refresh the main stg man page

2008/10/5 Karl Hasselström <[email protected]>:

Quoted 2 lines

Update the text to reflect what's happened in StGit in the last few releases. Also, consistently capitalize the names "Git" and "StGit".

I need to change the websites as well (BTW, I gave you admin rights on the gna.org project page).

Quoted 2 lines
Documentation/stg.txt +0 -0

[...]

Documentation/stg.txt SYNOPSIS · line 27

Quoted 3 lines
Documentation/stg.txt +3 -0
+  * After making changes to the worktree, you can incorporate the
+    changes into an existing patch; this is called 'refreshing'. You
+    may refresh any patch, not just the topmost one.

I wouldn't advertise the refreshing of "any" patch as it doesn't always work (it actually fails in a lot of cases). Or at least we could mention that there are some restrictions.

Documentation/stg.txt

Quoted 2 lines
Documentation/stg.txt +2 -0
+  * You can easily 'rebase' your patch stack on top of any other Git
+    branch.

It might be better with something like "on top of a different Git commit". The first thought when reading the above is that you can move the patch stack to a different Git branch easily, which is not the case (you need to cherry-pick the patches).

Documentation/stg.txt SYNOPSIS · line 43

Quoted 3 lines
Documentation/stg.txt +3 -0
+  * The patch stack is just some extra metadata attached to regular
+    Git commits, so you can continue to use Git tools along with
+    StGit.

Again, this is with some restrictions (or there aren't any with the new infrastructure?).

Documentation/stg.txt SYNOPSIS · line 56

Quoted 7 lines
Documentation/stg.txt +7 -0
+  Tracking changes from a remote branch, while maintaining local
+  modifications against that branch, possibly with the intent of
+  sending some patches upstream. You can modify your patch stack as
+  much as you want, and when your patches are finally accepted
+  upstream, the permanent recorded Git history will contain just the
+  final sequence of patches, and not the messy sequence of edits that
+  produced them.

Maybe we could mention that the local history is also clean, not only the upstream tree (though you mention it later in a different hunk).

Signature · 1 line
Catalin
#11 lore raw

Re: [StGit PATCH 5/6] Refresh the main stg man page

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Catalin" == Catalin Marinas <[email protected]> writes:

Catalin> I wouldn't advertise the refreshing of "any" patch as it Catalin> doesn't always work (it actually fails in a lot of cases). Or Catalin> at least we could mention that there are some restrictions.

Does it? I use it all the times.

Sam

Signature · 1 line
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/
#12 lore raw

Re: [StGit PATCH 5/6] Refresh the main stg man page

In reply to Catalin Marinas
Quoted 5 lines · Catalin Marinas

2008/10/5 Karl Hasselström <[email protected]>:

Quoted 2 lines
Documentation/stg.txt +0 -0

[...]

Quoted 7 lines

Documentation/stg.txt SYNOPSIS · line 27

Quoted 3 lines
Documentation/stg.txt +3 -0
+  * After making changes to the worktree, you can incorporate the
+    changes into an existing patch; this is called 'refreshing'. You
+    may refresh any patch, not just the topmost one.

I wouldn't advertise the refreshing of "any" patch as it doesn't always work (it actually fails in a lot of cases). Or at least we could mention that there are some restrictions.

Well, when it does fail, it fails in a controlled way, and lets the user manually sort out the conflicts or undo. But I guess we could say that.

When I wrote this, I didn't yet have a "Conflicts" chapter to point to. :-)

Quoted 7 lines

Documentation/stg.txt

Quoted 2 lines
Documentation/stg.txt +2 -0
+  * You can easily 'rebase' your patch stack on top of any other Git
+    branch.

It might be better with something like "on top of a different Git commit". The first thought when reading the above is that you can move the patch stack to a different Git branch easily, which is not the case (you need to cherry-pick the patches).

Right, that makes sense. (We might want to mention "remote branch" explicitly, though, since that's by far the most common case.)

Quoted 6 lines

Documentation/stg.txt SYNOPSIS · line 43

Quoted 3 lines
Documentation/stg.txt +3 -0
+  * The patch stack is just some extra metadata attached to regular
+    Git commits, so you can continue to use Git tools along with
+    StGit.

Again, this is with some restrictions (or there aren't any with the new infrastructure?).

Well, "stg undo" can repair any havoc the git tools can make. And by "havoc" I mean merge or rebase.

This should probably grow a short disclaimer, and point to the "git interoperability" chapter.

Quoted 11 lines

Documentation/stg.txt SYNOPSIS · line 56

Quoted 7 lines
Documentation/stg.txt +7 -0
+  Tracking changes from a remote branch, while maintaining local
+  modifications against that branch, possibly with the intent of
+  sending some patches upstream. You can modify your patch stack as
+  much as you want, and when your patches are finally accepted
+  upstream, the permanent recorded Git history will contain just the
+  final sequence of patches, and not the messy sequence of edits that
+  produced them.

Maybe we could mention that the local history is also clean, not only the upstream tree (though you mention it later in a different hunk).

Hmm, yes. Though I can't immediately think of any wording that doesn't make that paragraph a lot more complicated. Suggestions welcome.

Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle
#13 lore raw

Re: [StGit PATCH 5/6] Refresh the main stg man page

In reply to Karl Hasselström

2008/10/5 Karl Hasselström <[email protected]>:

Documentation/stg.txt SYNOPSIS · line 36

Quoted 3 lines
Documentation/stg.txt +3 -0
+  * You can easily 'rebase' your patch stack on top of any other Git
+    branch. (The 'base' of a patch stack is the most recent Git commit
+    that is not an StGit patch.) For example, if you started making

You may want to move the bracket before the dot.

Signature · 1 line
Catalin
#14 lore raw

Re: [StGit PATCH 5/6] Refresh the main stg man page

Quoted 7 lines · Catalin Marinas

2008/10/5 Karl Hasselström <[email protected]>:

Documentation/stg.txt SYNOPSIS · line 36

Quoted 3 lines
Documentation/stg.txt +3 -0
+  * You can easily 'rebase' your patch stack on top of any other Git
+    branch. (The 'base' of a patch stack is the most recent Git commit
+    that is not an StGit patch.) For example, if you started making

You may want to move the bracket before the dot.

You mean like this?

You can easily 'rebase' your patch stack on top of any other Git branch (the 'base' of a patch stack is the most recent Git commit that is not an StGit patch).

I slightly prefer the original, since the paretheses contain a full stand-alone sentence, but it doesn't matter that much.

Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle
#15 lore raw

PATCH 6/6 Refresh and expand the tutorial (not finished)

In reply to Karl Hasselström

This is a first pass at expanding the tutorial, fixing its formatting, and updating it with the new things that have happened in StGit.

There are a number of things still left to do in the second half of the document; they are tagged with "TODO".

---

 Documentation/Makefile     |    3 
 Documentation/tutorial.txt |  794 ++++++++++++++++++++++++++------------------
 2 files changed, 477 insertions(+), 320 deletions(-)
Documentation/Makefile +2 -1
index 37df9ee..dd029d5 100644
@@ -82,6 +82,7 @@ command-list.txt: $(ALL_PY)
 
 # special formatting rules
 tutorial.html : %.html : %.txt
-	$(ASCIIDOC) -b xhtml11 -d article -f tutorial.conf $(ASCIIDOC_EXTRA) $<
+	$(ASCIIDOC) -b xhtml11 -d article -a toc -f tutorial.conf \
+                $(ASCIIDOC_EXTRA) $<
 tutorial.xml : %.xml : %.txt
 	$(ASCIIDOC) -b docbook -d article -f tutorial.conf $<
Documentation/tutorial.txt +475 -319

891 lines not on this page · raw message

#16 lore raw

Re: [StGit PATCH 6/6] Refresh and expand the tutorial (not finished)

2008/10/5 Karl Hasselström <[email protected]>:

Quoted 5 lines

This is a first pass at expanding the tutorial, fixing its formatting, and updating it with the new things that have happened in StGit.

There are a number of things still left to do in the second half of the document; they are tagged with "TODO".

Thanks for this. Even with the TODOs, I think we can merge them into the master branch so that I have the same copy as you. Do you plan to do more work on the tutorial (so that we don't duplicate)?

Quoted 1 line

-Layout of the .git directory

Should we mention the metadata storage somewhere? This is probably too advanced for the tutorial but might be useful to have it in a development document (for other to understand where we keep things). Actually, is the automatically generated documentation from the new infrastructure enough?

Signature · 1 line
Catalin
#17 lore raw

Re: [StGit PATCH 6/6] Refresh and expand the tutorial (not finished)

Quoted 11 lines · Catalin Marinas

2008/10/5 Karl Hasselström <[email protected]>:

Quoted 6 lines

This is a first pass at expanding the tutorial, fixing its formatting, and updating it with the new things that have happened in StGit.

There are a number of things still left to do in the second half of the document; they are tagged with "TODO".

Thanks for this. Even with the TODOs, I think we can merge them into the master branch so that I have the same copy as you.

OK, that makes sense; "master" is, after all, a development branch. A stable development branch, but still a development branch.

Quoted 2 lines

Do you plan to do more work on the tutorial (so that we don't duplicate)?

I was planning to finish it if nobody else stepped up. But it'd be great if I didn't have to do it alone. :-)

I guess we can avoid duplicate work if we send out a mail saying "I'll now be working on part XXX" before we start writing.

Quoted 5 lines
Quoted 1 line

-Layout of the .git directory

Should we mention the metadata storage somewhere? This is probably too advanced for the tutorial but might be useful to have it in a development document (for other to understand where we keep things).

Yes, probably.

Quoted 2 lines

Actually, is the automatically generated documentation from the new infrastructure enough?

I doubt it. It probably could be made enough, though, but I don't know if that'd be better or worse than a separate document -- the code documentation is tightly tied to the code, and I'm not sure if we want that in this case.

We can let whoever writes it decide.

Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle
#18 lore raw

Re: [StGit PATCH 6/6] Refresh and expand the tutorial (not finished)

Quoted 10 lines · Karl Hasselström
Quoted 2 lines · Catalin Marinas

Do you plan to do more work on the tutorial (so that we don't duplicate)?

I was planning to finish it if nobody else stepped up. But it'd be great if I didn't have to do it alone. :-)

I guess we can avoid duplicate work if we send out a mail saying "I'll now be working on part XXX" before we start writing.

This means that the tutorial patch needs to be pretty much immutable, so you can merge it right away. I'll address your comments in follow-up patches.

Signature · 2 lines
Karl Hasselström, [email protected]
      www.treskal.com/kalle