[PATCH] status: support revsets with --change
Patrick Mezard
pmezard at gmail.com
Thu Nov 24 04:41:38 CST 2011
# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1322131096 -3600
# Node ID 4820fe137e7349cff8d8e5a67d9c6f79e1169b9b
# Parent 3e13ade423f08031045c2d5a2ef2a87a863a2614
status: support revsets with --change
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5174,7 +5174,7 @@
msg = _('cannot specify --rev and --change at the same time')
raise util.Abort(msg)
elif change:
- node2 = repo.lookup(change)
+ node2 = scmutil.revsingle(repo, change, None).node()
node1 = repo[node2].p1().node()
else:
node1, node2 = scmutil.revpair(repo, revs)
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -263,9 +263,9 @@
modified
R removed
-hg status -A --change 1:
+hg status -A --change 1 and revset:
- $ hg status -A --change 1
+ $ hg status -A --change '1|1'
M modified
A added
A copied
More information about the Mercurial-devel
mailing list