2009-11-02 16 views
8

से टैग की एक अनवरोधित प्रति निर्यात करना मैं एसवीएन के साथ काफी सहज हूं, लेकिन ऑफ़लाइन काम करने की क्षमता के लिए Mercurial को देख रहा हूं। कुछ ऐसा नहीं है जिसे मैं समझने में सक्षम नहीं हूं कि एक पुराने टैग को संशोधित एक अपरिवर्तनीय निर्यात कैसे करें। एसवीएन में टैग सिर्फ रेपो में एक \ टैग फ़ोल्डर में रहते हैं, तो मैं वहां से कुछ निर्यात कर सकता था, लेकिन ऐसा लगता है कि एचजी परियोजनाओं के लिए एक ही ट्रंक-शाखा-टैग निर्देशिकाओं का उपयोग नहीं किया जाता है (या वे हैं?)Mercurial

सबसे अच्छा मैं समझ सकता हूं कि कुछ संशोधनों में केवल भंडार को क्लोन करना है और फिर .hg फ़ोल्डर को हटा देना है। TortoiseHg टैग की सूची प्रदर्शित नहीं करता है, इसलिए मैं क्लोन करता हूं, लॉग के माध्यम से ब्राउज़ करता हूं, जो कुछ भी अपडेट करता हूं, फिर /.hg हटा देता हूं। यह वास्तव में बेकार लगता है, क्या कुछ पसंदीदा तरीका है?

उत्तर

11

प्रयोग करें 'Hg संग्रह':

एक टैग किया गया संस्करण उपयोग निर्यात करने के लिए।

hg archive [OPTION]... DEST 

    create an unversioned archive of a repository revision 

    By default, the revision used is the parent of the working 
    directory; use -r/--rev to specify a different revision. 

    To specify the type of archive to create, use -t/--type. Valid 
    types are: 

    "files" (default): a directory full of files 
    "tar": tar archive, uncompressed 
    "tbz2": tar archive, compressed using bzip2 
    "tgz": tar archive, compressed using gzip 
    "uzip": zip archive, uncompressed 
    "zip": zip archive, compressed using deflate 

    The exact name of the destination archive or directory is given 
    using a format string; see 'hg help export' for details. 

    Each member added to an archive file has a directory prefix 
    prepended. Use -p/--prefix to specify a format string for the 
    prefix. The default is the basename of the archive, with suffixes 
    removed. 

    options: 

    --no-decode do not pass files through decoders 
-p --prefix  directory prefix for files in archive 
-r --rev  revision to distribute 
-t --type  type of distribution to create 
-I --include include names matching the given patterns 
-X --exclude exclude names matching the given patterns 

-r तर्क टैग नाम को स्वीकार करेंगे, और यदि आप एक संग्रह फ़ाइल नहीं करना चाहती -t files एक निर्देशिका मिल जाएगा।

+0

TortoiseHg 'hg archive' का समर्थन नहीं करता प्रतीत होता है, क्या कुछ खोल कमांड है जो मुझे सभी टैग की एक सूची दिखाएगा? –

+2

निश्चित रूप से आप 'एचजी टैग' का उपयोग कर सकते हैं। – tonfa

+1

TortoiseHg अब 'निर्यात-> संग्रह' स्थानीय मेनू के माध्यम से 'एचजी संग्रह' का समर्थन करता है। – Pino

3

शायद आप "एचजी संग्रह" की तलाश में हैं? hg archive -r mytag ../export-tagged