You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@red-bean.com> on 2008/08/27 18:42:39 UTC

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

blair@tigris.org writes:
> --- branches/file-externals/subversion/libsvn_client/externals.c
> +++ branches/file-externals/subversion/libsvn_client/externals.c
> @@ -105,6 +109,10 @@ compare_external_items(svn_wc_external_i
>   * Pass CANCEL_FUNC, CANCEL_BATON to svn_wc_remove_from_revision_control.
>   *
>   * Use POOL for all temporary allocation.
> + *
> + * This function is not passed a svn_wc_adm_access_t to ensure that
> + * what is being deleted is being opened separately so if there is a
> + * lock on it, it cannot be deleted.
>   */
>  static svn_error_t *
>  relegate_dir_external(const char *path,

I had to read that paragraph a few times.  Maybe something like this
instead?

   "Note: this function is not passed a svn_wc_adm_access_t.  Instead,
    it separately opens the object being deleted, so that if there is a
    lock on that object, the object cannot be deleted."

(Kudos in general on the thoroughness and clarity of your doc
maintenance on this branch, though.)

> --- branches/file-externals/subversion/libsvn_client/update.c	Sun Aug 24 14:13:10 2008	(r32686)
> +++ branches/file-externals/subversion/libsvn_client/update.c	Sun Aug 24 15:02:52 2008	(r32687)
> @@ -254,7 +254,8 @@ svn_client__update_internal(svn_revnum_t
>       handling external items (and any errors therefrom) doesn't delay
>       the primary operation.  */
>    if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
> -    SVN_ERR(svn_client__handle_externals(traversal_info,
> +    SVN_ERR(svn_client__handle_externals(adm_access,
> +					 traversal_info,
>                                           entry->url,
>                                           anchor,
>                                           repos_root,

I think you've got your editor set to use TAB characters, causing the
above new line to look misindented under certain circumstances.  (You
might want to check the rest of the branch for similar problems.)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Blair Zajac <bl...@orcaware.com>.
Karl Fogel wrote:
> blair@tigris.org writes:
>> --- branches/file-externals/subversion/libsvn_client/externals.c
>> +++ branches/file-externals/subversion/libsvn_client/externals.c
>> @@ -105,6 +109,10 @@ compare_external_items(svn_wc_external_i
>>   * Pass CANCEL_FUNC, CANCEL_BATON to svn_wc_remove_from_revision_control.
>>   *
>>   * Use POOL for all temporary allocation.
>> + *
>> + * This function is not passed a svn_wc_adm_access_t to ensure that
>> + * what is being deleted is being opened separately so if there is a
>> + * lock on it, it cannot be deleted.
>>   */
>>  static svn_error_t *
>>  relegate_dir_external(const char *path,
> 
> I had to read that paragraph a few times.  Maybe something like this
> instead?
> 
>    "Note: this function is not passed a svn_wc_adm_access_t.  Instead,
>     it separately opens the object being deleted, so that if there is a
>     lock on that object, the object cannot be deleted."
> 
> (Kudos in general on the thoroughness and clarity of your doc
> maintenance on this branch, though.)
> 

> 
> I think you've got your editor set to use TAB characters, causing the
> above new line to look misindented under certain circumstances.  (You
> might want to check the rest of the branch for similar problems.)

Thanks, fixed in r32775 and r32776.

Regards,
Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Karl Fogel <kf...@red-bean.com>.
Blair Zajac <bl...@orcaware.com> writes:
> I mean, with xemacs I do, I'm still switching over to emacs and
> haven't done my .emacs files.

(setq indent-tabs-mode nil)

...is all you need in your .emacs, then.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Blair Zajac <bl...@orcaware.com>.
Karl Fogel wrote:
> Blair Zajac <bl...@orcaware.com> writes:
>> I always work with no-tabs...
> 
> Huh.  The only problem in this commit was the presence of tabs.  So are
> you sure about that?

I mean, with xemacs I do, I'm still switching over to emacs and haven't done my 
.emacs files.

Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Karl Fogel <kf...@red-bean.com>.
Blair Zajac <bl...@orcaware.com> writes:
> I always work with no-tabs...

Huh.  The only problem in this commit was the presence of tabs.  So are
you sure about that?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Blair Zajac <bl...@orcaware.com>.
Karl Fogel wrote:
> Blair Zajac <bl...@orcaware.com> writes:
>>> However, if there's some reason you need to only load it conditionally
>>> in the way you described, then you could use this:
>> Sweet.  Thanks for the emacs-fu :)
> 
> But this may still trip you up.  Once the file is loaded, it will set
> you to no-tabs style, and that will remain in force for the rest of the
> Emacs session.  If your Emacs sessions last weeks or months (as is not
> uncommon for many Emacs users), then it's effectively no different from
> just loading svn-dev.el when you start up.
> 
> Naturally, more sophisticated solutions are available, but they require
> deeper understanding of the way you typically work :-).

I always work with no-tabs, it's just the GNU style indentation is different. 
Would the indent style be across all buffers then?

Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Karl Fogel <kf...@red-bean.com>.
Blair Zajac <bl...@orcaware.com> writes:
>> However, if there's some reason you need to only load it conditionally
>> in the way you described, then you could use this:
>
> Sweet.  Thanks for the emacs-fu :)

But this may still trip you up.  Once the file is loaded, it will set
you to no-tabs style, and that will remain in force for the rest of the
Emacs session.  If your Emacs sessions last weeks or months (as is not
uncommon for many Emacs users), then it's effectively no different from
just loading svn-dev.el when you start up.

Naturally, more sophisticated solutions are available, but they require
deeper understanding of the way you typically work :-).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Blair Zajac <bl...@orcaware.com>.
Karl Fogel wrote:
> Blair Zajac <bl...@orcaware.com> writes:
>> I use emacs and always need to load the tools/dev/svn-dev.el by hand,
>> which gets old and I forget at times.  Is there a way to get that file
>> loaded if you're in a svn checkout that is from svn.collabl.net, by
>> parsing the .svn/entries?
>>
>> I'm not an emacs expert and also just switched from xemacs to emacs.
> 
> Well, is there ever a time when you wouldn't want to load it?  I mean,
> you could just load it on every Emacs startup, with

I work on different C/C++ projects with different coding conventions, so I 
wouldn't want to load svn-dev.el for those other projects.

> (load-file "/home/blair/CUSTOMIZE_THIS_PATH/subversion/tools/dev/svn-dev.el")
> 
> in your .emacs.
> 
> However, if there's some reason you need to only load it conditionally
> in the way you described, then you could use this:

Sweet.  Thanks for the emacs-fu :)

Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Karl Fogel <kf...@red-bean.com>.
Blair Zajac <bl...@orcaware.com> writes:
> I use emacs and always need to load the tools/dev/svn-dev.el by hand,
> which gets old and I forget at times.  Is there a way to get that file
> loaded if you're in a svn checkout that is from svn.collabl.net, by
> parsing the .svn/entries?
>
> I'm not an emacs expert and also just switched from xemacs to emacs.

Well, is there ever a time when you wouldn't want to load it?  I mean,
you could just load it on every Emacs startup, with

(load-file "/home/blair/CUSTOMIZE_THIS_PATH/subversion/tools/dev/svn-dev.el")

in your .emacs.

However, if there's some reason you need to only load it conditionally
in the way you described, then you could use this:

(defconst svn-dev-el-location
  "/home/blair/CUSTOMIZE_THIS_PATH/subversion/tools/dev/svn-dev.el"
  "*Initialize this to the location of your svn-dev.el file.")

(defun is-svn-source-file (&optional filename)
  "Return non-nil if FILENAME (a path) comes from the Subversion
  project repository at http://svn.collab.net/.  If FILENAME is
  omitted, use the file associated with the current buffer."
  (or filename (setq filename (buffer-file-name)))
  (let ((entries-file (concat (file-name-directory filename)
                              (file-name-as-directory ".svn")
                              "entries"))
        found)
    (save-excursion
      (set-buffer (let (find-file-hook) (find-file-noselect entries-file)))
      (if (search-forward "//svn.collab.net/repos/svn/" nil t)
          (setq found t))
      (kill-buffer nil))
    found))

(defun svn-source-find-file-hook ()
  "A hook for `find-file-hooks' that loads svn-dev.el when the file in
question is in the Subversion source tree.  See `svn-dev-el-location'."
  (if (is-svn-source-file)
      (load-file svn-dev-el-location)))

(add-hook 'find-file-hook 'svn-source-find-file-hook)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r32687 - branches/file-externals/subversion/libsvn_client

Posted by Blair Zajac <bl...@orcaware.com>.
Karl Fogel wrote:
> blair@tigris.org writes:
>> --- branches/file-externals/subversion/libsvn_client/externals.c
>> +++ branches/file-externals/subversion/libsvn_client/externals.c
>> @@ -105,6 +109,10 @@ compare_external_items(svn_wc_external_i
>>   * Pass CANCEL_FUNC, CANCEL_BATON to svn_wc_remove_from_revision_control.
>>   *
>>   * Use POOL for all temporary allocation.
>> + *
>> + * This function is not passed a svn_wc_adm_access_t to ensure that
>> + * what is being deleted is being opened separately so if there is a
>> + * lock on it, it cannot be deleted.
>>   */
>>  static svn_error_t *
>>  relegate_dir_external(const char *path,
> 
> I had to read that paragraph a few times.  Maybe something like this
> instead?
> 
>    "Note: this function is not passed a svn_wc_adm_access_t.  Instead,
>     it separately opens the object being deleted, so that if there is a
>     lock on that object, the object cannot be deleted."
> 
> (Kudos in general on the thoroughness and clarity of your doc
> maintenance on this branch, though.)

I'll fix that comment. Thanks for the kudos, now where to spend them :)

>> --- branches/file-externals/subversion/libsvn_client/update.c	Sun Aug 24 14:13:10 2008	(r32686)
>> +++ branches/file-externals/subversion/libsvn_client/update.c	Sun Aug 24 15:02:52 2008	(r32687)
>> @@ -254,7 +254,8 @@ svn_client__update_internal(svn_revnum_t
>>       handling external items (and any errors therefrom) doesn't delay
>>       the primary operation.  */
>>    if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
>> -    SVN_ERR(svn_client__handle_externals(traversal_info,
>> +    SVN_ERR(svn_client__handle_externals(adm_access,
>> +					 traversal_info,
>>                                           entry->url,
>>                                           anchor,
>>                                           repos_root,
> 
> I think you've got your editor set to use TAB characters, causing the
> above new line to look misindented under certain circumstances.  (You
> might want to check the rest of the branch for similar problems.)

I use emacs and always need to load the tools/dev/svn-dev.el by hand, which gets 
old and I forget at times.  Is there a way to get that file loaded if you're in 
a svn checkout that is from svn.collabl.net, by parsing the .svn/entries?

I'm not an emacs expert and also just switched from xemacs to emacs.

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org