# HG changeset patch # User Matt Mackall # Date 1394740834 18000 # Node ID 9c1665f365888e3e0a49731298c31f81afa29c55 # Parent 71df845d86cf370db08572cf92632b2c9ef64f6b# Parent 2764148aa088da248f74d1bf92e5d504f7f4db9a merge with default diff -r 71df845d86cf -r 9c1665f36588 contrib/hgfixes/fix_bytesmod.py --- a/contrib/hgfixes/fix_bytesmod.py Thu Mar 13 14:34:32 2014 -0500 +++ b/contrib/hgfixes/fix_bytesmod.py Thu Mar 13 15:00:34 2014 -0500 @@ -37,7 +37,7 @@ if self.filename.endswith(bfn): return if not self.filename.endswith('mercurial/py3kcompat.py'): - touch_import('.', 'py3kcompat', node=node) + touch_import('mercurial', 'py3kcompat', node=node) formatstr = results['formatstr'].clone() data = results['data'].clone() diff -r 71df845d86cf -r 9c1665f36588 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu Mar 13 14:34:32 2014 -0500 +++ b/mercurial/cmdutil.py Thu Mar 13 15:00:34 2014 -0500 @@ -1969,7 +1969,11 @@ ph = repo.ui.config('phases', 'new-commit', phases.draft) try: - repo.ui.setconfig('phases', 'new-commit', old.phase()) + if opts.get('secret'): + commitphase = 'secret' + else: + commitphase = old.phase() + repo.ui.setconfig('phases', 'new-commit', commitphase) newid = repo.commitctx(new) finally: repo.ui.setconfig('phases', 'new-commit', ph) diff -r 71df845d86cf -r 9c1665f36588 mercurial/commands.py --- a/mercurial/commands.py Thu Mar 13 14:34:32 2014 -0500 +++ b/mercurial/commands.py Thu Mar 13 15:00:34 2014 -0500 @@ -1397,6 +1397,7 @@ if opts.get('force_editor'): e = cmdutil.commitforceeditor + # commitfunc is used only for temporary amend commit by cmdutil.amend def commitfunc(ui, repo, message, match, opts): editor = e # message contains text from -m or -l, if it's empty, @@ -1404,18 +1405,12 @@ if not message: message = old.description() editor = cmdutil.commitforceeditor - try: - if opts.get('secret'): - ui.setconfig('phases', 'new-commit', 'secret') - - return repo.commit(message, - opts.get('user') or old.user(), - opts.get('date') or old.date(), - match, - editor=editor, - extra=extra) - finally: - ui.setconfig('phases', 'new-commit', oldcommitphase) + return repo.commit(message, + opts.get('user') or old.user(), + opts.get('date') or old.date(), + match, + editor=editor, + extra=extra) current = repo._bookmarkcurrent marks = old.bookmarks() diff -r 71df845d86cf -r 9c1665f36588 mercurial/scmutil.py --- a/mercurial/scmutil.py Thu Mar 13 14:34:32 2014 -0500 +++ b/mercurial/scmutil.py Thu Mar 13 15:00:34 2014 -0500 @@ -506,7 +506,7 @@ start, end = spec.split(_revrangesep, 1) start = revfix(repo, start, 0) end = revfix(repo, end, len(repo) - 1) - if end == nullrev and start <= 0: + if end == nullrev and start < 0: start = nullrev rangeiter = repo.changelog.revs(start, end) if not seen and not l: diff -r 71df845d86cf -r 9c1665f36588 setup.py --- a/setup.py Thu Mar 13 14:34:32 2014 -0500 +++ b/setup.py Thu Mar 13 15:00:34 2014 -0500 @@ -24,7 +24,7 @@ def printf(*args, **kwargs): f = kwargs.get('file', sys.stdout) end = kwargs.get('end', '\n') - f.write(b' '.join(args) + end) + f.write(b(' ').join(args) + end) # Solaris Python packaging brain damage try: diff -r 71df845d86cf -r 9c1665f36588 tests/killdaemons.py --- a/tests/killdaemons.py Thu Mar 13 14:34:32 2014 -0500 +++ b/tests/killdaemons.py Thu Mar 13 15:00:34 2014 -0500 @@ -16,7 +16,7 @@ logfn('# Killing daemon process %d' % pid) PROCESS_TERMINATE = 1 PROCESS_QUERY_INFORMATION = 0x400 - SYNCHRONIZE = 0x00100000L + SYNCHRONIZE = 0x00100000 WAIT_OBJECT_0 = 0 WAIT_TIMEOUT = 258 handle = ctypes.windll.kernel32.OpenProcess( @@ -89,4 +89,3 @@ if __name__ == '__main__': path, = sys.argv[1:] killdaemons(path) - diff -r 71df845d86cf -r 9c1665f36588 tests/test-commit-amend.t --- a/tests/test-commit-amend.t Thu Mar 13 14:34:32 2014 -0500 +++ b/tests/test-commit-amend.t Thu Mar 13 15:00:34 2014 -0500 @@ -765,3 +765,14 @@ $ hg ci --close-branch -m'open and close' abort: can only close branch heads [255] + +Test that amend with --secret creates new secret changeset forcibly +--------------------------------------------------------------------- + + $ hg phase '.^::.' + 35: draft + 36: draft + $ hg commit --amend --secret -m 'amend as secret' -q + $ hg phase '.^::.' + 35: draft + 38: secret diff -r 71df845d86cf -r 9c1665f36588 tests/test-glog.t --- a/tests/test-glog.t Thu Mar 13 14:34:32 2014 -0500 +++ b/tests/test-glog.t Thu Mar 13 15:00:34 2014 -0500 @@ -2111,6 +2111,11 @@ issue3772 $ hg log -G -r :null + o changeset: 0:f8035bb17114 + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | summary: add a + | o changeset: -1:000000000000 user: date: Thu Jan 01 00:00:00 1970 +0000 diff -r 71df845d86cf -r 9c1665f36588 tests/test-log.t --- a/tests/test-log.t Thu Mar 13 14:34:32 2014 -0500 +++ b/tests/test-log.t Thu Mar 13 15:00:34 2014 -0500 @@ -1356,6 +1356,12 @@ issue3772: hg log -r :null showing revision 0 as well $ hg log -r :null + changeset: 0:65624cd9070a + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a bunch of weird directories + changeset: -1:000000000000 user: date: Thu Jan 01 00:00:00 1970 +0000