Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

visdiff: prefer --change over --rev in rawextdiff 3-way mode

In internal diff mode, --rev is prefered instead, since we can only

Changeset 071ea4834dc4

Parent 9de54536f753

by Sune Foldager

Changes to 3 files · Browse files at 071ea4834dc4 Showing diff from parent 9de54536f753 Diff from another changeset...

 
744
745
746
747
748
 
749
750
751
 
753
754
755
756
757
758
759
760
 
744
745
746
 
747
748
749
750
751
 
753
754
755
 
 
756
757
758
@@ -744,8 +744,8 @@
  if not self.curfile:   return   - opts = {'bundle':self.bfile}   rev = self.currev + opts = {'change':str(rev), 'bundle':self.bfile}   parents = self.repo[rev].parents()   if len(parents) == 2:   if self.diff_other_parent(): @@ -753,8 +753,6 @@
  else:   parent = parents[0].rev()   opts['rev'] = [str(parent), str(rev)] - else: - opts['change'] = str(rev)     self._do_diff([self.curfile], opts)  
 
1494
1495
1496
1497
1498
 
1499
1500
1501
 
1503
1504
1505
1506
1507
1508
1509
1510
 
1494
1495
1496
 
1497
1498
1499
1500
1501
 
1503
1504
1505
 
 
1506
1507
1508
@@ -1494,8 +1494,8 @@
  dlg.hide()     def vdiff_change(self, menuitem, pats=[]): - opts = {'bundle':self.bfile}   rev = self.currevid + opts = {'change':str(rev), 'bundle':self.bfile}   parents = self.repo[rev].parents()   if len(parents) == 2:   if self.changeview.diff_other_parent(): @@ -1503,8 +1503,6 @@
  else:   parent = parents[0].rev()   opts['rev'] = [str(parent), str(rev)] - else: - opts['change'] = str(rev)   self._do_diff(pats, opts)     def vdiff_local(self, menuitem, pats=[]):
 
307
308
309
 
 
 
 
 
 
 
 
 
310
311
312
 
347
348
349
 
 
 
 
 
350
351
352
 
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
 
356
357
358
359
360
361
362
363
364
365
366
@@ -307,6 +307,15 @@
  ui.warn(_('Extdiff command not recognized\n'))   return   pats = hglib.canonpaths(pats) + + # if both --change and --rev is given, remove --rev in 3-way mode, + # and --change in normal mode + if 'change' in opts and 'rev' in opts: + if '$parent2' in ''.join(diffopts): + del opts['rev'] + else: + del opts['change'] +   try:   ret = extdiff.dodiff(ui, repo, diffcmd, diffopts, pats, opts)   except OSError, e: @@ -347,6 +356,11 @@
  os.chdir(oldcwd)   return None   else: + # prefer --rev over --change for internal diff handling since we can + # only diff against a single parent at a time for merge changesets + if 'change' in opts and 'rev' in opts: + del opts['change'] +   pats = hglib.canonpaths(pats)   if opts.get('canonpats'):   pats = list(pats) + opts['canonpats']