tests/test-hg-parseurl.py
author Radomir Dopieralski <sheep@stxnext.pl>
Tue, 15 Mar 2011 18:33:36 +0100
changeset 13661 ee349e228835
parent 12865 4c50552fc9bc
child 13897 375872fdadba
permissions -rw-r--r--
rebase: add -m/--message to rebase --collapse (issue2389) When collapsing changesets with rebase, you get a chance to edit the commit message manually, but there is no way to pass this message from the command line. This patch adds a `--message` (with short form `-m`) and `--logfile` (with short form `-m`) options to the rebase command. These options suppresses the generation of the default commit message, and instead use the message provided in the option (in case of `-m`) or in the file it points to (in case of `-l`). If you use this option without the `--collapse` option, it will raise an error. Options documentation edited by Patrick Mezard <pmezard@gmail.com>

from mercurial.hg import parseurl

def testparse(url, branch=[]):
    print '%s, branches: %r' % parseurl(url, branch)

testparse('http://example.com/no/anchor')
testparse('http://example.com/an/anchor#foo')
testparse('http://example.com/no/anchor/branches', branch=['foo'])
testparse('http://example.com/an/anchor/branches#bar', branch=['foo'])
testparse('http://example.com/an/anchor/branches-None#foo', branch=None)