1

I have some code, in which parts are pulled from several other external repositories (e.g., url: http_external_repository). I have made certain changes to these external code.

my question is how I could commit these changes,

1) if I want to commit to the original external repository?

2) if I do not want to disrupt the original external repository, is there something I could do?

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
pepero
  • 7,095
  • 7
  • 41
  • 72

1 Answers1

2
  1. Just commit -> it will commit to the external repository automatically. Externals are just a link

  2. You can just build up a copy of the external repository inside your own one (see documentation "Vendor branches" and commit to your repository instead. You will have the overhead of pulling updates from the external repository manually instead of referencing them.

Alternatively for 2) you could just save your patch files against the original repository into some place and apply them for newer versions of the external repository. This is the way I would handle it if there are expected frequent changes to the external repository.

jdehaan
  • 19,700
  • 6
  • 57
  • 97
  • jdehaan, thank you for your answer. I think I'd better add more background information. So at beginning, my boss asked me to create a new repository on my own server, keeping the use of the same external references. The goal is to avoid interruptions of originals. Now, we have changed certain parts of the external references. If I "just commit", this will definitely disrupt the external references, which I do not want. For your "vendor branches" solution, it seems to break external links and add it as a completely independent copy, as what I did for the rest non-external copies. Am I right? – pepero May 30 '11 at 13:18
  • after reading certain internet posts about "vendor branches", looks like for this specific prone-to-modify 3rd party library, I should use "vendor-branches" rather than "svn:external". Welcome any comments! The point is this 3rd party library is completely untouchable, which I could not commit any changes on it. So "svn:externals" definitely fails here – pepero May 30 '11 at 13:51
  • Yes if it is the case and you need to modify an external [read-only for you] repository then externals is not made for you. Externals are de-facto just "links" and refer to a place in another folder or repository. There are scripts to handle branches that help quite a lot: `svn-load-dirs.pl` for example. We use it to import a newer version of Qt upon the last one and branch from there to make our own modifications. – jdehaan May 30 '11 at 15:37