[prev in list] [next in list] [prev in thread] [next in thread]
List: svnmerge
Subject: Re: [Svnmerge] patch: ignore corrupt entries
From: Benjamin Reed <rangerrick () gmail ! com>
Date: 2009-08-06 1:33:30
Message-ID: 57eba2250908051833p6bae6a1t8770c0ed806fb28c () mail ! gmail ! com
[Download RAW message or body]
On Tue, Aug 4, 2009 at 3:39 PM, Dustin J. Mitchell<dustin@zmanda.com> wrote:
> With apologies for taking so long, this looks fine. I only have two requests.
>
> 1. Please name it something like "--ignore-invalid-properties"
>
> 2. Please include the appropriate commit header in your patch -- see
> the Subversion Hacking document
> (http://subversion.tigris.org/hacking.html#log-messages).
Done, and done. I've not submitted anything to subversion before, so
if I missed something, please let me know.
Attached is the updated version.
--
Benjamin Reed a.k.a. Ranger Rick
Fink, KDE, and Mac OS X development
Blog: http://www.raccoonfink.com/
Music: http://music.raccoonfink.com/
["svnmerge-ignore-corrupt-entries.patch" (application/octet-stream)]
* contrib/client-side/svnmerge/svnmerge.py
(PathIdentifier.from_pathid): ignore corrupted or invalid entries
if --ignore-invalid-entries was set
(dict_from_revlist_prop): only set the external form and revs if
pathid is valid
(global_opts): add --ignore-invalid-entries to global options
Patch by: Benjamin Reed <rangerrick@gmail.com>
Index: contrib/client-side/svnmerge/svnmerge.py
===================================================================
--- contrib/client-side/svnmerge/svnmerge.py (revision 38574)
+++ contrib/client-side/svnmerge/svnmerge.py (working copy)
@@ -399,8 +399,11 @@
# we can only cache this by repo-relative path
PathIdentifier.locobjs[pathid_str] = pathid
else:
- error("Invalid path identifier '%s'" % pathid_str)
- return PathIdentifier.locobjs[pathid_str]
+ if not opts["ignore-invalid-entries"]:
+ error("Invalid path identifier '%s'" % pathid_str)
+ if PathIdentifier.locobjs.has_key(pathid_str):
+ return PathIdentifier.locobjs[pathid_str]
+ return None
from_pathid = staticmethod(from_pathid)
def from_target(target):
@@ -838,9 +841,9 @@
pathid = PathIdentifier.from_pathid(pathid_str)
# cache the "external" form we saw
- pathid.external_form = pathid_str
-
- prop[pathid] = revs
+ if pathid:
+ pathid.external_form = pathid_str
+ prop[pathid] = revs
return prop
def get_revlist_prop(url_or_dir, propname, rev=None):
@@ -2027,6 +2030,8 @@
"implies --show-changes"),
Option("-s", "--show-changes",
help="show subversion commands that make changes"),
+ Option("-i", "--ignore-invalid-entries",
+ help="ignore invalid svnmerge indexes"),
Option("-v", "--verbose",
help="verbose mode: output more information about progress"),
OptionArg("-u", "--username",
_______________________________________________
Svnmerge mailing list
Svnmerge@orcaware.com
http://www.orcaware.com/mailman/listinfo/svnmerge
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic