Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
|
noelallen1
2012/09/19 19:47:25
same
| |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """ This module is a utility for applying an xml patch to an xml file. | 6 """ This module is a utility for applying an xml patch to an xml file. |
| 7 | 7 |
| 8 The format of the patch is described in the documentation for | 8 The format of the patch is described in the documentation for |
| 9 the patch_xml() function. | 9 the patch_xml() function. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 import collections | 12 import collections |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 # Because the tag can be a sub-element of arbitrary elements it could inherit | 165 # Because the tag can be a sub-element of arbitrary elements it could inherit |
| 166 # any default namespace. | 166 # any default namespace. |
| 167 return tag.endswith('PatchAdd') | 167 return tag.endswith('PatchAdd') |
| 168 | 168 |
| 169 | 169 |
| 170 def IsPatchRemoveTag(tag): | 170 def IsPatchRemoveTag(tag): |
| 171 # We look at the end of the tag because we need to ignore the namespace. | 171 # We look at the end of the tag because we need to ignore the namespace. |
| 172 # Because the tag can be a sub-element of arbitrary elements it could inherit | 172 # Because the tag can be a sub-element of arbitrary elements it could inherit |
| 173 # any default namespace. | 173 # any default namespace. |
| 174 return tag.endswith('PatchRemove') | 174 return tag.endswith('PatchRemove') |
| OLD | NEW |