tests/test-glog.t
changeset 16186 af3e67354beb
parent 16184 6863caf01daa
child 16315 f89284d72a61
equal deleted inserted replaced
16185:352053e6cd8e 16186:af3e67354beb
    88   > from hgext import graphlog
    88   > from hgext import graphlog
    89   >  
    89   >  
    90   > def uisetup(ui):
    90   > def uisetup(ui):
    91   >     def printrevset(orig, ui, repo, *pats, **opts):
    91   >     def printrevset(orig, ui, repo, *pats, **opts):
    92   >         if opts.get('print_revset'):
    92   >         if opts.get('print_revset'):
    93   >             expr = graphlog.revset(repo, pats, opts)
    93   >             expr = graphlog.revset(repo, pats, opts)[0]
    94   >             tree = revset.parse(expr)[0]
    94   >             tree = revset.parse(expr)[0]
    95   >             ui.write(tree, "\n")
    95   >             ui.write(tree, "\n")
    96   >             return 0
    96   >             return 0
    97   >         return orig(ui, repo, *pats, **opts)
    97   >         return orig(ui, repo, *pats, **opts)
    98   >     entry = extensions.wrapcommand(commands.table, 'log', printrevset)
    98   >     entry = extensions.wrapcommand(commands.table, 'log', printrevset)
  1653   ('group', ('group', ('func', ('symbol', '_matchfiles'), ('list', ('string', 'r:'), ('string', 'p:a')))))
  1653   ('group', ('group', ('func', ('symbol', '_matchfiles'), ('list', ('string', 'r:'), ('string', 'p:a')))))
  1654   $ testlog --removed --follow a
  1654   $ testlog --removed --follow a
  1655   abort: can only follow copies/renames for explicit filenames
  1655   abort: can only follow copies/renames for explicit filenames
  1656   abort: can only follow copies/renames for explicit filenames
  1656   abort: can only follow copies/renames for explicit filenames
  1657   abort: can only follow copies/renames for explicit filenames
  1657   abort: can only follow copies/renames for explicit filenames
       
  1658 
       
  1659 Test --patch and --stat with --follow and --follow-first
       
  1660 
       
  1661   $ hg up -q 3
       
  1662   $ hg log -G --git --patch b
       
  1663   o  changeset:   1:216d4c92cf98
       
  1664   |  user:        test
       
  1665   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1666   |  summary:     copy a b
       
  1667   |
       
  1668   |  diff --git a/a b/b
       
  1669   |  copy from a
       
  1670   |  copy to b
       
  1671   |
       
  1672 
       
  1673   $ hg log -G --git --stat b
       
  1674   o  changeset:   1:216d4c92cf98
       
  1675   |  user:        test
       
  1676   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1677   |  summary:     copy a b
       
  1678   |
       
  1679   |   a |  0
       
  1680   |   1 files changed, 0 insertions(+), 0 deletions(-)
       
  1681   |
       
  1682 
       
  1683   $ hg log -G --git --patch --follow b
       
  1684   o  changeset:   1:216d4c92cf98
       
  1685   |  user:        test
       
  1686   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1687   |  summary:     copy a b
       
  1688   |
       
  1689   |  diff --git a/a b/b
       
  1690   |  copy from a
       
  1691   |  copy to b
       
  1692   |
       
  1693   o  changeset:   0:f8035bb17114
       
  1694      user:        test
       
  1695      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1696      summary:     add a
       
  1697   
       
  1698      diff --git a/a b/a
       
  1699      new file mode 100644
       
  1700      --- /dev/null
       
  1701      +++ b/a
       
  1702      @@ -0,0 +1,1 @@
       
  1703      +a
       
  1704   
       
  1705 
       
  1706   $ hg log -G --git --stat --follow b
       
  1707   o  changeset:   1:216d4c92cf98
       
  1708   |  user:        test
       
  1709   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1710   |  summary:     copy a b
       
  1711   |
       
  1712   |   a |  0
       
  1713   |   1 files changed, 0 insertions(+), 0 deletions(-)
       
  1714   |
       
  1715   o  changeset:   0:f8035bb17114
       
  1716      user:        test
       
  1717      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1718      summary:     add a
       
  1719   
       
  1720       a |  1 +
       
  1721       1 files changed, 1 insertions(+), 0 deletions(-)
       
  1722   
       
  1723 
       
  1724   $ hg up -q 6
       
  1725   $ hg log -G --git --patch --follow-first e
       
  1726   @    changeset:   6:fc281d8ff18d
       
  1727   |\   tag:         tip
       
  1728   | |  parent:      5:99b31f1c2782
       
  1729   | |  parent:      4:17d952250a9d
       
  1730   | |  user:        test
       
  1731   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1732   | |  summary:     merge 5 and 4
       
  1733   | |
       
  1734   | |  diff --git a/e b/e
       
  1735   | |  --- a/e
       
  1736   | |  +++ b/e
       
  1737   | |  @@ -1,1 +1,1 @@
       
  1738   | |  -ee
       
  1739   | |  +merge
       
  1740   | |
       
  1741   o |  changeset:   5:99b31f1c2782
       
  1742   | |  parent:      3:5918b8d165d1
       
  1743   | |  user:        test
       
  1744   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1745   | |  summary:     add another e
       
  1746   | |
       
  1747   | |  diff --git a/e b/e
       
  1748   | |  new file mode 100644
       
  1749   | |  --- /dev/null
       
  1750   | |  +++ b/e
       
  1751   | |  @@ -0,0 +1,1 @@
       
  1752   | |  +ee
       
  1753   | |