repoman: tweak myupdates/myheaders commit logic v2.2.0_alpha63
authorZac Medico <zmedico@gentoo.org>
Fri, 7 Oct 2011 16:06:49 +0000 (09:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 7 Oct 2011 16:06:49 +0000 (09:06 -0700)
If we unconditionally exclude myremoved from myupdates, then removed
files will also be excluded from myheaders. This allows us to avoid
unnecessary separate manifest commits in cases when "myheaders" only
contained files that were being removed. Since our code always uses
myupdates + myremoved, this change in logic doesn't break anything.

bin/repoman

index ec227ed41c253485dcdae001bba3efda8f601286..5d2a84c5f128c89af7e8e740c8decbd0b865a4f1 100755 (executable)
@@ -2323,8 +2323,7 @@ else:
                        mymanifests.add(f)
                else:
                        myupdates.add(f)
-       if vcs in ('git', 'hg'):
-               myupdates.difference_update(myremoved)
+       myupdates.difference_update(myremoved)
        myupdates = list(myupdates)
        mymanifests = list(mymanifests)
        myheaders = []