Ejemplo n.º 1
0
 def invoke(self, args, from_tty):
     h = history
     if len(h.snapshots) == 0:
         print('(no history)')
         return
     prev = h.snapshots[-1]
     curr = Snapshot.current('current')
     d = Diff(prev, curr)
     print('Changes from %s to %s' % (prev.name, curr.name))
     print('  ', d.stats())
     print()
     print('\n'.join(['  ' + line for line in d.as_changes().splitlines()]))
Ejemplo n.º 2
0
 def invoke(self, args, from_tty):
     h = history
     if len(h.snapshots) == 0:
         print('(no history)')
         return
     prev = h.snapshots[-1]
     curr = Snapshot.current('current')
     d = Diff(prev, curr)
     print('Changes from %s to %s' % (prev.name, curr.name))
     print('  ', d.stats())
     print()
     print('\n'.join(['  ' + line for line in d.as_changes().splitlines()]))
Ejemplo n.º 3
0
 def invoke(self, args, from_tty):
     h = history
     if len(h.snapshots) == 0:
         print('(no history)')
         return
     for i in range(len(h.snapshots), 0, -1):
         s = h.snapshots[i-1]
         print('Label %i "%s" at %s' % (i, s.name, s.time))
         print('    ', s.summary())
         if i > 1:
             prev = h.snapshots[i-2]
             d = Diff(prev, s)
             print()
             print('    ', d.stats())
         print()
Ejemplo n.º 4
0
 def invoke(self, args, from_tty):
     h = history
     if len(h.snapshots) == 0:
         print('(no history)')
         return
     for i in range(len(h.snapshots), 0, -1):
         s = h.snapshots[i-1]
         print('Label %i "%s" at %s' % (i, s.name, s.time))
         print('    ', s.summary())
         if i > 1:
             prev = h.snapshots[i-2]
             d = Diff(prev, s)
             print()
             print('    ', d.stats())
         print()