Sun Jun 25 11:33:36 CEST 2006  [EMAIL PROTECTED]
  * Initial support for branches in git target
New patches:

[Initial support for branches in git target
[EMAIL PROTECTED] {
hunk ./README 670
-.. no specific options
+parent-repo : string
+  Relative path to a git directory to use as a parent.  This is useful
+  to import repository branches.  If this parameter is empty, the
+  branch has no parent (default behaviour).
+
+branchpoint : string
+  A reference to the git commit which is the parent for the first
+  revision on the branch to be imported.  It can be a tag name or any
+  syntax acceptable by git (eg. something like "tag~2", if you want to
+  correct the idea of where the branchpoint is).
+
+  Since tailor generates mostly-stable SHA-1 revisions, you can
+  usually also use a SHA-1 as branchpoint.  Just import your trunk
+  first, find the correct SHA-1, and setup and import your branch.
+  This is especially useful since the current cvs source
+  implementation misses many tags.
hunk ./vcpx/repository/git.py 28
+        self.PARENT_REPO = project.config.get(self.name, 'parent-repo', '')
+        self.BRANCHPOINT = project.config.get(self.name, 'branchpoint', 'HEAD')
hunk ./vcpx/repository/git.py 345
-        Execute ``git init-db``.
+        Initialize .git through ``git init-db`` or ``git-clone``.
hunk ./vcpx/repository/git.py 348
+        from os import renames
hunk ./vcpx/repository/git.py 352
-            init = ExternalCommand(cwd=self.basedir,
-                                   command=self.repository.command("init-db"))
-            init.execute()
+            if self.repository.PARENT_REPO == '':
+                cmd = self.repository.command("init-db")
+                init = ExternalCommand(cwd=self.basedir, command=cmd)
+                init.execute()
+                if init.exit_status:
+                    raise TargetInitializationFailure(
+                        "%s returned status %s" % (str(init), init.exit_status))
+            else:
+                cmd = self.repository.command("clone", "--shared", "-n",
+                                              self.repository.PARENT_REPO, 'tmp')
+                clone = ExternalCommand(cwd=self.basedir, command=cmd)
+                clone.execute()
+                if clone.exit_status:
+                    raise TargetInitializationFailure(
+                        "%s returned status %s" % (str(clone), clone.exit_status))
+
+                renames('%s/%s/tmp/.git' % (self.repository.rootdir, self.repository.subdir),
+                        '%s/%s/.git' % (self.repository.rootdir, self.repository.subdir))
+                
+                cmd = self.repository.command("reset", "--soft", self.repository.BRANCHPOINT)
+                reset = ExternalCommand(cwd=self.basedir, command=cmd)
+                reset.execute()
+                if reset.exit_status:
+                    raise TargetInitializationFailure(
+                        "%s returned status %s" % (str(reset), reset.exit_status))
hunk ./vcpx/repository/git.py 378
-            if init.exit_status:
-                raise TargetInitializationFailure(
-                    "%s returned status %s" % (str(init), init.exit_status))
hunk ./vcpx/tailor.py 79
-            dwd.importFirstRevision(self.source, actual, 'INITIAL'==revision)
+            dwd.importFirstRevision(self.source, actual,
+                                    self.target.PARENT_REPO != '' or
+                                    'INITIAL'==revision)
}

Context:

[Untabified
[EMAIL PROTECTED] 
[Whitespace, two blank lines to separate classes
[EMAIL PROTECTED] 
[Split the monolithic repository.py into smaller units
[EMAIL PROTECTED]
 The repository subclass of each backend is now in the same unit that
 implements its working dir, under the vcpx.repository subpackage.
 This has several advantages: the obvious of keeping related code closer
 and the ability of lazy load only the needed unit, as it was already done
 for the working dir subclasses.
] 
[Use a common ancestor to recognize tailor exceptions
[EMAIL PROTECTED] 
[Fix comment
[EMAIL PROTECTED] 
[[git] commit at plumbing level
[EMAIL PROTECTED]
 
 This avoids to call the git-commit shell script, and uses low-level git tools
 to do the same job.
] 
[[git] do not rely on "git-commit -a", use git-update-index
[EMAIL PROTECTED]
 
 This is the first part of getting rid of git-commit.  We explicitely
 update the index for each type of file modification.
] 
[Fix _tryCommand call in _getRev
[EMAIL PROTECTED]
 
 I have not experienced the problem, but it seems clear _tryCommand is not
 correctly called here.
] 
[Add a hook to record updated entries in target repo
[EMAIL PROTECTED] 
[Correctly display "default encoding" warning
[EMAIL PROTECTED] 
[[hg] call add with no arguments on init
Brendan Cully <[EMAIL PROTECTED]>**20060621204559] 
[[hg] canonify repository root directory
Brendan Cully <[EMAIL PROTECTED]>**20060621191453
 
 The dirstate walker uses simple string comparison between repo.root
 and os.getcwd(), which may fail unexpectedly if repo.root is not
 the same as realpath(repo.root)
] 
[[hg] chdir to self.basedir before executing commands
Brendan Cully <[EMAIL PROTECTED]>**20060621184724
 
 Some hg tree walk operations expect to be started from the repository
 root (the command-line tool always does this). Without this patch
 the dirstate walk may occasionally inappropriately mangle paths,
 depending on where tailor is run from.
] 
[[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.
] 
[[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.
] 
[[hg] wrapper for commands.*
Brendan Cully <[EMAIL PROTECTED]>**20060620190739
 
 _hgCommand makes it easier to call commands.* functions, and
 ensures they will always have their options dictionary set
 correctly.
] 
[[hg] always use repository-specific UI when repository is available
Brendan Cully <[EMAIL PROTECTED]>**20060620190521] 
[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:
e1f50fed8c56bafa62173bd56df116704bf60c7a
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to