Mercurial > hg > evolve
changeset 1032:43cceb37324c
merge with 3.3.2
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 14 May 2014 16:42:41 -0700 |
parents | bcd0c12070b2 (current diff) 66dab6b2c6e4 (diff) |
children | 16594198b64a |
files | README hgext/evolve.py tests/test-evolve.t tests/test-tutorial.t |
diffstat | 6 files changed, 53 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags +++ b/.hgtags @@ -21,3 +21,4 @@ c3ba8a965a7a173e388d84819e936ea9bae9797f 3.2.0 83882f2fbecba0b7e7f7e5d490b57db93bd7fa22 3.3.0 fc04758ea9f549684989ee673b04d9724756dc85 3.3.1 +a03ea39aca2a66ea36817512d586dcbc99dbfe9b 3.3.2
--- a/README +++ b/README @@ -67,12 +67,14 @@ - avoid exchanging common markers in some case - add a hook related to the new commands -3.3.2 -- +3.3.2 -- 2014-05-14 - fix a bug where evolve were creating changeset with 2 parents on windows (fix issues #16, #35 and #42) - adds a --obsolete flag to import (requieres Mercurial 3.0) - prune: update to successor rather than parent when pruning '.' with -s +- fold: add missing --message and --logfile option +- fold: add squash as an alias 3.3.1 -- 2014-04-23
--- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -2020,9 +2020,9 @@ finally: lockmod.release(lock, wlock) -@command('^fold', +@command('^fold|squash', [('r', 'rev', [], _("explicitly specify the full set of revision to fold")), - ] + commitopts2, + ] + commitopts + commitopts2, # allow to choose the seed ? _('rev')) def fold(ui, repo, *revs, **opts): @@ -2066,11 +2066,16 @@ commitopts = opts.copy() allctx = [repo[r] for r in revs] targetphase = max(c.phase() for c in allctx) - msgs = ["HG: This is a fold of %d changesets." % len(allctx)] - msgs += ["HG: Commit message of changeset %s.\n\n%s\n" % - (c.rev(), c.description()) for c in allctx] - commitopts['message'] = "\n".join(msgs) - commitopts['edit'] = True + + if commitopts.get('message') or commitopts.get('logfile'): + commitopts['edit'] = False + else: + msgs = ["HG: This is a fold of %d changesets." % len(allctx)] + msgs += ["HG: Commit message of changeset %s.\n\n%s\n" % + (c.rev(), c.description()) for c in allctx] + commitopts['message'] = "\n".join(msgs) + commitopts['edit'] = True + newid, _ = rewrite(repo, root, allctx, head, [root.p1().node(), root.p2().node()], commitopts=commitopts)
--- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='hg-evolve', - version='3.3.1', + version='3.3.2', author='Pierre-Yves David', maintainer='Pierre-Yves David', maintainer_email='pierre-yves.david@ens-lyon.org',
--- a/tests/test-evolve.t +++ b/tests/test-evolve.t @@ -709,3 +709,35 @@ A c a R a + +Test fold with commit messages + + $ cd ../work + $ hg fold .^ --message "Folding with custom commit message" + 2 changesets folded + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ glog + @ 16:e6d8dace77a1@default(draft) Folding with custom commit message + | + o 13:e9c952d5bc4b@default(draft) dansk! + | + o 7:abe98aeaaa35@default(public) another feature + | + o 6:ba0ec09b1bab@default(public) a nifty feature + | + o 0:e55e0562ee93@default(public) base + + $ cat > commit-message <<EOF + > A longer + > commit message + > EOF + + $ hg fold .^ --logfile commit-message + 2 changesets folded + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg qlog + 17 - 2451d817c756 A longer + commit message (draft) + 7 - abe98aeaaa35 another feature (public) + 6 - ba0ec09b1bab a nifty feature (public) + 0 - e55e0562ee93 base (public)
--- a/tests/test-tutorial.t +++ b/tests/test-tutorial.t @@ -476,6 +476,8 @@ $ hg help fold hg fold rev + aliases: squash + Fold multiple revisions into a single one The revisions from your current working directory to the given one are @@ -487,6 +489,8 @@ options: -r --rev VALUE [+] explicitly specify the full set of revision to fold + -m --message TEXT use text as commit message + -l --logfile FILE read commit message from file -d --date DATE record the specified date as commit date -u --user USER record the specified user as committer