view tests/test-mq-qnew.out @ 12039:18e1e7520b67 stable

alias: make shadowing behavior more consistent (issue2054) Currently, given an alias like the following: [alias] summary = summary --remote The alias might be executed - or it might not - depending on the order of the cmdtable dict. This happens because cmdalias gets assigned back to the cmdtable like so: cmdtable['summary'] = ... Yet '^summary|sum' is still in the table, so which one cmdutil.findcmd() chooses isn't deterministic. This patch makes cmdalias assign back to '^summary|sum'. It uses the same cmdtable key lookup that extensions.wrapcommand() does.
author Brodie Rao <brodie@bitheap.org>
date Sat, 21 Aug 2010 22:48:14 -0400
parents 0c944b7af564
children a5903e612f07
line wrap: on
line source

%%% plain headers
adding a
% qnew should refuse bad patch names
abort: "series" cannot be used as the name of a patch
abort: "status" cannot be used as the name of a patch
abort: "guards" cannot be used as the name of a patch
abort: ".hgignore" cannot be used as the name of a patch
abort: ".mqfoo" cannot be used as the name of a patch
abort: "foo#bar" cannot be used as the name of a patch
abort: "foo:bar" cannot be used as the name of a patch
% qnew with name containing slash
foo/bar.patch
popping foo/bar.patch
patch queue now empty
% qnew with uncommitted changes
uncommitted.patch
% qnew implies add
A .hgignore
A series
A uncommitted.patch
% qnew missing
abort: missing: No such file or directory
% qnew -m
foo bar

% qnew twice
abort: patch "first.patch" already exists
abort: patch "first.patch" already exists
% qnew -f from a subdirectory
popping first.patch
popping mtest.patch
popping uncommitted.patch
patch queue now empty
adding d/b
M d/b
diff --git a/d/b b/d/b
--- a/d/b
+++ b/d/b
@@ -1,1 +1,2 @@
 b
+b
% qnew -u with no username configured
From: blue

% fail when trying to import a merge
adding a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
created new head
merging a
warning: conflicts during merge.
merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
abort: cannot manage merge changesets
%%% hg headers
adding a
% qnew should refuse bad patch names
abort: "series" cannot be used as the name of a patch
abort: "status" cannot be used as the name of a patch
abort: "guards" cannot be used as the name of a patch
abort: ".hgignore" cannot be used as the name of a patch
abort: ".mqfoo" cannot be used as the name of a patch
abort: "foo#bar" cannot be used as the name of a patch
abort: "foo:bar" cannot be used as the name of a patch
% qnew with name containing slash
foo/bar.patch
popping foo/bar.patch
patch queue now empty
% qnew with uncommitted changes
uncommitted.patch
% qnew implies add
A .hgignore
A series
A uncommitted.patch
% qnew missing
abort: missing: No such file or directory
% qnew -m
# HG changeset patch
# Parent 
foo bar

% qnew twice
abort: patch "first.patch" already exists
abort: patch "first.patch" already exists
% qnew -f from a subdirectory
popping first.patch
popping mtest.patch
popping uncommitted.patch
patch queue now empty
adding d/b
M d/b
# HG changeset patch
# Parent 
diff --git a/d/b b/d/b
--- a/d/b
+++ b/d/b
@@ -1,1 +1,2 @@
 b
+b
% qnew -u with no username configured
# HG changeset patch
# Parent 
# User blue
% fail when trying to import a merge
adding a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
created new head
merging a
warning: conflicts during merge.
merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
abort: cannot manage merge changesets