{"id":9078,"date":"2005-06-15T05:18:32","date_gmt":"2005-06-15T02:18:32","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=9078"},"modified":"2005-10-03T00:17:54","modified_gmt":"2005-10-02T21:17:54","slug":"telling-gnu-arch-the-truth","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/15\/telling-gnu-arch-the-truth\/","title":{"rendered":"Telling Gnu Arch the truth"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Yet another problem (and solution) that I&#8217;ve stumbled across while using Gnu Arch.  We have two branches in our archive: <code>program--vendor--0.1<\/code> and <code>program--local--0.1<\/code>.  Vendor&#8217;s version has all the source files in <code>SomeDirectory<\/code>, while our local version has all source files in <code>somedir<\/code>.  Except for the name and few local changes, these two directories are practically identical.<\/p>\n<p>But when we were creating branches and importing code, we weren&#8217;t very careful and ended up with these directories and files having different arch IDs.  This makes comparing two source trees close to impossible, as arch thinks that directory <code>SomeDirectory<\/code> was removed together with all its content and directory <code>somedir<\/code> was added together with a bunch of files.<\/p>\n<p>Telling Arch the truth is very simple.  Basically, all that needs to be done is <code>=id<\/code> and <code>*.id<\/code> files under all <code>.arch-ids\/<\/code> directories in one source tree should be copied to the appropriate places in the other source tree.  After that <code>tla commit<\/code> should be done.<\/p>\n<p>In order to minimize the pain of manual labour, I wrote a tiny perl script to find all needed files and copy them appropriately.  On the command line just specify two directories, which you know are the same, but which arch considers different.  If any of the files weren&#8217;t copied, you&#8217;ll get their names in the warning.  When script finishes, you&#8217;ll get the total count of copied files.<\/p>\n<p>The script is here: <a href='\/wordpress\/wp-content\/fix_arch_ids.perl' title='fix_arch_ids.pl'>fix_arch_ids.pl<\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Yet another problem (and solution) that I&#8217;ve stumbled across while using Gnu Arch. We have two branches in our archive: program&#8211;vendor&#8211;0.1 and program&#8211;local&#8211;0.1. Vendor&#8217;s version has all the source files in SomeDirectory, while our local version has all source files in somedir. Except for the name and few local changes, these two directories are practically &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/15\/telling-gnu-arch-the-truth\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Telling Gnu Arch the truth<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18],"tags":[39,1588,17],"keyring_services":[],"class_list":["post-9078","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","tag-software","tag-version-control","tag-work"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":9038,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/03\/recursively-adding-files-and-directories-in-gnu-arch\/","url_meta":{"origin":9078,"position":0},"title":"Recursively adding files and directories in Gnu Arch","author":"Leonid Mamchenkov","date":"June 3, 2005","format":false,"excerpt":"One of the little annoyances of Gnu Arch is that it does not add files and directories recursively. Not to worry, though. Here is a little shell script that can assist with that task: #!\/bin\/bash # Find all files and directories, skipping .\/{arch} for FILE in `find . -path '.\/{arch}'\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9031,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/01\/subversion-vs-gnu-arch\/","url_meta":{"origin":9078,"position":1},"title":"Subversion vs. Gnu Arch","author":"Leonid Mamchenkov","date":"June 1, 2005","format":false,"excerpt":"I've spent some time today fighting with both Subversion and Gnu Arch. After the first few battles, it was decided that Subversion is not going to be used for the project, and that we'd go with Gnu Arch instead. There were three reasons for that. Subversion is a pain to\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7307,"url":"https:\/\/mamchenkov.net\/wordpress\/2003\/12\/18\/gnu-arch-first-impressions\/","url_meta":{"origin":9078,"position":2},"title":"GNU Arch &#8211; first impressions","author":"Leonid Mamchenkov","date":"December 18, 2003","format":false,"excerpt":"Something really strange happened today. I never thought that this is possible, even less that it could happen to me, but it did. CVS did something really strange to my Intranet\/Webcentral repository. All the code is there, but there is no more diffirentiation between versions. Whatever you try to see,\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9079,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/16\/finding-the-tree-version-in-the-working-directory\/","url_meta":{"origin":9078,"position":3},"title":"Finding the tree version in the working directory","author":"Leonid Mamchenkov","date":"June 16, 2005","format":false,"excerpt":"When using Gnu Arch, once in a while I need to verify that I am in the correct working directory. With long names, patches, and all those branches it is not always that obvious. The shortest way to find the version of the tree in the current working directory is:\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9077,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/15\/the-magic-of-tla-cacherev\/","url_meta":{"origin":9078,"position":4},"title":"The magic of tla cacherev","author":"Leonid Mamchenkov","date":"June 15, 2005","format":false,"excerpt":"I've stumbled upon an annoying problem while use Gnu Arch. During the development process, one of the directories in the source tree was given bad permissions (r-xr-x-rx). With the next patch, this directory was removed altogether. That introduced a problem for tla get as it was dying with permission denied\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9488,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/23\/finding-files-in-linux\/","url_meta":{"origin":9078,"position":5},"title":"Finding files in Linux","author":"Leonid Mamchenkov","date":"September 23, 2005","format":false,"excerpt":"Many beginning Linux users experience difficulties getting used to the filesystem structure. Indeed, there are many files and directories, the structure of which are not as obvious as it could be. Choosing an appropriate location for a new file or directory is difficult and many choose to follow their own\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/9078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=9078"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/9078\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=9078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=9078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=9078"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=9078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}