Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable visdiff: do not reuse snapshots for different diff pairs, fix #131

Changeset ba7f458edcb3

Parent 1a2472db6728

by patrice.lacouture@gmail.com

Changes to one file · Browse files at ba7f458edcb3 Showing diff from parent 1a2472db6728 Diff from another changeset...

 
34
35
36
 
 
 
 
37
38
39
40
41
 
 
 
 
42
43
44
 
82
83
84
85
 
86
87
88
 
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
90
91
92
 
93
94
95
96
@@ -34,11 +34,19 @@
   _nonexistant = _('[non-existant]')   +# This global counter is incremented for each visual diff done in a session +# It ensures that the names for snapshots created do not collide. +_diffCount = 0 +  def snapshotset(repo, ctxs, sa, sb, copies, copyworkingdir = False):   '''snapshot files from parent-child set of revisions'''   ctx1a, ctx1b, ctx2 = ctxs   mod_a, add_a, rem_a = sa   mod_b, add_b, rem_b = sb + + global _diffCount + _diffCount += 1 +   if copies:   sources = set(copies.values())   else: @@ -82,7 +90,7 @@
  '''snapshot files as of some revision'''   dirname = os.path.basename(repo.root) or 'root'   if ctx.rev() is not None: - dirname = '%s.%s' % (dirname, str(ctx)) + dirname = '%s.%d.%d' % (dirname, _diffCount, ctx.rev())   base = os.path.join(qtlib.gettempdir(), dirname)   fns_and_mtime = []   if not os.path.exists(base):