Mercurial > hgsubversion
diff push_cmd.py @ 85:05a0c4f6060f
push_cmd: consider only dirs with added/removed files for addition or deletion
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 16:18:24 -0600 |
parents | 6c9b7cf1c5aa |
children | 6ecdbd22eb1d |
line wrap: on
line diff
--- a/push_cmd.py +++ b/push_cmd.py @@ -103,12 +103,16 @@ def _getdirchanges(svn, branchpath, pare return dirs deleted, added = [], [] - if not changedfiles: - return added, deleted changeddirs = {} for f in changedfiles: + if f in parentctx and f in ctx: + # Updated files cannot cause directories to be created + # or removed. + continue for d in finddirs(f): changeddirs[d] = 1 + if not changeddirs: + return added, deleted olddirs = getctxdirs(parentctx, changeddirs) newdirs = getctxdirs(ctx, changeddirs)