##// END OF EJS Templates
mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards...
Martin Geisler -
r14464:00256f68 default
parent child Browse files
Show More
@@ -455,13 +455,13 b' class queue(object):'
455 guards = self.active()
455 guards = self.active()
456 exactneg = [g for g in patchguards if g[0] == '-' and g[1:] in guards]
456 exactneg = [g for g in patchguards if g[0] == '-' and g[1:] in guards]
457 if exactneg:
457 if exactneg:
458 return False, exactneg[0]
458 return False, repr(exactneg[0])
459 pos = [g for g in patchguards if g[0] == '+']
459 pos = [g for g in patchguards if g[0] == '+']
460 exactpos = [g for g in pos if g[1:] in guards]
460 exactpos = [g for g in pos if g[1:] in guards]
461 if pos:
461 if pos:
462 if exactpos:
462 if exactpos:
463 return True, exactpos[0]
463 return True, repr(exactpos[0])
464 return False, pos
464 return False, ' '.join(map(repr, pos))
465 return True, ''
465 return True, ''
466
466
467 def explain_pushable(self, idx, all_patches=False):
467 def explain_pushable(self, idx, all_patches=False):
@@ -479,11 +479,11 b' class queue(object):'
479 write(_('allowing %s - no matching negative guards\n') %
479 write(_('allowing %s - no matching negative guards\n') %
480 self.series[idx])
480 self.series[idx])
481 else:
481 else:
482 write(_('allowing %s - guarded by %r\n') %
482 write(_('allowing %s - guarded by %s\n') %
483 (self.series[idx], why))
483 (self.series[idx], why))
484 if not pushable:
484 if not pushable:
485 if why:
485 if why:
486 write(_('skipping %s - guarded by %r\n') %
486 write(_('skipping %s - guarded by %s\n') %
487 (self.series[idx], why))
487 (self.series[idx], why))
488 else:
488 else:
489 write(_('skipping %s - no matching guards\n') %
489 write(_('skipping %s - no matching guards\n') %
@@ -1114,7 +1114,7 b' class queue(object):'
1114 _("cannot push to a previous patch: %s") % patch)
1114 _("cannot push to a previous patch: %s") % patch)
1115 else:
1115 else:
1116 if reason:
1116 if reason:
1117 reason = _('guarded by %r') % reason
1117 reason = _('guarded by %s') % reason
1118 else:
1118 else:
1119 reason = _('no matching guards')
1119 reason = _('no matching guards')
1120 self.ui.warn(_("cannot push '%s' - %s\n") % (patch, reason))
1120 self.ui.warn(_("cannot push '%s' - %s\n") % (patch, reason))
@@ -63,7 +63,7 b' should print +a'
63 should fail
63 should fail
64
64
65 $ hg qpush a.patch
65 $ hg qpush a.patch
66 cannot push 'a.patch' - guarded by ['+a']
66 cannot push 'a.patch' - guarded by '+a'
67 [1]
67 [1]
68
68
69 $ hg qguard a.patch
69 $ hg qguard a.patch
@@ -366,9 +366,9 b' new.patch, b.patch: Guarded. c.patch: Ap'
366 3 G d.patch
366 3 G d.patch
367 $ hg qpush -a
367 $ hg qpush -a
368 applying new.patch
368 applying new.patch
369 skipping b.patch - guarded by ['+2']
369 skipping b.patch - guarded by '+2'
370 applying c.patch
370 applying c.patch
371 skipping d.patch - guarded by ['+2']
371 skipping d.patch - guarded by '+2'
372 now at: c.patch
372 now at: c.patch
373 $ qappunappv
373 $ qappunappv
374 % hg qapplied
374 % hg qapplied
@@ -122,7 +122,7 b' Test qpush to a patch below the currentl'
122 try to push and pop while a is guarded
122 try to push and pop while a is guarded
123
123
124 $ hg qpush a
124 $ hg qpush a
125 cannot push 'a' - guarded by ['+block']
125 cannot push 'a' - guarded by '+block'
126 [1]
126 [1]
127 $ hg qpush -a
127 $ hg qpush -a
128 applying b
128 applying b
@@ -460,7 +460,7 b' qpush --move'
460 $ hg qguard test1b.patch -- -negguard
460 $ hg qguard test1b.patch -- -negguard
461 $ hg qguard test2.patch -- +posguard
461 $ hg qguard test2.patch -- +posguard
462 $ hg qpush --move test2.patch # can't move guarded patch
462 $ hg qpush --move test2.patch # can't move guarded patch
463 cannot push 'test2.patch' - guarded by ['+posguard']
463 cannot push 'test2.patch' - guarded by '+posguard'
464 [1]
464 [1]
465 $ hg qselect posguard
465 $ hg qselect posguard
466 number of unguarded, unapplied patches has changed from 2 to 3
466 number of unguarded, unapplied patches has changed from 2 to 3
General Comments 0
You need to be logged in to leave comments. Login now