Hey Mike,

> So for both the open and closed trees, repo.root != ws, and we'll enter
> the subrepo logic.
> 
> For the open tree, prefix will end up '//', and subrepo will end up
> '/home/kupfer/ws/6570962/' (ws.replace(prefix, ...) is a no-op).
> subtree will be '/home/kupfer/ws/6570962/usr/src'.
> 
> For the closed tree, prefix will also end up '//', subrepo will end up
> '/home/kupfer/ws/6570962/usr/closed/', and subtree will end up
> '/home/kupfer/ws/6570962/usr/closed/'.
> 
> Please check my logic: am I misunderstanding what will happen in
> walk_scm_hg?  It seems awfully convoluted.
[reordering & snip]
 > More generally, what situation is the subrepo logic supposed to be
 > handling?

I think that was some vestigial code, which I believe is no longer 
needed.  I've exorcised it now.

> Also, this code seems to
> imply that the paths in "files" are relative to the workspace root:
> 
> files = repo.changectx(None).manifest().keys()
> if subtree:
>       files = filter(lambda x: x.startswith(subtree), files)
> 
> But subtree has turned into an absolute path.  How can this work?

It wouldn't; ripping out the subrepo logic, I believe this works now 
since subtree remains a relative path.

> Everything else looks okay.

In fact no, I found a bug that would cause it to fail on SCCS Teamware 
repos pointing at usr/closed (due to my nightly changes) since it looked 
for usr/closed/SCCS which doesn't exist.  I've modified this 
findunref.py to check 'workspace name' (to be consistent with the rest 
of our tools) to determine whether we're in an SCCS/Teamware repository 
or not.  If anyone has better suggestions, I'm open to hearing them.

I've spun a new webrev here:
http://cr.opensolaris.org/~stevel/159_findunref.new/

The only changes are in findunref.py and are constrained to walk_scm_hg 
and walk_scm_sccs.  Here is a diff of just my changes to findunref.py:
http://cr.opensolaris.org/~stevel/159_findunref.new/findunref.diff

cheers,
steve

cheers,
steve
-- 
stephen lau // stevel at sun.com | 650.786.0845 | http://whacked.net
opensolaris // solaris kernel development

Reply via email to