Tue Jun 20 13:31:36 PDT 2006  Brendan Cully <[EMAIL PROTECTED]>
  * [hg] Use high level commit command
  
  commands.commit takes care of expanding directories to their component
  files so we don't have to (we weren't doing it correctly either). If
  mercurial ever decides to track directories, this will already be
  correct.

Tue Jun 20 14:08:28 PDT 2006  Brendan Cully <[EMAIL PROTECTED]>
  * [hg] Remove files under subdirectories
  
  removePathnames was just ignoring directories instead of
  removing the files under them. Tailor should walk mercurial's
  dirstate and remove all files under a removed directory.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


New patches:

[[hg] Use high level commit command
Brendan Cully <[EMAIL PROTECTED]>**20060620203136
 
 commands.commit takes care of expanding directories to their component
 files so we don't have to (we weren't doing it correctly either). If
 mercurial ever decides to track directories, this will already be
 correct.
] {
hunk ./vcpx/hg.py 220
- -    def _getCommitEntries(self, changeset):
- -        from changes import ChangesetEntry
- -        from os.path import join, isdir, normpath
- -
- -        entries = SynchronizableTargetWorkingDir._getCommitEntries(self,
- -                                                                  changeset)
- -        # We must explicitly append siblings of renamed directories
- -        for e in [e for e in changeset.entries
- -                  if e.action_kind == ChangesetEntry.RENAMED]:
- -            # Have to walk directories by hand looking for files
- -            if isdir(join(self.basedir, normpath(e.name))):
- -                entries.extend([join(e.old_name, tail)
- -                                for tail in self._walk(e.name)])
- -
- -        return entries
- -
- -    def _commit(self, date, author, patchname, changelog=None, names=None):
+    def _commit(self, date, author, patchname, changelog=None, names=[]):
hunk ./vcpx/hg.py 236
- -        self._hg.commit(names and [encode(n) for n in names] or [],
- -                        logmessage, encode(author),
- -                        "%d 0" % mktime(date.timetuple()))
+        opts = {}
+        opts['message'] = logmessage
+        opts['user'] = encode(author)
+        opts['date'] =  '%d 0' % mktime(date.timetuple())
+        self._hgCommand('commit', *[encode(n) for n in names], **opts)
}

[[hg] Remove files under subdirectories
Brendan Cully <[EMAIL PROTECTED]>**20060620210828
 
 removePathnames was just ignoring directories instead of
 removing the files under them. Tailor should walk mercurial's
 dirstate and remove all files under a removed directory.
] {
hunk ./vcpx/hg.py 278
- -        from os.path import join, isdir, normpath
+        from os.path import join
+
+        repo = self._getRepo()
hunk ./vcpx/hg.py 282
- -        notdirs = [n for n in names
- -                   if not isdir(join(self.basedir, normpath(n)))]
- -        if notdirs:
- -            self.log.info('Removing %s...', ', '.join(notdirs))
- -            self._hg.remove(notdirs)
+        self.log.info('Removing %s...', ', '.join(names))
+        for name in names:
+            files = self._walk(name)
+            # We can't use isdir because the source has already
+            # removed the entry, so we do a dirstate lookup.
+            if files:
+                for f in self._walk(name):
+                    repo.remove([join(name, f)])
+            else:
+                repo.remove([name])
hunk ./vcpx/hg.py 374
+            # If subdir is a plain file, just return
+            if path == subdir:
+                return None
}

Context:

[Possible fix for #56: detect branch name at bootstrap
[EMAIL PROTECTED] 
[Use normalized path for comparing with paths from bzrlib
[EMAIL PROTECTED]
 This is the patch attached to ticket #59, thank you luks.
] 
[M-x whitespace-cleanup
[EMAIL PROTECTED] 
[Remove useless imports noticed by pyflakes
[EMAIL PROTECTED] 
[Catch ConfigParser exceptions
[EMAIL PROTECTED] 
[Use the new SF.NET nomenclature to reach the CVS repositories
[EMAIL PROTECTED] 
[Make changeset-threshold a cvs parameter
Yann Dirson <[EMAIL PROTECTED]>**20060606072820] 
[Compare the revision with branch only when following a branch
[EMAIL PROTECTED] 
[Revisited generation of commit entries
[EMAIL PROTECTED]
 Consider added names first, and add the old name in the abstract method.
 This should fix #39 where parent dirs are committed after child, either
 in very large svn commit or coming from CVS.
] 
[Add fake events at the end of the loop
[EMAIL PROTECTED] 
[TAG Version 0.9.23
[EMAIL PROTECTED] 
Patch bundle hash:
38511bdfd9a8c1c22d7c50a9b3b4613f7b6b9dec
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEmGRiIigsijWFMDIRAo+RAJ9x/IB20v5oyIPg9SRBn85aAPkb5QCfXv7L
p4dCtUKnavwQHPsRlAwRbhc=
=PXH2
-----END PGP SIGNATURE-----
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to