tests/test-import.t
changeset 29900 50f2966f86ca
parent 29485 6a98f9408a50
child 30078 173bdb502503
equal deleted inserted replaced
29899:a9b92164a1f4 29900:50f2966f86ca
  1621   $ hg update --rev 'desc(initial)'
  1621   $ hg update --rev 'desc(initial)'
  1622   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  1622   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  1623   $ hg export --rev 'desc("extended jungle")' | hg import --partial -
  1623   $ hg export --rev 'desc("extended jungle")' | hg import --partial -
  1624   applying patch from stdin
  1624   applying patch from stdin
  1625   unable to find 'jungle' for patching
  1625   unable to find 'jungle' for patching
       
  1626   (use '--prefix' to apply patch relative to the current directory)
  1626   1 out of 1 hunks FAILED -- saving rejects to file jungle.rej
  1627   1 out of 1 hunks FAILED -- saving rejects to file jungle.rej
  1627   patch applied partially
  1628   patch applied partially
  1628   (fix the .rej files and run `hg commit --amend`)
  1629   (fix the .rej files and run `hg commit --amend`)
  1629   [1]
  1630   [1]
  1630 
  1631 
  1762   applying $TESTTMP/foo.patch
  1763   applying $TESTTMP/foo.patch
  1763   imported-foo: bar
  1764   imported-foo: bar
  1764   $ hg log --debug -r . | grep extra
  1765   $ hg log --debug -r . | grep extra
  1765   extra:       branch=default
  1766   extra:       branch=default
  1766   extra:       foo=bar
  1767   extra:       foo=bar
       
  1768 
       
  1769 Warn the user that paths are relative to the root of
       
  1770 repository when file not found for patching
       
  1771 
       
  1772   $ mkdir filedir
       
  1773   $ echo "file1" >> filedir/file1
       
  1774   $ hg add filedir/file1
       
  1775   $ hg commit -m "file1"
       
  1776   $ cd filedir
       
  1777   $ hg import -p 2 - <<EOF
       
  1778   > # HG changeset patch
       
  1779   > # User test
       
  1780   > # Date 0 0
       
  1781   > file2
       
  1782   > 
       
  1783   > diff --git a/filedir/file1 b/filedir/file1
       
  1784   > --- a/filedir/file1
       
  1785   > +++ b/filedir/file1
       
  1786   > @@ -1,1 +1,2 @@
       
  1787   >  file1
       
  1788   > +file2
       
  1789   > EOF
       
  1790   applying patch from stdin
       
  1791   unable to find 'file1' for patching
       
  1792   (use '--prefix' to apply patch relative to the current directory)
       
  1793   1 out of 1 hunks FAILED -- saving rejects to file file1.rej
       
  1794   abort: patch failed to apply
       
  1795   [255]