rupert.thurner | 10 Feb 12:27
Picon
Gravatar

largefiles, hg addremove does not want to remove ...

i tried to remove a small xml file out of the repository on windows,
and addremove does not do it. could this be a bug?

$ del conf\test.xml

$ hg st
! conf\test.xml

$ hg addremove conf\test.xml
abort: minimum size for largefiles must be specified

in the userhome mercurial.ini, and in .hg/hgrc, there is:
[largefiles]
minsize = 1

btw, hg rm removes the file without error.

rupert.
Christopher Petrilli | 10 Feb 04:10
Gravatar

Changes in 2.1 for status code for pull requests

(BTW, if this should be on the developer mailing list, let me know)

When I updated from Mercurial 2.0.2 to 2.1, I ran into a problem with
Python's pip tool for installing packages, and tracked it down to a
change in how Mercurial reports exit values in changeset
16039:093b75c7b44b: "pull: return 1 when no changes found".  I wonder
about the reasoning for this as it seems to have conflated two
different situations with an identical exit codes:

1. no changes found or
2. update had unresolved files

These two things seem quite different to me. The first implies a clean
repository (even if there's no changes), where-as the second implies a
problem. This appears conflicts with standard UNIX exit codes, which
have historically used 0 to mean "OK" and other values for errors or
conditions that need to be responded to. In this situation, however,
"no changes" don't require any kind of response. As a point of
reference, git returns 0 for "no changes".

Looking at the response codes for various Mercurial commands:

COMMAND     RETURN 0                    RETURN 1
---------------------------------------------------------------------------
add         Success                     ?
branch      Success                     ?
clone       Success                     ?
commit      Success                     Nothing changed [1]
copy        Success                     Error
grep        Match (success?)            Nothing found
(Continue reading)

Ike Casteleyn | 9 Feb 22:40
Picon
Gravatar

let mercurial think merge has happened between branches

Hi,

I converted a subversion project into a mercurial repository (via convert extension)

Below is a sample of what the repo looks like. My questions will be for branch1 and branch2

trunk         a - b - c - f - ...
                            \
branches/branch1   d - e - h - M1 - j - k - M2
                                    \       /             /
branches/branch2            g - i - l - m - n - p

What I tried to show above.
In subversion:
branch1 has been made from the trunk
branch2 has been made from branch1.
In mercurial:
the same thing. the convert extension has recognized this.

In subversion:
branch2 has been merged several times to branch1
In mercurial:
the commits M1 and M2 are there, however it's doesn't seem to know that this is a merge from branch2.

Is there an easy way to let mercurial think that this merge has indeed happened?

Thanks,
Ike

RE: Subdirectory clone

Ops, I've made some mistakes in the recipe. Here is the corrected one:

>   cd /repos
>   echo exclude subdir1 > filemap
>   echo exclude subdir2 >> filemap
>   hg convert --filemap filemap orig new
>   echo include subdir2 > filemap
>   echo rename subdir2 . >> filemap
>   hg convert --filemap filemap orig new/subdir2
>   echo include subdir1 > filemap
    echo exclude subdir1/subdir12 >> filemap
>   echo rename subdir1 . >> filemap
>   hg convert --filemap filemap orig new/subdir1
>   echo include subdir1/subdir12 > filemap
>   echo rename subdir1/subdir12 . >> filemap
>   hg convert --filemap filemap orig new/subdir1/subdir12
>   rm filemap
>   cd new/subdir1/subdir12
>   hg up
>   cd ..
>   hg up
>   echo subdir12 = subdir12 > .hgsub
>   hg add .hgsub
>   cd ..
    hg up -R subdir2
>   hg up
>   echo subdir1 = subdir1 > .hgsub
>   echo subdir2 = subdir2 > .hgsub
>   hg add .hgsub
>   hg commit -Sm "converted to subrepos"
>   cd ..
>   mv orig old
>   mv new orig

..so as you can see it is far from being automated...

regards,
Fritz

Development Software Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien

Firmenbuch Wien
FN 38435y
UID: ATU14650108

Tel: +43(1)91075-198
Fax: +43(1)91075-282
www.festo.at

Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Jede Form der Kenntnisnahme,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieses E-Mails durch unberechtigte
Dritte ist unzulaessig. Wir
bitten Sie, sich mit dem Absender des E-Mails in Verbindung zu setzen, falls Sie nicht der Adressat dieses
E-Mails sind und das
Material von Ihrem Computer zu loeschen. 

This e-mail and any attachments are confidential and intended solely for the addressee. The perusal,
publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not
the intended recipient of this
e-mail, please delete it and immediately notify the sender.

Sivaraj | 9 Feb 07:32
Favicon
Gravatar

Subdirectory clone

Hello,

I want to clone subdirectories of a Mercurial repository. I am new to Mercurial, and I explored the help page about subrepos, but could not get enough details that I wanted. We have recently converted a CVS repo into Mercurial repo and we need to clone subdirectories of the repository like we checkout them as individual modules using CVS earlier.

The structure of the Mercurial repo is as below:

main
    |
    |- .hg
    |- subdir1
    |    |- subdir11
    |    |- subdir12
    |    |    |- subdir121
    |    |    |- subdir122
    |    |    |- ...
    |    |- ....
    |- subdir2
    |    |- subdir21
    |    |- subdir22
    |    |- ....
    |- subdir3
    |- ......

I have to be able to clone subdir1 or subdir11 or subdir2 or subdir21 or subdir122, etc, individually.

I think I need to convert the above repo as below to achieve this:
main
    |
    |- .hg
    |- subdir1
    |    |- .hg
    |    |- subdir11
    |    |- subdir12
    |    |    |- .hg
    |    |    |- subdir121
    |    |    |- subdir122
    |    |    |- .hgsub
    |    |- .hgsub
    |- subdir2
    |    |- .hg
    |    |- subdir21
    |    |- subdir22
    |    |- .hgsub
    |- subdir3
    |- .hgsub

But I could not find ways to convert the existing subdirectories in a repo to subrepo in-place in the repo itself.

Can any one help me how to achieve this in mercurial?

Thanks,
Sivaraj

Gerald Monaco | 8 Feb 19:28
Favicon
Gravatar

Largefiles and Patches

We're interested in using Mercurial in conjunction with the largefiles 
extension for our projects. There appears to be a lack of decent code 
review tools so we are considering just passing patch archives around 
for review. Then one user (not necessarily the creator of the code) will 
apply the patch to the main repository. Very similar to Pull Requests on 
BitBucket and GitHub.

This workflow does not readily work with largefiles, because patches 
only appear to contain the SHA-1 hash, but the changes are never being 
pushed to a remote repository.

Any suggestions?

erickulcyk | 8 Feb 06:09
Picon
Gravatar

Is there any chance of recovery?

Hello,

So I screwed up, and I wondered if there's a method I haven't thought of to
get my data.  I am using Mercurial Distributed SCM (version 2.1) on Ubuntu,
and I use mercurial eclipse.  I pulled from a remote repository, and I asked
whether I wanted to merge of rebase.  I think it was trying to merge with a
changeset I backed out of long ago, but I'm not sure.  Anyway, I said merge
and it said that I had uncommitted changes that needed to be dropped to be
merged.  I had this happen the previous time I tried to pull, and what I
found is that if I said cancel and tried to commit, mercurial would not let
me because I had to merge first.....  So this time, just in case I copied
the entire hg directory to a different backup directory before I said yes to
erasing changes.  I figured, worst case I could copy the changes back from
the backup.  So when It erased my changes, I tried to undo it (using control
z) and that worked for some files but not all.  And when I went to restore
from the backup, I found the backup was changed as well.  I think it already
had erased my changes before it gave me the prompt :((.  Does mercurial keep
a record of this, and is there any recovery?  Also, what is the proper
solution to the commit, merge paradox in mercurial eclipse?

Thanks for any help,

Eric

--
View this message in context: http://mercurial.808500.n3.nabble.com/Is-there-any-chance-of-recovery-tp3724912p3724912.html
Sent from the General mailing list archive at Nabble.com.
MANI | 8 Feb 13:26
Picon
Gravatar

Mercurial


 
I found no errors after installation of mercurial 10.6 for mac, but afterwards I downloaded a software called SourceTree and tried to clone using this software, 
which shows that it is completed with error. After that whatever command concerning hg I type in the terminal will return hg: parse 
error at /Users/mani/.hgrc:1: hg clone [OPTION]... SOURCE [DEST]. So I was trying to uninstall mercurial first by deleting the folders under pyhton, but after that and reinstallation, the error still appears. So what should I do?
Best regards,

Eunice


> Date: Wed, 8 Feb 2012 14:34:26 +0800
> From: buehl <at> hku.hk
> To: mani_hku <at> hotmail.com
> Subject: Re: Mercurial
>
> Dear Eunice,
>
> Let's meet tomorrow (Thu) at 10am at my office. Please bring your Mac (I
> assume it's a laptop) so that we can work on your problem.
>
> By the way, what happens if you type 'hg' only? And what happens if you
> type 'man hg'?
>
> Also, when you installed hg, did you get any errors during the
> installation? I'm asking to find out whether hg is correctly installed.
>
> Best,
> Dr. Buehlmaier
>
>
> On 02/08/2012 01:44 PM, MANI wrote:
> > Dear Dr. Buehlmaier,
> >
> > I am sorry but I still do not know how to quit from the errors, since I
> > cannot proceed with the error appearing whatever I type.
> > I discussed with Shen and Tian about my problem but they all don't know
> > how to solve it.
> >
> > So may I talk to you face to face today or tomorrow?
> >
> > Best regards,
> >
> > Eunice
> >
> >
> >
> >> Date: Wed, 8 Feb 2012 10:04:58 +0800
> >> From: buehl <at> hku.hk
> >> To: congs.ruc <at> gmail.com; celin100 <at> hku.hk; mani_hku <at> hotmail.com
> >> Subject: Mercurial
> >>
> >> Dear RAs,
> >>
> >> In case you need more details on Mercurial, the following links contain
> >> useful information:
> >>
> >> http://mercurial.selenic.com/learn/
> >>
> >> In the meantime, I have added a skeleton README.md file to the two
> >> repositories on bitbucket. You! can get started by pulling the contents
> >> of those repos.
> >>
> >> After you have created a separate folder, you can change into that
> >> folder and type in the command line (this might be different if you use
> >> TortoiseHG, maybe you can do this graphically there)
> >>
> >> hg clone https://<username> <at> bitbucket.org/buehlmai/merger-arbitrage
> >> hg clone https://<username> <at> bitbucket.org/buehlmai/financial-constraints
> >>
> >> You have to change <username> to something like eunice, pearlsc, or
> >> treesmile (i.e. your own username).
> >>
> >> Best,
> >> Dr. Buehlmaier
Neal Becker | 7 Feb 17:29
Picon

clean all unregistered files?

update -C does not touch unregistered files.  The only way I know to get a 
really clean working dir is to make a new clone.  Is there another way?  Seems 
like it would be some option for update.

Giannini, Matthew | 7 Feb 17:12

largefiles "hg add" not using settings in .hg/hgrc?

I enabled the largefiles globally in my mercurial.ini and cloned a repo that has largefiles enabled. 

 

Then I removed the largefiles extension from my global configuration

 

Then I attempted to enable largefiles for that single repository by putting the following in its .hg/hgrc file:

 

[extensions]

largefiles =

 

[largefiles]

minsize = 2

patterns = **.dll **.jar **.exe

 

When I do “hg help extensions” in that repo, it shows that largefiles is enabled.

When I do hg add it ignores the [largefiles] configuration in the .hg/hgrc and adds all files as normal files. In fact, it looks like the add is not aware that largefiles is enabled at all because there are some files that are greater than the default 10MB limit and they are also not getting added as largefiles.

 

This seems like a bug. Is anyone else able to reproduce this behavior?

 

Regards,

Matthew

 

anatoly techtonik | 7 Feb 15:59
Picon
Gravatar

`hg st -v` to show if copy is not on tip

I am frustrated. I was haunting a bug that was just fixed in remote repo. I made `hg pull`, but forgot -u to update. My working copy is not at the tip, but Mercurial `status` command didn't tell me about it, so I've wasted some time. Even `hg st -v` was silent, and `hg log -v -l 3` didn't give a hint too. Too late I realized that `tip` and current working copy revision is not the same thing. However. the only way to notice that was to execute `hg glog` and search for <at> symbol position:


$ hg glog -l 3 --style compact
o  47[tip]   c90e54d882b1   2012-02-03 20:09 +0300   techtonik
|    Show key pressed on final confirmation
|
<at>  46   47438f74a3b8   2012-02-03 17:37 +0300   techtonik
|    Polish UX with pager - make it snappy
|
o  45   5ac9f06d240b   2012-02-03 17:12 +0300   techtonik
|    Add logo
|

But `glog` is an extension command. What is the proper way to check if working copy is not on tip? (the terminology sounds bad here, but anyway) I feel like `hg st -v` should display this info, because as a user I'd expect to see the status of my working copy if it is different from `default`. And by `default` I mean that there are no heads and my clone is at the latest tip revision.
--
anatoly t.

Gmane