--- Branko Čibej <brane@xbc.nu> wrote:
> >2. Does the post-commit hook occur inside or
> outside
> >the original transaction? If it occurs inside,
> will
> >it deadlock if I try to perform another commit
> >(assuming I take care of infinite loop scenarios)
> >inside the post-commit script?
> >
> The hook itself is run synchronously. Because of
> that, the hooks I use
> all fork off the real work to another process and
> return immediately,
> because the client is blocked during hook execution,
> which could lead to
> timeouts.
I think I see. If I want it to be inside the
transaction, it already is, but do you know if it can
deadlock itself? If I don't want it outside the
transaction, I can fork off another process. Is that
right?
> >3. Is there a way to differentiate between a branch
> >and a tag (so that the post-commit hook can treat
> them
> >differently)? Will there be one in the future?
> >
> >
> Now, you know that's a stupid question, don't you?
> :-) How can
> Subversion tell the difference between tags and
> branches, when it
> doesn't even enforce a repository layout?
I think differentiating between branches and tags is
aside from enforcing a repository layout since, in
essence, branches and tags can be thought of as
different types of repository elements.
If, for example, as someone had suggested earlier, a
"svn ln" command were created that can create hard
links, then tags could be created using "svn ln" while
branches could be created using "svn cp". Not only
would the hard link be implicitly read only, but one
would also be able to tell the difference between
branches and tags.
> What are you trying to do, anyway?
I'm trying to create a ClearCase-like repo structure
like the following:
/project
/main
/HEAD
/0
/1
/LABEL -> ./1
/branch
/HEAD
/0
where both everything is a directory except
/project/main/branch/HEAD which is a branch, and 0, 1,
and LABEL are all tags. Now that I'm answering your
question, I just realized that I was thinking that
both main and branch were branches. I'll have to
reassess my thoughts.
Essentially, when main and branch are created, I'd
like the post-commit hook to create the HEAD directory
and branch, respectively, and the 0 "branch" revision
tag. Upon checkin to HEAD, successive "branch"
revision tags should be created. Nothing need be done
upon creation of LABEL. The problem is that both
LABEL and branch look alike to Subversion but they
should be treated differently by the post-commit hook.
Maybe for now I'll just use naming conventions?
Thanks,
Noel
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 15 00:50:13 2002