##// 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 455 guards = self.active()
456 456 exactneg = [g for g in patchguards if g[0] == '-' and g[1:] in guards]
457 457 if exactneg:
458 return False, exactneg[0]
458 return False, repr(exactneg[0])
459 459 pos = [g for g in patchguards if g[0] == '+']
460 460 exactpos = [g for g in pos if g[1:] in guards]
461 461 if pos:
462 462 if exactpos:
463 return True, exactpos[0]
464 return False, pos
463 return True, repr(exactpos[0])
464 return False, ' '.join(map(repr, pos))
465 465 return True, ''
466 466
467 467 def explain_pushable(self, idx, all_patches=False):
@@ -479,11 +479,11 b' class queue(object):'
479 479 write(_('allowing %s - no matching negative guards\n') %
480 480 self.series[idx])
481 481 else:
482 write(_('allowing %s - guarded by %r\n') %
482 write(_('allowing %s - guarded by %s\n') %
483 483 (self.series[idx], why))
484 484 if not pushable:
485 485 if why:
486 write(_('skipping %s - guarded by %r\n') %
486 write(_('skipping %s - guarded by %s\n') %
487 487 (self.series[idx], why))
488 488 else:
489 489 write(_('skipping %s - no matching guards\n') %
@@ -1114,7 +1114,7 b' class queue(object):'
1114 1114 _("cannot push to a previous patch: %s") % patch)
1115 1115 else:
1116 1116 if reason:
1117 reason = _('guarded by %r') % reason
1117 reason = _('guarded by %s') % reason
1118 1118 else:
1119 1119 reason = _('no matching guards')
1120 1120 self.ui.warn(_("cannot push '%s' - %s\n") % (patch, reason))
@@ -63,7 +63,7 b' should print +a'
63 63 should fail
64 64
65 65 $ hg qpush a.patch
66 cannot push 'a.patch' - guarded by ['+a']
66 cannot push 'a.patch' - guarded by '+a'
67 67 [1]
68 68
69 69 $ hg qguard a.patch
@@ -366,9 +366,9 b' new.patch, b.patch: Guarded. c.patch: Ap'
366 366 3 G d.patch
367 367 $ hg qpush -a
368 368 applying new.patch
369 skipping b.patch - guarded by ['+2']
369 skipping b.patch - guarded by '+2'
370 370 applying c.patch
371 skipping d.patch - guarded by ['+2']
371 skipping d.patch - guarded by '+2'
372 372 now at: c.patch
373 373 $ qappunappv
374 374 % hg qapplied
@@ -122,7 +122,7 b' Test qpush to a patch below the currentl'
122 122 try to push and pop while a is guarded
123 123
124 124 $ hg qpush a
125 cannot push 'a' - guarded by ['+block']
125 cannot push 'a' - guarded by '+block'
126 126 [1]
127 127 $ hg qpush -a
128 128 applying b
@@ -460,7 +460,7 b' qpush --move'
460 460 $ hg qguard test1b.patch -- -negguard
461 461 $ hg qguard test2.patch -- +posguard
462 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 464 [1]
465 465 $ hg qselect posguard
466 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