# HG changeset patch # User jrice@netbeans.org # Date 1210933994 -3600 # Node ID a451a96f29675c857bc01b1b34a0dc3192e8c3f7 # Parent d21121414aaae8fa5d3fb5d5994f43382f652499 #132743: Added and removed files appearing with modified listing in Show History diff -r d21121414aaa -r a451a96f2967 mercurial/src/org/netbeans/modules/mercurial/ui/log/HgLogMessage.java --- a/mercurial/src/org/netbeans/modules/mercurial/ui/log/HgLogMessage.java Wed May 14 17:11:20 2008 +0100 +++ b/mercurial/src/org/netbeans/modules/mercurial/ui/log/HgLogMessage.java Fri May 16 11:33:14 2008 +0100 @@ -87,36 +87,41 @@ public class HgLogMessage { this.apaths = new ArrayList(); this.dpaths = new ArrayList(); this.cpaths = new ArrayList(); - - if( fa != null && !fa.equals("")){ + List apathsStrings = new ArrayList(); + List dpathsStrings = new ArrayList(); + List cpathsStrings = new ArrayList(); + if (fa != null && !fa.equals("")) { splits = fa.split(" "); - for(String s: splits){ - this.apaths.add(new HgLogMessageChangedPath(s, HgAddStatus)); - logCopied(s); - } - } - if( fm != null && !fm.equals("")){ - splits = fm.split(" "); - for(String s: splits){ - //#132984: range of issues with upgrade to Hg 1.0, incorrectly reporting files as added and modified in same changeset - if(!this.apaths.contains(s)){ - this.mpaths.add(new HgLogMessageChangedPath(s, HgModStatus)); - logCopied(s); - } - } - } - if( fd != null && !fd.equals("")){ - splits = fd.split(" "); - for(String s: splits){ - this.dpaths.add(new HgLogMessageChangedPath(s, HgDelStatus)); + for (String s : splits) { + this.apaths.add(new HgLogMessageChangedPath(s, HgAddStatus)); + apathsStrings.add(s); logCopied(s); } } - if( fc != null && !fc.equals("")){ + if (fd != null && !fd.equals("")) { + splits = fd.split(" "); + for (String s : splits) { + this.dpaths.add(new HgLogMessageChangedPath(s, HgDelStatus)); + dpathsStrings.add(s); + logCopied(s); + } + } + if (fc != null && !fc.equals("")) { splits = fc.split(" "); - for(String s: splits){ - this.cpaths.add(new HgLogMessageChangedPath(s, HgCopyStatus)); + for (String s : splits) { + this.cpaths.add(new HgLogMessageChangedPath(s, HgCopyStatus)); + cpathsStrings.add(s); logCopied(s); + } + } + if (fm != null && !fm.equals("")) { + splits = fm.split(" "); + for (String s : splits) { + //#132743, incorrectly reporting files as added/modified, deleted/modified in same changeset + if (!apathsStrings.contains(s) && !dpathsStrings.contains(s) && !cpathsStrings.contains(s)) { + this.mpaths.add(new HgLogMessageChangedPath(s, HgModStatus)); + logCopied(s); + } } } }