Re: [PATCH 3/4] remote-hg: fix 'shared path' path
Antoine Pelisse writes: > On Sat, Dec 7, 2013 at 2:09 PM, Felipe Contreras > wrote: >> If the repository is moved, the absolute path of the shared repository >> would fail. >> >> Make sure it's always up-to-date. >> >> Reported-by: Michael Davis >> Signed-off-by: Felipe Contreras >> --- >> contrib/remote-helpers/git-remote-hg | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/contrib/remote-helpers/git-remote-hg >> b/contrib/remote-helpers/git-remote-hg >> index aa1d230..718ef95 100755 >> --- a/contrib/remote-helpers/git-remote-hg >> +++ b/contrib/remote-helpers/git-remote-hg >> @@ -416,6 +416,9 @@ def get_repo(url, alias): >> local_path = os.path.join(dirname, 'clone') >> if not os.path.exists(local_path): >> hg.share(myui, shared_path, local_path, update=False) >> +else: >> +# make sure the shared path is always up-to-date >> +util.writefile(os.path.join(local_path, '.hg', 'sharedpath'), >> hg_path) > > Considering this is modifying a "private mercurial file", would it > make sense to include a test like I did in my equivalent patch ? Hmph. I was planning to merge the topic to 'next' today; perhaps the necessary tests can come as a follow-up patch on top of the topic before it graduates to 'master'? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/4] remote-hg: fix 'shared path' path
On Sat, Dec 7, 2013 at 2:09 PM, Felipe Contreras wrote: > If the repository is moved, the absolute path of the shared repository > would fail. > > Make sure it's always up-to-date. > > Reported-by: Michael Davis > Signed-off-by: Felipe Contreras > --- > contrib/remote-helpers/git-remote-hg | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/contrib/remote-helpers/git-remote-hg > b/contrib/remote-helpers/git-remote-hg > index aa1d230..718ef95 100755 > --- a/contrib/remote-helpers/git-remote-hg > +++ b/contrib/remote-helpers/git-remote-hg > @@ -416,6 +416,9 @@ def get_repo(url, alias): > local_path = os.path.join(dirname, 'clone') > if not os.path.exists(local_path): > hg.share(myui, shared_path, local_path, update=False) > +else: > +# make sure the shared path is always up-to-date > +util.writefile(os.path.join(local_path, '.hg', 'sharedpath'), > hg_path) Considering this is modifying a "private mercurial file", would it make sense to include a test like I did in my equivalent patch ? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] remote-hg: fix 'shared path' path
If the repository is moved, the absolute path of the shared repository would fail. Make sure it's always up-to-date. Reported-by: Michael Davis Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index aa1d230..718ef95 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -416,6 +416,9 @@ def get_repo(url, alias): local_path = os.path.join(dirname, 'clone') if not os.path.exists(local_path): hg.share(myui, shared_path, local_path, update=False) +else: +# make sure the shared path is always up-to-date +util.writefile(os.path.join(local_path, '.hg', 'sharedpath'), hg_path) repo = hg.repository(myui, local_path) try: -- 1.8.4.2+fc1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html