# HG changeset patch # User Pierre-Yves David # Date 1347452663 -7200 # Node ID 897f6da2314ed3871b05282cf5f42531f2b872f2 # Parent 4580ff7157aeedcb3040d4ebe370da39dd104bb7 fold: handle the lack of revision to fold diff -r 4580ff7157ae -r 897f6da2314e hgext/evolve.py --- a/hgext/evolve.py Tue Sep 11 16:19:27 2012 +0200 +++ b/hgext/evolve.py Wed Sep 12 14:24:23 2012 +0200 @@ -2062,9 +2062,8 @@ """Fold multiple revisions into a single one""" revs = list(revs) revs.extend(opts['rev']) - if not revs: - revs = ['.'] - revs = scmutil.revrange(repo, revs) + if revs: + revs = scmutil.revrange(repo, revs) if not revs: ui.write_err('no revision to fold\n') return 1 diff -r 4580ff7157ae -r 897f6da2314e tests/test-evolve.t --- a/tests/test-evolve.t Tue Sep 11 16:19:27 2012 +0200 +++ b/tests/test-evolve.t Wed Sep 12 14:24:23 2012 +0200 @@ -555,6 +555,9 @@ Test fold $ rm *.orig + $ hg fold + no revision to fold + [1] $ hg fold 6::10 2 changesets folded 1 files updated, 0 files merged, 0 files removed, 0 files unresolved