From: Karl Hasselström Date: Tue, 26 Aug 2008 22:00:15 +0000 (+0200) Subject: Merge branch 'stable' X-Git-Tag: v0.15-rc1~164 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/850c3a89476ba8608b2deeba109fa7def2607655?ds=sidebyside;hp=-c Merge branch 'stable' Conflicts: stgit/commands/diff.py stgit/commands/edit.py stgit/commands/export.py stgit/commands/files.py stgit/commands/mail.py stgit/gitmergeonefile.py t/t1200-push-modified.sh t/t1201-pull-trailing.sh t/test-lib.sh --- 850c3a89476ba8608b2deeba109fa7def2607655 diff --combined Documentation/tutorial.txt index 6eaa623,b040d29..5d2e50a --- a/Documentation/tutorial.txt +++ b/Documentation/tutorial.txt @@@ -32,7 -32,7 +32,7 @@@ Repository initialisatio ------------------------- In stand-alone mode, StGIT is used in conjunction with a GIT repository - that is already initialised (using 'git-init-db'). StGIT cannot be used + that is already initialised (using 'git init'). StGIT cannot be used outside of a GIT repository. Any branch in a GIT repository may be managed by StGIT. Each branch managed by StGIT contains an independent series of StGIT patches. @@@ -123,22 -123,18 +123,22 @@@ You can view modified files that have a stg files The 'stg refresh' command automatically notes changes to files that -already exist in the working directory, but you have to tell StGIT -explicitly if you add, remove, or rename files. -To record the addition or deletion of files in your new patch: +already exist in the working directory (it also notices if you remove +them), but you have to tell StGIT explicitly if you add or rename a +file: - stg add [*] - stg rm [*] + git add new-file -To record the renaming of a file in your new patch, issue both of these -commands: +to add a file, and - stg rm - stg add + mv old-file new-file + git add new-file + +or simply + + git mv old-file new-file + +to move a file. Stack manipulation: managing multiple patches diff --combined examples/gitconfig index 28d94af,b7a6629..4a36202 --- a/examples/gitconfig +++ b/examples/gitconfig @@@ -19,7 -19,6 +19,7 @@@ #autoresolved = no # SMTP server for sending patches + #smtpserver = /usr/sbin/sendmail -t -i #smtpserver = localhost:25 # Set to 'yes' to use SMTP over TLS @@@ -43,14 -42,14 +43,14 @@@ #pager = filterdiff --annotate | colordiff | less -FRX # GIT pull and fetch commands (should take the same arguments as - # git-fetch or git-pull). By default: - #pullcmd = git-pull - #fetchcmd = git-fetch + # git fetch or git pull). By default: + #pullcmd = git pull + #fetchcmd = git fetch # Rebase command. Note that this command is internally implemented in # a different way. Only define this option if a different rebase # is needed (i.e. 'git svn rebase') - #rebasecmd = git-reset + #rebasecmd = git reset # "stg pull" policy. This is the repository default, which can be # overriden on a per-branch basis using branch.*.stgit.pull-policy @@@ -61,6 -60,13 +61,6 @@@ # To support local parent branches: #pull-policy = rebase - # The three-way merge tool. Note that the 'output' file contains the - # same data as 'branch1'. This is useful for tools that do not take an - # output parameter - #merger = diff3 -L current -L ancestor -L patched -m -E \ - # \"%(branch1)s\" \"%(ancestor)s\" \"%(branch2)s\" \ - # > \"%(output)s\" - # Interactive two/three-way merge tool. It is executed by the # 'resolved --interactive' command #i3merge = xxdiff --title1 current --title2 ancestor --title3 patched \ @@@ -96,10 -102,6 +96,10 @@@ # The maximum length of an automatically generated patch name #namelenth = 30 + # Extra options to pass to "git diff" (extend/override with + # -O/--diff-opts). For example, -M turns on rename detection. + #diff-opts = -M + [mail "alias"] # E-mail aliases used with the 'mail' command git = git@vger.kernel.org diff --combined stgit/commands/pick.py index 2a670e8,add2a33..44b461e --- a/stgit/commands/pick.py +++ b/stgit/commands/pick.py @@@ -81,14 -81,14 +81,14 @@@ def __pick_commit(commit_id, patchname if options.fold: out.start('Folding commit %s' % commit_id) - # try a direct git-apply first + # try a direct git apply first if not git.apply_diff(bottom, top): - git.merge(bottom, git.get_head(), top, recursive = True) + git.merge_recursive(bottom, git.get_head(), top) out.done() elif options.update: - rev1 = git_id(crt_series, '//bottom') - rev2 = git_id(crt_series, '//top') + rev1 = git_id(crt_series, 'HEAD^') + rev2 = git_id(crt_series, 'HEAD') files = git.barefiles(rev1, rev2).split('\n') out.start('Updating with commit %s' % commit_id) @@@ -115,8 -115,10 +115,8 @@@ patchname = newpatch.get_name() # find a patchlog to fork from - (refpatchname, refbranchname, refpatchid) = parse_rev(patchname) - if refpatchname and not refpatchid and \ - (not refpatchid or refpatchid == 'top'): - # FIXME: should also support picking //top.old + refbranchname, refpatchname = parse_rev(patchname) + if refpatchname: if refbranchname: # assume the refseries is OK, since we already resolved # commit_str to a git_id diff --combined t/README index 757f810,ffb3c66..1e9510b --- a/t/README +++ b/t/README @@@ -22,11 -22,11 +22,11 @@@ The easiest way to run tests is to say the tests. *** t0000-basic.sh *** - * ok 1: .git/objects should be empty after git-init-db in an empty repo. + * ok 1: .git/objects should be empty after git init in an empty repo. * ok 2: .git/objects should have 256 subdirectories. - * ok 3: git-update-index without --add should fail adding. + * ok 3: git update-index without --add should fail adding. ... - * ok 23: no diff after checkout and git-update-index --refresh. + * ok 23: no diff after checkout and git update-index --refresh. * passed all 23 test(s) *** t0100-environment-names.sh *** * ok 1: using old names should issue warnings. @@@ -37,9 -37,9 +37,9 @@@ Or you can run each test individually f this: $ sh ./t3001-ls-files-killed.sh - * ok 1: git-update-index --add to add various paths. - * ok 2: git-ls-files -k to show killed files. - * ok 3: validate git-ls-files -k output. + * ok 1: git update-index --add to add various paths. + * ok 2: git ls-files -k to show killed files. + * ok 3: validate git ls-files -k output. * passed all 3 test(s) You can pass --verbose (or -v), --debug (or -d), and --immediate @@@ -105,7 -105,7 +105,7 @@@ assignment to variable 'test_descriptio test_description='xxx test (option --frotz) This test registers the following structure in the cache - and tries to run git-ls-files with option --frotz.' + and tries to run git ls-files with option --frotz.' Source 'test-lib.sh' @@@ -154,8 -154,8 +154,8 @@@ library for your script to use Example: test_expect_success \ - 'git-write-tree should be able to write an empty tree.' \ - 'tree=$(git-write-tree)' + 'git write-tree should be able to write an empty tree.' \ + 'tree=$(git write-tree)' - test_expect_failure