[issue2696] combining -r<rev> and #<rev> is problematic

Dirkjan Ochtman bugs at mercurial.selenic.com
Sun Mar 13 07:43:26 CDT 2011


New submission from Dirkjan Ochtman <dirkjan at ochtman.nl>:

Here's a test showing an MQ failure where this came up:

+Pushing non-managed changesets while having patches applied
+
+  $ cd ..
+  $ hg init blah
+  $ cd blah
+  $ echo a > a
+  $ hg ci -Ama
+  adding a
+  $ echo b > a
+  $ hg ci -mb
+  $ echo c > a
+  $ hg qnew c
+  $ hg clone -r0 . ../blah2
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  updating to branch default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg log
+  $ hg push -r1 ../blah2#default
+  pushing to ../blah2
+  abort: source has mq patches applied
+  [255]

This is because mq.checkpush() gets passed both 1 and default (where default
gets resolved to the node of the applied patch) as the revs. Benoit thinks
we should let -r override #, but there seems potential of violating the
principle of least surprise. It seems better to me to fail to alert the user
to possible ambiguity, but I'm not sure what we do in other places.

----------
messages: 15609
nosy: djc, timeless
priority: bug
status: unread
title: combining -r<rev> and #<rev> is problematic

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2696>
____________________________________________________


More information about the Mercurial-devel mailing list