Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Mercurial commands - do I understand them right?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Servant of the Lord   Crossbones+   -  Reputation: 20304

Like
0Likes
Like

Posted 17 February 2013 - 12:55 AM

I'm new to source-control systems in general, and I decided to go with Mercurial. Everything is already set up and working fine.

I have all my source code, and my data files, in the repository.

 

I use hg locally, so I'm not connecting to any server; I just have:

../path/to/my/project/

../path/to/my/project/.hg/

 

Would "../path/to/my/project/" be called the 'working directory'?

And "../path/to/my/project/.hg/" would be the "local repository"? (And in my case, the local repository is the only repository?)

 

I'm writing myself a cheat-sheet to print out and have next to my monitor, and I want to make sure I understand the commands and terminology and everything. Help me get my terminology and (more importantly) my mindset correct, please!

 

 

Some of the definitions I copy+pasted from other sites, so it doesn't necessarily mean I understand them - I might just think I do!
But most of them I used my own words to describe them, so if the wording is wrong, please correct my thinking.
 
So if you wouldn't mind, could you look over my descriptions of each command to make sure I'm not making a mistake?
 
mercurialcommands.png
 
I understand most of these commands also have additional options, but I don't want to be too overwhelmed with information all at once (I don't want to get feature-shocked), and will pick up new features overtime piece by piece - unless you notice I'm missing some super-important command, in-which-case please mention it!
 
Also, I couldn't get the hg diff command working.
Suppose I want to check the difference between revision 3's ./project/file.txt and revision 4's version - what's the right command?
" hg diff <filepath> -r 3:4 " isn't outputting anything, but I made a change to the file and commited.
" hg diff <filepath> -r3 -r4 " also didn't output anything.
 
I can't get " hg history <filepath> " to work either (it isn't outputting anything).
 
But a simple " hg diff <filepath> " works (after doing another change so that the local directory and the repository are different).
 
Is the tag 'tip' a special-case tag in Mercurial that refers to the most recent commited revision?
What is the tag 'head'?

 

Also, I'm thinking of using this scheme for my branches:

mercurialbranches.png

Would you recommend changing anything about that? Remember, I'm completely new to source revision control.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


Sponsor:

#2 LorenzoGatti   Crossbones+   -  Reputation: 2735

Like
0Likes
Like

Posted 18 February 2013 - 04:39 AM

The "Development" and "Stable" branches seem redundant: both represent the current state, merged from various feature branches where most development takes place, of somewhat complete new developments (as opposed to the  current state of what you are ready to release, the "Release" branch).

Both are equally suitable to serve as the starting point of new feature branches and as the proper source of consolidated new stuff you merge into "Release" branch.

If one "Development" branch isn't enough, probably you need more transient branches: "Feature X+Y" for merging with substantial rework, alternate development branches that differ by variations of a certain feature (for example, to evaluate comparatively the performance of different algorithms or the quality of competing external libraries), possibly throwaway experimental branches that aren't particularly associated with a feature.


Produci, consuma, crepa

#3 Servant of the Lord   Crossbones+   -  Reputation: 20304

Like
0Likes
Like

Posted 18 February 2013 - 02:52 PM

Thanks.

 

So:

Release

Development

<assorted feature or refactor branches>

 

And I guess I tag major versions of the Development.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#4 Sporniket   Members   -  Reputation: 344

Like
1Likes
Like

Posted 21 February 2013 - 10:31 AM

I think looking at hginit.com would help you too.


Space Zig-Zag, a casual game of skill for Android by Sporniket-Studio.com


#5 Servant of the Lord   Crossbones+   -  Reputation: 20304

Like
0Likes
Like

Posted 21 February 2013 - 11:18 AM

That's the tutorial I read, along with some additional googling for specific commands.
Thanks for the recommendation though! It seemed like a great tutorial, but I can't judge its quality being new to the subject
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS