Merge branch 'stable'
authorKarl Hasselström <kha@treskal.com>
Tue, 26 Aug 2008 22:00:15 +0000 (00:00 +0200)
committerKarl Hasselström <kha@treskal.com>
Tue, 26 Aug 2008 22:00:15 +0000 (00:00 +0200)
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

1  2 
Documentation/tutorial.txt
examples/gitconfig
stgit/commands/pick.py
t/README
t/t1200-push-modified.sh
t/t1201-pull-trailing.sh
t/t1302-repair-interop.sh
t/t2702-refresh-rm.sh

Simple merge
Simple merge
@@@ -81,9 -81,9 +81,9 @@@ 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:
diff --cc t/README
Simple merge
@@@ -35,8 -35,8 +35,8 @@@ test_expect_success 
      'Port those patches to orig tree' '
      (
          cd foo &&
-         GIT_DIR=../bar/.git git-format-patch --stdout \
-           $(cd ../bar && stg id master:{base})..HEAD | git-am -3 -k
+         GIT_DIR=../bar/.git git format-patch --stdout \
 -          $(cd ../bar && stg id base@master)..HEAD | git am -3 -k
++          $(cd ../bar && stg id master:{base})..HEAD | git am -3 -k
      )
  '
  
@@@ -29,9 -29,9 +29,9 @@@ test_expect_success 
  test_expect_success \
      'Port those patches to orig tree' \
      '(cd foo &&
-       GIT_DIR=../bar/.git git-format-patch --stdout \
+       GIT_DIR=../bar/.git git format-patch --stdout \
 -          $(cd ../bar && stg id base@master)..HEAD |
 +          $(cd ../bar && stg id master:{base})..HEAD |
-       git-am -3 -k
+       git am -3 -k
       )
      '
  
@@@ -21,39 -21,39 +21,39 @@@ test_expect_success 'Create five patche
      for i in 0 1 2 3 4; do
          stg new p$i -m p$i;
      done &&
 -    [ "$(echo $(stg applied))" = "p0 p1 p2 p3 p4" ] &&
 -    [ "$(echo $(stg unapplied))" = "" ]
 +    [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2 p3 p4" ] &&
 +    [ "$(echo $(stg series --unapplied --noprefix))" = "" ]
  '
  
- test_expect_success 'Pop two patches with git-reset' '
+ test_expect_success 'Pop two patches with git reset' '
      git reset --hard HEAD~2 &&
 -    ! stg refresh &&
 +    command_error stg refresh &&
      stg repair &&
      stg refresh &&
 -    [ "$(echo $(stg applied))" = "p0 p1 p2" ] &&
 -    [ "$(echo $(stg unapplied))" = "p3 p4" ]
 +    [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2" ] &&
 +    [ "$(echo $(stg series --unapplied --noprefix))" = "p3 p4" ]
  '
  
  test_expect_success 'Create a new patch' '
      stg new q0 -m q0 &&
 -    [ "$(echo $(stg applied))" = "p0 p1 p2 q0" ] &&
 -    [ "$(echo $(stg unapplied))" = "p3 p4" ]
 +    [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2 q0" ] &&
 +    [ "$(echo $(stg series --unapplied --noprefix))" = "p3 p4" ]
  '
  
- test_expect_success 'Go to an unapplied patch with with git-reset' '
+ test_expect_success 'Go to an unapplied patch with with git reset' '
      git reset --hard $(stg id p3) &&
 -    ! stg refresh &&
 +    command_error stg refresh &&
      stg repair &&
      stg refresh &&
 -    [ "$(echo $(stg applied))" = "p0 p1 p2 p3" ] &&
 -    [ "$(echo $(stg unapplied))" = "q0 p4" ]
 +    [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2 p3" ] &&
 +    [ "$(echo $(stg series --unapplied --noprefix))" = "q0 p4" ]
  '
  
- test_expect_success 'Go back to below the stack base with git-reset' '
+ test_expect_success 'Go back to below the stack base with git reset' '
      git reset --hard foo-tag &&
      stg repair &&
 -    [ "$(echo $(stg applied))" = "" ] &&
 -    [ "$(echo $(stg unapplied))" = "p0 p1 p2 p3 q0 p4" ]
 +    [ "$(echo $(stg series --applied --noprefix))" = "" ] &&
 +    [ "$(echo $(stg series --unapplied --noprefix))" = "p0 p1 p2 p3 q0 p4" ]
  '
  
  test_done
index 896ebf3,0000000..0362cc6
mode 100755,000000..100755
--- /dev/null
@@@ -1,101 -1,0 +1,101 @@@
- test_expect_success 'git-rm a file' '
 +#!/bin/sh
 +
 +test_description='"stg refresh" with removed files'
 +
 +. ./test-lib.sh
 +
 +# Ignore our own temp files.
 +cat >> .git/info/exclude <<EOF
 +expected*.txt
 +files*.txt
 +status*.txt
 +EOF
 +
 +reset () {
 +    stg pop -a > /dev/null
 +    git reset --hard > /dev/null
 +}
 +
 +test_expect_success 'Initialize StGit stack' '
 +    stg init &&
 +    echo x > x.txt &&
 +    echo y > y.txt &&
 +    git add x.txt y.txt &&
 +    git commit -m "Add some files"
 +'
 +
 +cat > expected0.txt <<EOF
 +D y.txt
 +EOF
 +printf '' > expected1.txt
- test_expect_success 'git-rm a file together with other changes' '
++test_expect_success 'git rm a file' '
 +    stg new -m p0 &&
 +    git rm y.txt &&
 +    stg status > status0.txt &&
 +    test_cmp expected0.txt status0.txt &&
 +    stg refresh &&
 +    stg status > status1.txt &&
 +    test_cmp expected1.txt status1.txt &&
 +    stg files | sort > files.txt &&
 +    test_cmp expected0.txt files.txt
 +'
 +
 +reset
 +
 +cat > expected0.txt <<EOF
 +D y.txt
 +M x.txt
 +EOF
 +printf '' > expected1.txt
++test_expect_success 'git rm a file together with other changes' '
 +    stg new -m p1 &&
 +    echo x2 >> x.txt &&
 +    git rm y.txt &&
 +    stg status > status0.txt &&
 +    test_cmp expected0.txt status0.txt &&
 +    stg refresh &&
 +    stg status > status1.txt &&
 +    test_cmp expected1.txt status1.txt &&
 +    stg files | sort > files.txt &&
 +    test_cmp expected0.txt files.txt
 +'
 +
 +reset
 +
 +cat > expected0.txt <<EOF
 +D y.txt
 +EOF
 +printf '' > expected1.txt
 +test_expect_success 'rm a file' '
 +    stg new -m p2 &&
 +    rm y.txt &&
 +    stg status > status0.txt &&
 +    test_cmp expected0.txt status0.txt &&
 +    stg refresh &&
 +    stg status > status1.txt &&
 +    test_cmp expected1.txt status1.txt &&
 +    stg files | sort > files.txt &&
 +    test_cmp expected0.txt files.txt
 +'
 +
 +reset
 +
 +cat > expected0.txt <<EOF
 +D y.txt
 +M x.txt
 +EOF
 +printf '' > expected1.txt
 +test_expect_success 'rm a file together with other changes' '
 +    stg new -m p3 &&
 +    echo x2 >> x.txt &&
 +    rm y.txt &&
 +    stg status > status0.txt &&
 +    test_cmp expected0.txt status0.txt &&
 +    stg refresh &&
 +    stg status > status1.txt &&
 +    test_cmp expected1.txt status1.txt &&
 +    stg files | sort > files.txt &&
 +    test_cmp expected0.txt files.txt
 +'
 +
 +test_done